Skip to content

Commit 7f43ace

Browse files
author
Anna Jung (VMware)
committed
Merge remote-tracking branch 'upstream/master' into dev-1.20
2 parents 72d21d0 + b905af1 commit 7f43ace

File tree

167 files changed

+8089
-4119
lines changed

Some content is hidden

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

167 files changed

+8089
-4119
lines changed

content/de/docs/tasks/tools/install-minikube.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sudo mv minikube /usr/local/bin
6969
### Linux
7070

7171
{{< note >}}
72-
Dieses Dokument zeigt Ihnen, wie Sie Minikube mit einer statischen Binärdatei unter Linux installieren. Für alternative Linux-Installationsmethoden siehe [Andere Installationsmethoden](https://github.com/kubernetes/minikube#other-ways-to-install) im offiziellen Minikube-GitHub-Repository.
72+
Dieses Dokument zeigt Ihnen, wie Sie Minikube mit einer statischen Binärdatei unter Linux installieren. Für alternative Linux-Installationsmethoden siehe [Andere Installationsmethoden](https://minikube.sigs.k8s.io/docs/start/) im offiziellen Minikube-GitHub-Repository.
7373
{{< /note >}}
7474

7575
Sie können Minikube unter Linux installieren, indem Sie eine statische Binärdatei herunterladen:

content/en/blog/_posts/2020-12-02-dockershim-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ aliases: [ '/dockershim' ]
77
---
88

99
This document goes over some frequently asked questions regarding the Dockershim
10-
depreaction announced as a part of the Kubernetes v1.20 release. For more detail
10+
deprecation announced as a part of the Kubernetes v1.20 release. For more detail
1111
on the deprecation of Docker as a container runtime for Kubernetes kubelets, and
1212
what that means, check out the blog post
1313
[Don't Panic: Kubernetes and Docker](/blog/2020/12/02/dont-panic-kubernetes-and-docker/).
@@ -101,7 +101,7 @@ in the form of [runc], which is the underlying default runtime for both
101101
[containerd] and [CRI-O]. The CRI builds on these low-level specifications to
102102
provide an end-to-end standard for managing containers.
103103

104-
[Open Container Initative]: https://opencontainers.org/about/overview/
104+
[Open Container Initiative]: https://opencontainers.org/about/overview/
105105
[runc]: https://github.com/opencontainers/runc
106106
[containerd]: https://containerd.io/
107107

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
layout: blog
3+
title: "GSoD 2020: Improving the API Reference Experience"
4+
date: 2020-12-04
5+
slug: gsod-2020-improving-api-reference-experience
6+
---
7+
8+
**Author**: [Philippe Martin](https://github.com/feloy)
9+
10+
_Editor's note: Better API references have been my goal since I joined Kubernetes docs three and a half years ago. Philippe has succeeded fantastically. More than a better API reference, though, Philippe embodied the best of the Kubernetes community in this project: excellence through collaboration, and a process that made the community itself better. Thanks, Google Season of Docs, for making Philippe's work possible. —Zach Corleissen_
11+
12+
## Introduction
13+
14+
The [Google Season of Docs](https://developers.google.com/season-of-docs) project brings open source organizations and technical writers together to work closely on a specific documentation project.
15+
16+
I was selected by the CNCF to work on Kubernetes documentation, specifically to make the API Reference documentation more accessible.
17+
18+
I'm a software developer with a great interest in documentation systems. In the late 90's I started translating Linux-HOWTO documents into French. From one thing to another, I learned about documentation systems. Eventually, I wrote a Linux-HOWTO to help documentarians learn the language used at that time for writing documents, LinuxDoc/SGML.
19+
20+
Shortly afterward, Linux documentation adopted the DocBook language. I helped some writers rewrite their documents in this format; for example, the Advanced Bash-Scripting Guide. I also worked on the GNU `makeinfo` program to add DocBook output, making it possible to transform *GNU Info* documentation into Docbook format.
21+
22+
## Background
23+
24+
The [Kubernetes website](https://kubernetes.io/docs/home/) is built with Hugo from documentation written in Markdown format in the [website repository](https://github.com/kubernetes/website), using the [Docsy Hugo theme](https://www.docsy.dev/about/).
25+
26+
The existing API reference documentation is a large HTML file generated from the Kubernetes OpenAPI specification.
27+
28+
On my side, I wanted for some time to make the API Reference more accessible, by:
29+
- building individual and autonomous pages for each Kubernetes resource
30+
- adapting the format to mobile reading
31+
- reusing the website's assets and theme to build, integrate, and display the reference pages
32+
- allowing the search engines to reference the content of the pages
33+
34+
Around one year ago, I started to work on the generator building the current unique HTML page, to add a DocBook output, so the API Reference could be generated first in DocBook format, and after that in PDF or other formats supported by DocBook processors. The first result has been some [Ebook files for the API Reference](https://github.com/feloy/kubernetes-resources-reference/releases) and an auto-edited paper book.
35+
36+
I decided later to add another output to this generator, to generate Markdown files and create [a website with the API Reference](https://web.archive.org/web/20201022201911/https://www.k8sref.io/docs/workloads/).
37+
38+
When the CNCF proposed a project for the Google Season of Docs to work on the API Reference, I applied, and the match occurred.
39+
40+
## The Project
41+
42+
### swagger-ui
43+
44+
The first idea of the CNCF members that proposed this project was to test the [`swagger-ui` tool](https://swagger.io/tools/swagger-ui/), to try and document the Kubernetes API Reference with this standard tool.
45+
46+
Because the Kubernetes API is much larger than many other APIs, it has been necessary to write a tool to split the complete API Reference by API Groups, and insert in the Documentation website several `swagger-ui` components, one for each API Group.
47+
48+
Generally, APIs are used by developers by calling endpoints with a specific HTTP verb, with specific parameters and waiting for a response. The `swagger-ui` interface is built for this usage: the interface displays a list of endpoints and their associated verbs, and for each the parameters and responses formats.
49+
50+
The Kubernetes API is most of the time used differently: users create manifest files containing resources definitions in YAML format, and use the `kubectl` CLI to *apply* these manifests to the cluster. In this case, the most important information is the description of the structures used as parameters and responses (the Kubernetes Resources).
51+
52+
Because of this specificity, we realized that it would be difficult to adapt the `swagger-ui` interface to satisfy the users of the Kubernetes API and this direction has been abandoned.
53+
54+
### Markdown pages
55+
56+
The second stage of the project has been to adapt the work I had done to create the k8sref.io website, to include it in the official documentation website.
57+
58+
The main changes have been to:
59+
- use go-templates to represent the output pages, so non-developers can adapt the generated pages without having to edit the generator code
60+
- create a new custom [shortcode](https://gohugo.io/content-management/shortcodes/), to easily create links from inside the website to specific pages of the API reference
61+
- improve the navigation between the sections of the API reference
62+
- add the code of the generator to the Kubernetes GitHub repository containing the different reference generators
63+
64+
All the discussions and work done can be found in website [pull request #23294](https://github.com/kubernetes/website/pull/23294).
65+
66+
Adding the generator code to the Kubernetes project happened in [kubernetes-sigs/reference-docs#179](https://github.com/kubernetes-sigs/reference-docs/pull/179).
67+
68+
Here are the features of the new API Reference to be included in the official documentation website:
69+
70+
- the resources are categorized, in the categories Workloads, Services, Config & Storage, Authentication, Authorization, Policies, Extend, Cluster. This structure is configurable with a simple [`toc.yaml` file](https://github.com/kubernetes-sigs/reference-docs/blob/master/gen-resourcesdocs/config/v1.20/toc.yaml)
71+
- each page displays associated resources at the first level ; for example: Pod, PodSpec, PodStatus, PodList
72+
- most resource pages inline relevant definitions ; the exceptions are when those definitions are common to several resources, or are too complex to be displayed inline. With the old approach, you had to follow a hyperlink to read each extra detail.
73+
- some widely used definitions, such as `ObjectMeta`, are documented in a specific page
74+
- required fields are indicated, and placed first
75+
- fields of a resource can be categorized and ordered, with the help of a [`fields.yaml` file](https://github.com/kubernetes-sigs/reference-docs/blob/master/gen-resourcesdocs/config/v1.20/fields.yaml)
76+
- `map` fields are indicated. For example the `.spec.nodeSelector` for a `Pod` is `map[string]string`, instead of `object`, using the value of `x-kubernetes-list-type`
77+
- patch strategies are indicated
78+
- `apiVersion` and `kind` display the value, not the `string` type
79+
- At the top of a reference page, the page displays the Go import necessary to use these resources from a Go program.
80+
81+
The work is currently on hold pending the 1.20 release. When the release finishes and the work is integrated, the API reference will be available at https://kubernetes.io/docs/reference/.
82+
83+
### Future Work
84+
85+
There are points to improve, particularly:
86+
87+
- Some Kubernetes resources are deeply nested. Inlining the definition of these resources makes them difficult to understand.
88+
- The created `shortcode` uses the URL of the page to reference a Resource page. It would be easier for documentarians if they could reference a Resource by its group and name.
89+
90+
## Appreciation
91+
92+
I would like to thank my mentor [Zach Corleissen](https://github.com/zacharysarah) and the lead writers [Karen Bradshaw](https://github.com/kbhawkey), [Celeste Horgan](https://github.com/celestehorgan), [Tim Bannister](https://github.com/sftim) and [Qiming Teng](https://github.com/tengqm) who supervised me during all the season. They all have been very encouraging and gave me tons of great advice.

content/en/docs/concepts/cluster-administration/logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ default rotation is configured to take place when log file exceeds 10MB.
8080

8181
As an example, you can find detailed information about how `kube-up.sh` sets
8282
up logging for COS image on GCP in the corresponding
83-
[script](https://github.com/kubernetes/kubernetes/blob/{{< param "githubbranch" >}}/cluster/gce/gci/configure-helper.sh)
83+
[script](https://github.com/kubernetes/kubernetes/blob/{{< param "githubbranch" >}}/cluster/gce/gci/configure-helper.sh).
8484

8585
When you run [`kubectl logs`](/docs/reference/generated/kubectl/kubectl-commands#logs) as in
8686
the basic logging example, the kubelet on the node handles the request and

content/en/docs/concepts/cluster-administration/networking.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ to containers. If your job previously ran in a VM, your VM had an IP and could
5858
talk to other VMs in your project. This is the same basic model.
5959

6060
Kubernetes IP addresses exist at the `Pod` scope - containers within a `Pod`
61-
share their network namespaces - including their IP address. This means that
62-
containers within a `Pod` can all reach each other's ports on `localhost`. This
63-
also means that containers within a `Pod` must coordinate port usage, but this
64-
is no different from processes in a VM. This is called the "IP-per-pod" model.
61+
share their network namespaces - including their IP address and MAC address.
62+
This means that containers within a `Pod` can all reach each other's ports on
63+
`localhost`. This also means that containers within a `Pod` must coordinate port
64+
usage, but this is no different from processes in a VM. This is called the
65+
"IP-per-pod" model.
6566

6667
How this is implemented is a detail of the particular container runtime in use.
6768

content/en/docs/concepts/storage/persistent-volumes.md

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -308,28 +308,37 @@ If expanding underlying storage fails, the cluster administrator can manually re
308308

309309
## Types of Persistent Volumes
310310

311-
PersistentVolume types are implemented as plugins. Kubernetes currently supports the following plugins:
312-
313-
* GCEPersistentDisk
314-
* AWSElasticBlockStore
315-
* AzureFile
316-
* AzureDisk
317-
* CSI
318-
* FC (Fibre Channel)
319-
* FlexVolume
320-
* Flocker
321-
* NFS
322-
* iSCSI
323-
* RBD (Ceph Block Device)
324-
* CephFS
325-
* Cinder (OpenStack block storage)
326-
* Glusterfs
327-
* VsphereVolume
328-
* Quobyte Volumes
329-
* HostPath (Single node testing only -- local storage is not supported in any way and WILL NOT WORK in a multi-node cluster)
330-
* Portworx Volumes
331-
* ScaleIO Volumes
332-
* StorageOS
311+
PersistentVolume types are implemented as plugins. Kubernetes currently supports the following plugins:
312+
313+
* [`awsElasticBlockStore`](/docs/concepts/storage/volumes/#awselasticblockstore) - AWS Elastic Block Store (EBS)
314+
* [`azureDisk`](/docs/concepts/sotrage/volumes/#azuredisk) - Azure Disk
315+
* [`azureFile`](/docs/concepts/storage/volumes/#azurefile) - Azure File
316+
* [`cephfs`](/docs/concepts/storage/volumes/#cephfs) - CephFS volume
317+
* [`cinder`](/docs/concepts/storage/volumes/#cinder) - Cinder (OpenStack block storage)
318+
(**deprecated**)
319+
* [`csi`](/docs/concepts/storage/volumes/#csi) - Container Storage Interface (CSI)
320+
* [`fc`](/docs/concepts/storage/volumes/#fc) - Fibre Channel (FC) storage
321+
* [`flexVolume`](/docs/concepts/storage/volumes/#flexVolume) - FlexVolume
322+
* [`flocker`](/docs/concepts/storage/volumes/#flocker) - Flocker storage
323+
* [`gcePersistentDisk`](/docs/concepts/storage/volumes/#gcepersistentdisk) - GCE Persistent Disk
324+
* [`glusterfs`](/docs/concepts/storage/volumes/#glusterfs) - Glusterfs volume
325+
* [`hostPath`](/docs/concepts/storage/volumes/#hostpath) - HostPath volume
326+
(for single node testing only; WILL NOT WORK in a multi-node cluster;
327+
consider using `local` volume instead)
328+
* [`iscsi`](/docs/concepts/storage/volumes/#iscsi) - iSCSI (SCSI over IP) storage
329+
* [`local`](/docs/concepts/storage/volumes/#local) - local storage devices
330+
mounted on nodes.
331+
* [`nfs`](/docs/concepts/storage/volumes/#nfs) - Network File System (NFS) storage
332+
* `photonPersistentDisk` - Photon controller persistent disk.
333+
(This volume type no longer works since the removal of the corresponding
334+
cloud provider.)
335+
* [`portworxVolume`](/docs/concepts/storage/volumes/#portworxvolume) - Portworx volume
336+
* [`quobyte`](/docs/concepts/storage/volumes/#quobyte) - Quobyte volume
337+
* [`rbd`](/docs/concepts/storage/volumes/#rbd) - Rados Block Device (RBD) volume
338+
* [`scaleIO`](/docs/concepts/storage/volumes/#scaleio) - ScaleIO volume
339+
(**deprecated**)
340+
* [`storageos`](/docs/concepts/storage/volumes/#storageos) - StorageOS volume
341+
* [`vsphereVolume`](/docs/concepts/storage/volumes/#vspherevolume) - vSphere VMDK volume
333342

334343
## Persistent Volumes
335344

content/en/docs/concepts/workloads/controllers/daemonset.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ When the two are specified the result is ANDed.
8787

8888
If the `.spec.selector` is specified, it must match the `.spec.template.metadata.labels`. Config with these not matching will be rejected by the API.
8989

90-
Also you should not normally create any Pods whose labels match this selector, either directly, via
91-
another DaemonSet, or via another workload resource such as ReplicaSet. Otherwise, the DaemonSet
92-
{{< glossary_tooltip term_id="controller" >}} will think that those Pods were created by it.
93-
Kubernetes will not stop you from doing this. One case where you might want to do this is manually
94-
create a Pod with a different value on a node for testing.
95-
9690
### Running Pods on select Nodes
9791

9892
If you specify a `.spec.template.spec.nodeSelector`, then the DaemonSet controller will

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,10 @@ Each feature gate is designed for enabling/disabling a specific feature:
419419
See [Raw Block Volume Support](/docs/concepts/storage/persistent-volumes/#raw-block-volume-support)
420420
for more details.
421421
- `BoundServiceAccountTokenVolume`: Migrate ServiceAccount volumes to use a projected volume consisting of a
422-
ServiceAccountTokenVolumeProjection.
423-
Check [Service Account Token Volumes](https://git.k8s.io/community/contributors/design-proposals/storage/svcacct-token-volume-source.md)
422+
ServiceAccountTokenVolumeProjection. Cluster admins can use metric `serviceaccount_stale_tokens_total` to
423+
monitor workloads that are depending on the extended tokens. If there are no such workloads, turn off
424+
extended tokens by starting `kube-apiserver` with flag `--service-account-extend-token-expiration=false`.
425+
Check [Bound Service Account Tokens](https://github.com/kubernetes/enhancements/blob/master/keps/sig-auth/1205-bound-service-account-tokens/README.md)
424426
for more details.
425427
- `ConfigurableFSGroupPolicy`: Allows user to configure volume permission change policy for fsGroups when mounting a volume in a Pod. See [Configure volume permission and ownership change policy for Pods](/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods) for more details.
426428
- `CronJobControllerV2`: Use an alternative implementation of the {{< glossary_tooltip text="CronJob" term_id="cronjob" >}} controller. Otherwise, version 1 of the same controller is selected. The version 2 controller provides experimental performance improvements.

content/en/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,17 @@ approve node _serving_ certificates for [security
415415
reasons](https://github.com/kubernetes/community/pull/1982). To use
416416
`RotateKubeletServerCertificate` operators need to run a custom approving
417417
controller, or manually approve the serving certificate requests.
418+
419+
A deployment-specific approval process for kubelet serving certificates should typically only approve CSRs which:
420+
421+
1. are requested by nodes (ensure the `spec.username` field is of the form
422+
`system:node:<nodeName>` and `spec.groups` contains `system:nodes`)
423+
2. request usages for a serving certificate (ensure `spec.usages` contains `server auth`,
424+
optionally contains `digital signature` and `key encipherment`, and contains no other usages)
425+
3. only have IP and DNS subjectAltNames that belong to the requesting node,
426+
and have no URI and Email subjectAltNames (parse the x509 Certificate Signing Request
427+
in `spec.request` to verify `subjectAltNames`)
428+
418429
{{< /note >}}
419430

420431
## Other authenticating components

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ kubectl run nginx --image=nginx # Run pod nginx and write it
311311
kubectl attach my-pod -i # Attach to Running Container
312312
kubectl port-forward my-pod 5000:6000 # Listen on port 5000 on the local machine and forward to port 6000 on my-pod
313313
kubectl exec my-pod -- ls / # Run command in existing pod (1 container case)
314+
kubectl exec --stdin --tty my-pod -- /bin/sh # Interactive shell access to a running pod (1 container case)
314315
kubectl exec my-pod -c my-container -- ls / # Run command in existing pod (multi-container case)
315316
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
316317
```

0 commit comments

Comments
 (0)