Skip to content

Commit c7968f6

Browse files
authored
Merge pull request #49693 from michellengnx/merged-main-dev-1.33
Merge main branch into dev-1.33
2 parents 464cc34 + 77cb121 commit c7968f6

File tree

55 files changed

+2344
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2344
-421
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ NETLIFY_FUNC = $(NODE_BIN)/netlify-lambda
77
# CONTAINER_ENGINE=podman make container-image
88
CONTAINER_ENGINE ?= docker
99
IMAGE_REGISTRY ?= gcr.io/k8s-staging-sig-docs
10-
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile package.json package-lock.json | cut -c 1-12)
10+
IMAGE_VERSION=$(shell scripts/hash-files.sh Dockerfile Makefile netlify.toml .dockerignore cloudbuild.yaml package.json package-lock.json | cut -c 1-12)
1111
CONTAINER_IMAGE = $(IMAGE_REGISTRY)/k8s-website-hugo:v$(HUGO_VERSION)-$(IMAGE_VERSION)
1212
# Mount read-only to allow use with tools like Podman in SELinux mode
1313
# Container targets don't need to write into /src

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ git clone https://github.com/kubernetes/website.git
3030
cd website
3131
```
3232

33-
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.
3437

3538
### Windows
3639

assets/scss/_custom.scss

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,33 @@ body.td-home main[role="main"] > section:first-of-type .content p:first-child {
125125
}
126126
}
127127

128+
.section-feature#kubeweekly {
129+
130+
a.kubeweekly-signup, a.kubeweekly-signup:hover {
131+
color: $primary;
132+
font-weight: 400;
133+
font-size: 1.1rem;
134+
}
135+
> .kubeweekly-inner {
136+
form p {
137+
text-align: center;
138+
font-size: 1.2rem;
139+
color: $black;
140+
}
141+
margin-left: auto;
142+
margin-right: auto;
143+
padding-top: 2rem;
144+
}
145+
146+
h5 {
147+
text-align: center;
148+
149+
a:hover {
150+
text-decoration: underline;
151+
}
152+
}
153+
}
154+
128155
body.td-404 main .error-details {
129156
max-width: 1100px;
130157
margin: 0 auto;
@@ -1932,9 +1959,13 @@ div.alert > em.javascript-required {
19321959
font-size: 1.15rem;
19331960
}
19341961

1935-
body.td-search #search {
1936-
margin-top: 1rem;
1937-
margin-bottom: 3rem;
1962+
body.td-search {
1963+
width: 100%; // avoid confusion with other .td-search elements that have a width set
1964+
1965+
#search {
1966+
margin-top: 1rem;
1967+
margin-bottom: 3rem;
1968+
}
19381969
}
19391970

19401971
/* CSS for 'figure' full-screen display */

assets/scss/case_studies.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ body.cid-casestudies {
7070
background-repeat: no-repeat;
7171
}
7272

73+
.banner h2 {
74+
color: #fff;
75+
}
76+
7377
.banner * {
7478
position: relative;
7579
}
@@ -213,15 +217,16 @@ body.td-section.cid-casestudies {
213217
}
214218

215219
.video-quote, .case-study-video {
216-
max-width: calc(clamp(40em, 50vw + 20em, 100vw - 4em));
217-
margin-left: auto;
218-
margin-right: auto;
220+
width: 50%;
219221
padding-top: 1em;
220222
padding-bottom: 1em;
223+
box-sizing: border-box;
224+
text-align: center;
221225
iframe {
222226
display: block;
223227
margin-left: auto;
224-
margin-top: 1.5em;
228+
width: 90%;
229+
aspect-ratio: 16 / 9;
225230
}
226231
}
227232

@@ -269,12 +274,17 @@ body.td-section.cid-casestudies {
269274
}
270275
}
271276

272-
@media (max-width: 1000px) {
277+
@media (max-width: 1200px) {
273278
body.td-section.cid-casestudies {
274279
.case-study {
275280
width: initial;
276281
flex-basis: 90vw;
277282
margin-bottom: 40px;
278283
}
284+
285+
.video-quote, .case-study-video {
286+
width: initial;
287+
flex-basis: 90%;
288+
}
279289
}
280290
}

content/en/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ <h3>Attend upcoming KubeCon + CloudNativeCon events</h3>
6262
{{< blocks/kubernetes-features >}}
6363

6464
{{< blocks/case-studies >}}
65+
66+
{{< kubeweekly id="kubeweekly" >}}

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

Lines changed: 69 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,56 @@ description: >-
1313
<!-- overview -->
1414

1515
Kubernetes creates DNS records for Services and Pods. You can contact
16-
Services with consistent DNS names instead of IP addresses.
16+
Services with consistent DNS names instead of IP addresses.
1717

1818
<!-- body -->
1919

2020
Kubernetes publishes information about Pods and Services which is used
21-
to program DNS. Kubelet configures Pods' DNS so that running containers
22-
can lookup Services by name rather than IP.
21+
to program DNS. kubelet configures Pods' DNS so that running containers
22+
can look up Services by name rather than IP.
2323

2424
Services defined in the cluster are assigned DNS names. By default, a
2525
client Pod's DNS search list includes the Pod's own namespace and the
26-
cluster's default domain.
26+
cluster's default domain.
2727

28-
### Namespaces of Services
28+
### Namespaces of Services
2929

30-
A DNS query may return different results based on the namespace of the Pod making
31-
it. DNS queries that don't specify a namespace are limited to the Pod's
32-
namespace. Access Services in other namespaces by specifying it in the DNS query.
30+
A DNS query may return different results based on the namespace of the Pod making
31+
it. DNS queries that don't specify a namespace are limited to the Pod's
32+
namespace. Access Services in other namespaces by specifying it in the DNS query.
3333

34-
For example, consider a Pod in a `test` namespace. A `data` Service is in
35-
the `prod` namespace.
34+
For example, consider a Pod in a `test` namespace. A `data` Service is in
35+
the `prod` namespace.
3636

37-
A query for `data` returns no results, because it uses the Pod's `test` namespace.
37+
A query for `data` returns no results, because it uses the Pod's `test` namespace.
3838

39-
A query for `data.prod` returns the intended result, because it specifies the
40-
namespace.
39+
A query for `data.prod` returns the intended result, because it specifies the
40+
namespace.
4141

42-
DNS queries may be expanded using the Pod's `/etc/resolv.conf`. Kubelet
43-
configures this file for each Pod. For example, a query for just `data` may be
44-
expanded to `data.test.svc.cluster.local`. The values of the `search` option
45-
are used to expand queries. To learn more about DNS queries, see
46-
[the `resolv.conf` manual page.](https://www.man7.org/linux/man-pages/man5/resolv.conf.5.html)
42+
DNS queries may be expanded using the Pod's `/etc/resolv.conf`. kubelet
43+
configures this file for each Pod. For example, a query for just `data` may be
44+
expanded to `data.test.svc.cluster.local`. The values of the `search` option
45+
are used to expand queries. To learn more about DNS queries, see
46+
[the `resolv.conf` manual page](https://www.man7.org/linux/man-pages/man5/resolv.conf.5.html).
4747

4848
```
4949
nameserver 10.32.0.10
5050
search <namespace>.svc.cluster.local svc.cluster.local cluster.local
5151
options ndots:5
5252
```
5353

54-
In summary, a Pod in the _test_ namespace can successfully resolve either
54+
In summary, a Pod in the _test_ namespace can successfully resolve either
5555
`data.prod` or `data.prod.svc.cluster.local`.
5656

5757
### DNS Records
5858

5959
What objects get DNS records?
6060

6161
1. Services
62-
2. Pods
62+
1. Pods
6363

6464
The following sections detail the supported DNS record types and layout that is
65-
supported. Any other layout or names or queries that happen to work are
65+
supported. Any other layout or names or queries that happen to work are
6666
considered implementation details and are subject to change without warning.
6767
For more up-to-date specification, see
6868
[Kubernetes DNS-Based Service Discovery](https://github.com/kubernetes/dns/blob/master/docs/specification.md).
@@ -73,43 +73,53 @@ For more up-to-date specification, see
7373

7474
"Normal" (not headless) Services are assigned DNS A and/or AAAA records,
7575
depending on the IP family or families of the Service, with a name of the form
76-
`my-svc.my-namespace.svc.cluster-domain.example`. This resolves to the cluster IP
76+
`my-svc.my-namespace.svc.cluster-domain.example`. This resolves to the cluster IP
7777
of the Service.
7878

79-
[Headless Services](/docs/concepts/services-networking/service/#headless-services)
79+
[Headless Services](/docs/concepts/services-networking/service/#headless-services)
8080
(without a cluster IP) are also assigned DNS A and/or AAAA records,
81-
with a name of the form `my-svc.my-namespace.svc.cluster-domain.example`. Unlike normal
81+
with a name of the form `my-svc.my-namespace.svc.cluster-domain.example`. Unlike normal
8282
Services, this resolves to the set of IPs of all of the Pods selected by the Service.
8383
Clients are expected to consume the set or else use standard round-robin
8484
selection from the set.
8585

8686
### SRV records
8787

8888
SRV Records are created for named ports that are part of normal or headless
89-
services. For each named port, the SRV record has the form
90-
`_port-name._port-protocol.my-svc.my-namespace.svc.cluster-domain.example`.
91-
For a regular Service, this resolves to the port number and the domain name:
92-
`my-svc.my-namespace.svc.cluster-domain.example`.
93-
For a headless Service, this resolves to multiple answers, one for each Pod
94-
that is backing the Service, and contains the port number and the domain name of the Pod
95-
of the form `hostname.my-svc.my-namespace.svc.cluster-domain.example`.
89+
services.
90+
91+
- For each named port, the SRV record has the form
92+
`_port-name._port-protocol.my-svc.my-namespace.svc.cluster-domain.example`.
93+
- 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`.
9698

