You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Kubernetes website uses git submodules. Even if you plan to run the website in a container, we strongly recommend pulling in the submodule and other development dependencies by running the following:
33
+
The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/docsy#readme),
34
+
which can be installed via npm. You can also download a pre-configured
35
+
development container image that includes Hugo and Docsy. Additionally, a Git
36
+
submodule is used for tools that generate the reference documentation.
- For a regular Service, this resolves to the port number and the domain name:
94
+
`my-svc.my-namespace.svc.cluster-domain.example`.
95
+
- For a headless Service, this resolves to multiple answers, one for each Pod
96
+
that is backing the Service, and contains the port number and the domain name of the Pod
97
+
of the form `hostname.my-svc.my-namespace.svc.cluster-domain.example`.
96
98
97
99
## Pods
98
100
99
101
### A/AAAA records
100
102
101
-
Kube-DNS versions, prior to the implementation of the [DNS specification](https://github.com/kubernetes/dns/blob/master/docs/specification.md), had the following DNS resolution:
103
+
Kube-DNS versions, prior to the implementation of the
@@ -191,7 +201,8 @@ An {{<glossary_tooltip term_id="endpoint-slice" text="EndpointSlice">}} can spec
191
201
the DNS hostname for any endpoint addresses, along with its IP.
192
202
193
203
{{< note >}}
194
-
A and AAAA records are not created for Pod names since `hostname` is missing for the Pod. A Pod with no `hostname` but with `subdomain` will only create the
204
+
A and AAAA records are not created for Pod names since `hostname` is missing for the Pod.
205
+
A Pod with no `hostname` but with `subdomain` will only create the
195
206
A or AAAA record for the headless Service (`busybox-subdomain.my-namespace.svc.cluster-domain.example`),
196
207
pointing to the Pods' IP addresses. Also, the Pod needs to be ready in order to have a
197
208
record unless `publishNotReadyAddresses=True` is set on the Service.
@@ -203,16 +214,24 @@ record unless `publishNotReadyAddresses=True` is set on the Service.
203
214
204
215
When a Pod is configured to have fully qualified domain name (FQDN), its
205
216
hostname is the short hostname. For example, if you have a Pod with the fully
206
-
qualified domain name `busybox-1.busybox-subdomain.my-namespace.svc.cluster-domain.example`,
207
-
then by default the `hostname` command inside that Pod returns `busybox-1` and the
217
+
qualified domain name `busybox-1.busybox-subdomain.my-namespace.svc.cluster-domain.example`,
218
+
then by default the `hostname` command inside that Pod returns `busybox-1` and the
208
219
`hostname --fqdn`command returns the FQDN.
209
220
210
-
When you set `setHostnameAsFQDN: true` in the Pod spec, the kubelet writes the Pod's FQDN into the hostname for that Pod's namespace. In this case, both `hostname` and `hostname --fqdn` return the Pod's FQDN.
221
+
When you set `setHostnameAsFQDN: true` in the Pod spec, the kubelet writes the Pod's FQDN
222
+
into the hostname for that Pod's namespace. In this case, both `hostname` and `hostname --fqdn`
223
+
return the Pod's FQDN.
211
224
212
225
{{< note >}}
213
226
In Linux, the hostname field of the kernel (the `nodename` field of `struct utsname`) is limited to 64 characters.
214
227
215
-
If a Pod enables this feature and its FQDN is longer than 64 character, it will fail to start. The Pod will remain in `Pending` status (`ContainerCreating` as seen by `kubectl`) generating error events, such as Failed to construct FQDN from Pod hostname and cluster domain, FQDN `long-FQDN` is too long (64 characters is the max, 70 characters requested). One way of improving user experience for this scenario is to create an [admission webhook controller](/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks) to control FQDN size when users create top level objects, for example, Deployment.
228
+
If a Pod enables this feature and its FQDN is longer than 64 character, it will fail to start.
229
+
The Pod will remain in `Pending` status (`ContainerCreating` as seen by `kubectl`) generating
230
+
error events, such as Failed to construct FQDN from Pod hostname and cluster domain,
231
+
FQDN `long-FQDN` is too long (64 characters is the max, 70 characters requested).
232
+
One way of improving user experience for this scenario is to create an
0 commit comments