Skip to content

Commit 7097e3a

Browse files
authored
Merge pull request #28096 from gjkim42/expanded-dns-config
Add ExpandedDNSConfig feature gate
2 parents 67b9b0b + 30d4d4e commit 7097e3a

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

content/en/docs/concepts/services-networking/dns-pod-service.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,17 @@ search default.svc.cluster-domain.example svc.cluster-domain.example cluster-dom
310310
options ndots:5
311311
```
312312

313+
#### Expanded DNS Configuration
314+
315+
{{< feature-state for_k8s_version="1.22" state="alpha" >}}
316+
317+
By default, for Pod's DNS Config, Kubernetes allows at most 6 search domains and
318+
a list of search domains of up to 256 characters.
319+
320+
If the feature gate `ExpandedDNSConfig` is enabled for the kube-apiserver and
321+
the kubelet, it is allowed for Kubernetes to have at most 32 search domains and
322+
a list of search domains of up to 2048 characters.
323+
313324
### Feature availability
314325

315326
The availability of Pod DNS Config and DNS Policy "`None`" is shown as below.

content/en/docs/reference/command-line-tools-reference/feature-gates.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ different Kubernetes components.
113113
| `EphemeralContainers` | `false` | Alpha | 1.16 | |
114114
| `ExpandCSIVolumes` | `false` | Alpha | 1.14 | 1.15 |
115115
| `ExpandCSIVolumes` | `true` | Beta | 1.16 | |
116+
| `ExpandedDNSConfig` | `false` | Alpha | 1.22 | |
116117
| `ExpandInUsePersistentVolumes` | `false` | Alpha | 1.11 | 1.14 |
117118
| `ExpandInUsePersistentVolumes` | `true` | Beta | 1.15 | |
118119
| `ExpandPersistentVolumes` | `false` | Alpha | 1.8 | 1.10 |
@@ -632,6 +633,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
632633
now-corrected fault where Kubernetes ignored exec probe timeouts. See
633634
[readiness probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).
634635
- `ExpandCSIVolumes`: Enable the expanding of CSI volumes.
636+
- `ExpandedDNSConfig`: Enable kubelet and kube-apiserver to allow more DNS
637+
search paths and longer list of DNS search paths. See
638+
[Expanded DNS Configuration](/docs/concepts/services-networking/dns-pod-service/#expanded-dns-configuration).
635639
- `ExpandInUsePersistentVolumes`: Enable expanding in-use PVCs. See
636640
[Resizing an in-use PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/#resizing-an-in-use-persistentvolumeclaim).
637641
- `ExpandPersistentVolumes`: Enable the expanding of persistent volumes. See

content/en/docs/tasks/administer-cluster/dns-debugging-resolution.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ This should probably be implemented eventually.
288288

289289
Linux's libc (a.k.a. glibc) has a limit for the DNS `nameserver` records to 3 by default. What's more, for the glibc versions which are older than glibc-2.17-222 ([the new versions update see this issue](https://access.redhat.com/solutions/58028)), the allowed number of DNS `search` records has been limited to 6 ([see this bug from 2005](https://bugzilla.redhat.com/show_bug.cgi?id=168253)). Kubernetes needs to consume 1 `nameserver` record and 3 `search` records. This means that if a local installation already uses 3 `nameserver`s or uses more than 3 `search`es while your glibc version is in the affected list, some of those settings will be lost. To work around the DNS `nameserver` records limit, the node can run `dnsmasq`, which will provide more `nameserver` entries. You can also use kubelet's `--resolv-conf` flag. To fix the DNS `search` records limit, consider upgrading your linux distribution or upgrading to an unaffected version of glibc.
290290

291+
{{< note >}}
292+
293+
With [Expanded DNS Configuration](/docs/concepts/services-networking/dns-pod-service/#expanded-dns-configuration),
294+
Kubernetes allows more DNS `search` records.
295+
296+
{{< /note >}}
297+
291298
If you are using Alpine version 3.3 or earlier as your base image, DNS may not
292299
work properly due to a known issue with Alpine.
293300
Kubernetes [issue 30215](https://github.com/kubernetes/kubernetes/issues/30215)

0 commit comments

Comments
 (0)