9799
## Pods
98100

99101
### A/AAAA records
100102

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
104+
[DNS specification](https://github.com/kubernetes/dns/blob/master/docs/specification.md),
105+
had the following DNS resolution:
102106

103-
`pod-ipv4-address.my-namespace.pod.cluster-domain.example`.
107+
```
108+
pod-ipv4-address.my-namespace.pod.cluster-domain.example
109+
```
104110

105111
For example, if a Pod in the `default` namespace has the IP address 172.17.0.3,
106112
and the domain name for your cluster is `cluster.local`, then the Pod has a DNS name:
107113

108-
`172-17-0-3.default.pod.cluster.local`.
114+
```
115+
172-17-0-3.default.pod.cluster.local
116+
```
109117

110-
Some cluster DNS mechanisms, like [CoreDNS], also provide `A` records for:
118+
Some cluster DNS mechanisms, like [CoreDNS](https://coredns.io/), also provide `A` records for:
111119

112-
<tt><em>pod-ipv4-address</em>.<em>service-name</em>.<em>my-namespace</em>.svc.<em>cluster-domain.example</em>.</tt>
120+
```
121+
<pod-ipv4-address>.<service-name>.<my-namespace>.svc.<cluster-domain.example>
122+
```
113123

114124
### Pod's hostname and subdomain fields
115125

@@ -191,7 +201,8 @@ An {{<glossary_tooltip term_id="endpoint-slice" text="EndpointSlice">}} can spec
191201
the DNS hostname for any endpoint addresses, along with its IP.
192202

193203
{{< 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
195206
A or AAAA record for the headless Service (`busybox-subdomain.my-namespace.svc.cluster-domain.example`),
196207
pointing to the Pods' IP addresses. Also, the Pod needs to be ready in order to have a
197208
record unless `publishNotReadyAddresses=True` is set on the Service.
@@ -203,16 +214,24 @@ record unless `publishNotReadyAddresses=True` is set on the Service.
203214

204215
When a Pod is configured to have fully qualified domain name (FQDN), its
205216
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
208219
`hostname --fqdn` command returns the FQDN.
209220

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.
211224

212225
{{< note >}}
213226
In Linux, the hostname field of the kernel (the `nodename` field of `struct utsname`) is limited to 64 characters.
214227

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
233+
[admission webhook controller](/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks)
234+
to control FQDN size when users create top level objects, for example, Deployment.
216235
{{< /note >}}
217236

218237
### Pod's DNS Policy
@@ -235,7 +254,11 @@ following Pod-specific DNS policies. These policies are specified in the
235254
explicitly set its DNS policy to "`ClusterFirstWithHostNet`". Otherwise, Pods
236255
running with hostNetwork and `"ClusterFirst"` will fallback to the behavior
237256
of the `"Default"` policy.
238-
- Note: This is not supported on Windows. See [below](#dns-windows) for details
257+
258+
{{< note >}}
259+
This is not supported on Windows. See [below](#dns-windows) for details.
260+
{{< /note >}}
261+
239262
- "`None`": It allows a Pod to ignore DNS settings from the Kubernetes
240263
environment. All DNS settings are supposed to be provided using the
241264
`dnsConfig` field in the Pod Spec.
@@ -246,7 +269,6 @@ following Pod-specific DNS policies. These policies are specified in the
246269
explicitly specified, then "ClusterFirst" is used.
247270
{{< /note >}}
248271

249-
250272
The example below shows a Pod with its DNS policy set to
251273
"`ClusterFirstWithHostNet`" because it has `hostNetwork` set to `true`.
252274

@@ -315,7 +337,9 @@ For IPv6 setup, search path and name server should be set up like this:
315337
```shell
316338
kubectl exec -it dns-example -- cat /etc/resolv.conf
317339
```
340+
318341
The output is similar to this:
342+
319343
```
320344
nameserver 2001:db8:30::a
321345
search default.svc.cluster-domain.example svc.cluster-domain.example cluster-domain.example
@@ -343,7 +367,7 @@ this problem.
343367

344368
## DNS resolution on Windows nodes {#dns-windows}
345369

346-
- ClusterFirstWithHostNet is not supported for Pods that run on Windows nodes.
370+
- `ClusterFirstWithHostNet` is not supported for Pods that run on Windows nodes.
347371
Windows treats all names with a `.` as a FQDN and skips FQDN resolution.
348372
- On Windows, there are multiple DNS resolvers that can be used. As these come with
349373
slightly different behaviors, using the
@@ -362,6 +386,4 @@ this problem.
362386
## {{% heading "whatsnext" %}}
363387

364388
For guidance on administering DNS configurations, check
365-
[Configure DNS Service](/docs/tasks/administer-cluster/dns-custom-nameservers/)
366-
367-
[CoreDNS]: https://coredns.io/
389+
[Configure DNS Service](/docs/tasks/administer-cluster/dns-custom-nameservers/).

content/en/docs/contribute/new-content/open-a-pr.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ Figure 2. Working from a local fork to make your changes.
169169
```shell
170170
git clone [email protected]:<github_username>/website
171171
cd website
172-
git submodule update --init --recursive --depth 1
173172
```
174173

175174
1. Navigate to the new `website` directory. Set the `kubernetes/website` repository as the `upstream` remote:
@@ -338,20 +337,24 @@ variable to override this behaviour.
338337

339338
Alternately, install and use the `hugo` command on your computer:
340339

341-
1. Install the [Hugo](https://gohugo.io/getting-started/installing/) version specified in
340+
1. Install the [Hugo (Extended edition)](https://gohugo.io/getting-started/installing/) and [Node](https://nodejs.org/en) version specified in
342341
[`website/netlify.toml`](https://raw.githubusercontent.com/kubernetes/website/main/netlify.toml).
343342

344-
1. If you have not updated your website repository, the `website/themes/docsy` directory is empty.
345-
The site cannot build without a local copy of the theme. To update the website theme, run:
343+
1. Install any dependencies:
346344

347345
```shell
348-
git submodule update --init --recursive --depth 1
346+
npm ci
349347
```
350348

351349
1. In a terminal, go to your Kubernetes website repository and start the Hugo server:
352350

353351
```shell
354352
cd <path_to_your_repo>/website
353+
make serve
354+
```
355+
If you're on a Windows machine or unable to run the `make` command, use the following command:
356+
357+
```
355358
hugo server --buildFuture
356359
```
357360

0 commit comments

Comments
 (0)