diff --git a/README-de.md b/README-de.md index c901fdde65..75b56c635b 100644 --- a/README-de.md +++ b/README-de.md @@ -3,13 +3,13 @@ [![Build Status](https://api.travis-ci.org/kubernetes/website.svg?branch=master)](https://travis-ci.org/kubernetes/website) [![GitHub release](https://img.shields.io/github/release/kubernetes/website.svg)](https://github.com/kubernetes/website/releases/latest) -Herzlich willkommen! Dieses Repository enthält alle Assets, die zur Erstellung der [Kubernetes-Website und Dokumentation](https://kubernetes.io/) erforderlich sind. Wir freuen uns sehr, dass Sie dazu beitragen wollen! +Herzlich Willkommen! Dieses Repository enthält alle Assets, die zur Erstellung der [Kubernetes-Website und Dokumentation](https://kubernetes.io/) erforderlich sind. Wir freuen uns sehr, dass Sie dazu beitragen wollen! ## Beiträge zur Dokumentation -Sie können auf die Schaltfläche **Fork** im oberen rechten Bereich des Bildschirms klicken, um eine Kopie dieses Repositorys in Ihrem GitHub-Konto zu erstellen. Diese Kopie wird als *Fork* bezeichnet. Nehmen Sie die gewünschten Änderungen an Ihrem Fork vor. Wenn Sie bereit sind, diese Änderungen an uns zu senden, gehen Sie zu Ihrem Fork und erstellen Sie eine neue Pull-Anforderung, um uns darüber zu informieren. +Sie können auf die Schaltfläche **Fork** im oberen rechten Bereich des Bildschirms klicken, um eine Kopie dieses Repositorys in Ihrem GitHub-Konto zu erstellen. Diese Kopie wird als *Fork* bezeichnet. Nehmen Sie die gewünschten Änderungen an Ihrem Fork vor. Wenn Sie bereit sind, diese Änderungen an uns zu senden, gehen Sie zu Ihrem Fork und erstellen Sie eine neue Pull-Request, um uns darüber zu informieren. -Sobald Ihre Pull-Anfrage erstellt wurde, übernimmt ein Rezensent von Kubernetes die Verantwortung für klares, umsetzbares Feedback. Als Eigentümer des Pull-Request **liegt es in Ihrer Verantwortung Ihren Pull-Reqest entsprechend des Feedbacks, dass Sie vom Kubernetes-Reviewer erhalten haben abzuändern.** Beachten Sie auch, dass Sie am Ende mehr als einen Rezensenten von Kubernetes erhalten, der Ihnen Feedback gibt, oder dass Sie Rückmeldungen von einem Rezensenten von Kubernetes erhalten, der sich von demjenigen unterscheidet, der ursprünglich für das Feedback zugewiesen wurde. In einigen Fällen kann es vorkommen, dass einer Ihrer Prüfer bei Bedarf eine technische Überprüfung von einem [Kubernetes Tech-Reviewer](https://github.com/kubernetes/website/wiki/tech-reviewers) anfordert. Reviewer geben ihr Bestes, um zeitnah Feedback zu geben, die Antwortzeiten können jedoch je nach den Umständen variieren. +Sobald Ihre Pull-Request erstellt wurde, übernimmt ein Rezensent von Kubernetes die Verantwortung für klares, umsetzbares Feedback. Als Eigentümer des Pull-Request **liegt es in Ihrer Verantwortung Ihre Pull-Request entsprechend des Feedbacks, welches Sie vom Kubernetes-Reviewer erhalten haben, abzuändern.** Beachten Sie auch, dass Sie am Ende mehr als einen Rezensenten von Kubernetes erhalten, der Ihnen Feedback gibt, oder dass Sie Rückmeldungen von einem Rezensenten von Kubernetes erhalten, der sich von demjenigen unterscheidet, der ursprünglich für das Feedback zugewiesen wurde. In einigen Fällen kann es vorkommen, dass einer Ihrer Prüfer bei Bedarf eine technische Überprüfung von einem [Kubernetes Tech-Reviewer](https://github.com/kubernetes/website/wiki/tech-reviewers) anfordert. Reviewer geben ihr Bestes, um zeitnah Feedback zu geben, die Antwortzeiten können jedoch je nach den Umständen variieren. Weitere Informationen zum Beitrag zur Kubernetes-Dokumentation finden Sie unter: @@ -28,14 +28,14 @@ Die Betreuer der deutschen Lokalisierung erreichen Sie unter: * Max Körbächer ([@mkorbi](https://github.com/mkorbi)) * [Slack Kanal](https://kubernetes.slack.com/messages/kubernetes-docs-de) -## Site lokal mit Docker ausführen +## Website lokal mit Docker ausführen -Um die Kubernetes-Website lokal laufen zu lassen, empfiehlt es sich, ein spezielles [Docker](https://docker.com) Image auszuführen, das den statischen Site-Generator [Hugo](https://gohugo.io) enthält. +Um die Kubernetes-Website lokal laufen zu lassen, empfiehlt es sich, ein spezielles [Docker](https://docker.com) Image auszuführen, das den statischen Website-Generator [Hugo](https://gohugo.io) enthält. > Unter Windows benötigen Sie einige weitere Tools, die Sie mit [Chocolatey](https://chocolatey.org) installieren können. `choco install make` -> Wenn Sie die Website lieber lokal ohne Docker ausführen möchten, finden Sie weitere Informationen unter [Website lokal mit Hugo ausführen](#Die-Site-lokal-mit-Hugo-ausführen). +> Wenn Sie die Website lieber lokal ohne Docker ausführen möchten, finden Sie weitere Informationen unter [Website lokal mit Hugo ausführen](#Die-Website-lokal-mit-Hugo-ausführen). Das benötigte [Docsy Hugo theme](https://github.com/google/docsy#readme) muss als git submodule installiert werden: @@ -50,26 +50,26 @@ Wenn Sie Docker [installiert](https://www.docker.com/get-started) haben, erstell make container-image ``` -Nachdem das Image erstellt wurde, können Sie die Site lokal ausführen: +Nachdem das Image erstellt wurde, können Sie die Website lokal öffnen: ```bash make container-serve ``` -Öffnen Sie Ihren Browser unter http://localhost:1313, um die Site anzuzeigen. Wenn Sie Änderungen an den Quelldateien vornehmen, aktualisiert Hugo die Site und erzwingt eine Browseraktualisierung. +Öffnen Sie Ihren Browser unter http://localhost:1313, um die Website anzuzeigen. Wenn Sie Änderungen an den Quelldateien vornehmen, aktualisiert Hugo die Website und erzwingt eine Browseraktualisierung. -## Die Site lokal mit Hugo ausführen +## Die Website lokal mit Hugo ausführen Hugo-Installationsanweisungen finden Sie in der [offiziellen Hugo-Dokumentation](https://gohugo.io/getting-started/installing/). Stellen Sie sicher, dass Sie die Hugo-Version installieren, die in der Umgebungsvariablen `HUGO_VERSION` in der Datei [`netlify.toml`](netlify.toml#L9) angegeben ist. -Das benötigte [Docsy Hugo theme](https://github.com/google/docsy#readme) muss als git submodule installiert werden: +Das benötigte [Docsy Hugo-Theme](https://github.com/google/docsy#readme) muss als git submodule installiert werden: ``` #Füge das Docsy submodule hinzu git submodule update --init --recursive --depth 1 ``` -So führen Sie die Site lokal aus, wenn Sie Hugo installiert haben: +So führen Sie die Website lokal aus, wenn Sie Hugo installiert haben: ```bash # Installieren der JavaScript Abhängigkeiten @@ -77,7 +77,7 @@ npm ci make serve ``` -Dadurch wird der lokale Hugo-Server an Port 1313 gestartet. Öffnen Sie Ihren Browser unter http://localhost:1313, um die Site anzuzeigen. Wenn Sie Änderungen an den Quelldateien vornehmen, aktualisiert Hugo die Site und erzwingt eine Browseraktualisierung. +Dadurch wird der lokale Hugo-Server an Port 1313 gestartet. Öffnen Sie Ihren Browser unter http://localhost:1313, um die Website anzuzeigen. Wenn Sie Änderungen an den Quelldateien vornehmen, aktualisiert Hugo die Website und erzwingt eine Browseraktualisierung. ## Community, Diskussion, Beteiligung und Unterstützung @@ -94,4 +94,4 @@ Die Teilnahme an der Kubernetes-Community unterliegt dem [Kubernetes-Verhaltensk ## Vielen Dank! -Kubernetes lebt vom Community Engagement und wir freuen uns sehr über Ihre Beiträge zu unserer Website und unserer Dokumentation! +Kubernetes lebt vom Community-Engagement und wir freuen uns sehr über Ihre Beiträge zu unserer Website und unserer Dokumentation! diff --git a/assets/scss/_custom.scss b/assets/scss/_custom.scss index 9cf126a9e0..d46bac0924 100644 --- a/assets/scss/_custom.scss +++ b/assets/scss/_custom.scss @@ -329,6 +329,11 @@ main { .td-content>table td { word-break: break-word; } + + table.no-word-break td, + table.no-word-break code { + word-break: normal; + } } @@ -396,8 +401,8 @@ body { } .deprecation-warning, .pageinfo.deprecation-warning { - padding: 20px; - margin: 20px 0; + padding: clamp(10px, 2vmin, 20px); + margin: clamp(10px, 1vh, 20px) 0; background-color: #faf5b6; color: #000; } @@ -411,6 +416,9 @@ body.td-home .deprecation-warning, body.td-blog .deprecation-warning, body.td-do border-radius: 3px; } +.deprecation-warning p:only-child { + margin-bottom: 0; +} .td-documentation .td-content > .highlight { max-width: initial; diff --git a/content/en/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md b/content/en/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md index 983d7ba31e..6fb460acfb 100644 --- a/content/en/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md +++ b/content/en/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md @@ -3,6 +3,7 @@ layout: blog title: "Kubernetes 1.17: Stability" date: 2019-12-09T13:00:00-08:00 slug: kubernetes-1-17-release-announcement +evergreen: true --- **Authors:** [Kubernetes 1.17 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.17/release_team.md) diff --git a/content/en/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md b/content/en/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md index d4fb5dc7df..a65924b174 100644 --- a/content/en/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md +++ b/content/en/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md @@ -3,6 +3,7 @@ layout: blog title: 'Kubernetes 1.18: Fit & Finish' date: 2020-03-25 slug: kubernetes-1-18-release-announcement +evergreen: true --- **Authors:** [Kubernetes 1.18 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.18/release_team.md) diff --git a/content/en/blog/_posts/2020-08-26-kubernetes-release-1.19.md b/content/en/blog/_posts/2020-08-26-kubernetes-release-1.19.md index 6f7a4c4096..39559ffe4c 100644 --- a/content/en/blog/_posts/2020-08-26-kubernetes-release-1.19.md +++ b/content/en/blog/_posts/2020-08-26-kubernetes-release-1.19.md @@ -3,6 +3,7 @@ layout: blog title: 'Kubernetes 1.19: Accentuate the Paw-sitive' date: 2020-08-26 slug: kubernetes-release-1.19-accentuate-the-paw-sitive +evergreen: true --- **Authors:** [Kubernetes 1.19 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.19/release_team.md) diff --git a/content/en/blog/_posts/2020-09-03-warnings/index.md b/content/en/blog/_posts/2020-09-03-warnings/index.md index 50576c0329..5d34fb11cf 100644 --- a/content/en/blog/_posts/2020-09-03-warnings/index.md +++ b/content/en/blog/_posts/2020-09-03-warnings/index.md @@ -3,9 +3,10 @@ layout: blog title: "Warning: Helpful Warnings Ahead" date: 2020-09-03 slug: warnings +evergreen: true --- -**Author**: Jordan Liggitt (Google) +**Author**: [Jordan Liggitt](https://github.com/liggitt) (Google) As Kubernetes maintainers, we're always looking for ways to improve usability while preserving compatibility. As we develop features, triage bugs, and answer support questions, we accumulate information that would be helpful for Kubernetes users to know. @@ -327,7 +328,3 @@ A couple areas we're looking at next are warning about [known problematic values we cannot reject outright for compatibility reasons, and warning about use of deprecated fields or field values (like selectors using beta os/arch node labels, [deprecated in v1.14](/docs/reference/labels-annotations-taints/#beta-kubernetes-io-arch-deprecated)). I'm excited to see progress in this area, continuing to make it easier to use Kubernetes. - ---- - -_[Jordan Liggitt](https://twitter.com/liggitt) is a software engineer at Google, and helps lead Kubernetes authentication, authorization, and API efforts._ \ No newline at end of file diff --git a/content/en/blog/_posts/2020-12-08-kubernetes-release-1.20.md b/content/en/blog/_posts/2020-12-08-kubernetes-release-1.20.md index deb459c4be..8eb382cac1 100644 --- a/content/en/blog/_posts/2020-12-08-kubernetes-release-1.20.md +++ b/content/en/blog/_posts/2020-12-08-kubernetes-release-1.20.md @@ -3,6 +3,7 @@ layout: blog title: 'Kubernetes 1.20: The Raddest Release' date: 2020-12-08 slug: kubernetes-1-20-release-announcement +evergreen: true --- **Authors:** [Kubernetes 1.20 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.20/release_team.md) diff --git a/content/en/blog/_posts/2021-04-08-kubernetes-release-1.21.md b/content/en/blog/_posts/2021-04-08-kubernetes-release-1.21.md index ed0da32f25..b22eeeb027 100644 --- a/content/en/blog/_posts/2021-04-08-kubernetes-release-1.21.md +++ b/content/en/blog/_posts/2021-04-08-kubernetes-release-1.21.md @@ -3,6 +3,7 @@ layout: blog title: 'Kubernetes 1.21: Power to the Community' date: 2021-04-08 slug: kubernetes-1-21-release-announcement +evergreen: true --- **Authors:** [Kubernetes 1.21 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.21/release-team.md) diff --git a/content/en/blog/_posts/2021-08-04-kubernetes-release-1.22.md b/content/en/blog/_posts/2021-08-04-kubernetes-release-1.22.md index 9a196f7fba..4189d1a4c8 100644 --- a/content/en/blog/_posts/2021-08-04-kubernetes-release-1.22.md +++ b/content/en/blog/_posts/2021-08-04-kubernetes-release-1.22.md @@ -3,6 +3,7 @@ layout: blog title: 'Kubernetes 1.22: Reaching New Peaks' date: 2021-08-04 slug: kubernetes-1-22-release-announcement +evergreen: true --- **Authors:** [Kubernetes 1.22 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.22/release-team.md) diff --git a/content/en/blog/_posts/2021-08-30-volume-populators-alpha.md b/content/en/blog/_posts/2021-08-30-volume-populators-alpha.md index 4f3a408584..a632415f50 100644 --- a/content/en/blog/_posts/2021-08-30-volume-populators-alpha.md +++ b/content/en/blog/_posts/2021-08-30-volume-populators-alpha.md @@ -96,15 +96,16 @@ out. First install the volume-data-source-validator controller. ```terminal -kubectl apply -f https://github.com/kubernetes-csi/volume-data-source-validator/blob/master/deploy/kubernetes/rbac-data-source-validator.yaml -kubectl apply -f https://github.com/kubernetes-csi/volume-data-source-validator/blob/master/deploy/kubernetes/setup-data-source-validator.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/volume-data-source-validator/master/client/config/crd/populator.storage.k8s.io_volumepopulators.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/volume-data-source-validator/master/deploy/kubernetes/rbac-data-source-validator.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/volume-data-source-validator/master/deploy/kubernetes/setup-data-source-validator.yaml ``` Next install the example populator. ```terminal -kubectl apply -f https://github.com/kubernetes-csi/lib-volume-populator/blob/master/example/hello-populator/crd.yaml -kubectl apply -f https://github.com/kubernetes-csi/lib-volume-populator/blob/master/example/hello-populator/deploy.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/lib-volume-populator/master/example/hello-populator/crd.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/lib-volume-populator/master/example/hello-populator/deploy.yaml ``` Create an instance of the `Hello` CR, with some text. diff --git a/content/en/blog/_posts/2021-12-07-kubernetes-release-1.23.md b/content/en/blog/_posts/2021-12-07-kubernetes-release-1.23.md index 32336dd2d8..f0bce232dd 100644 --- a/content/en/blog/_posts/2021-12-07-kubernetes-release-1.23.md +++ b/content/en/blog/_posts/2021-12-07-kubernetes-release-1.23.md @@ -3,6 +3,7 @@ layout: blog title: 'Kubernetes 1.23: The Next Frontier' date: 2021-12-07 slug: kubernetes-1-23-release-announcement +evergreen: true --- **Authors:** [Kubernetes 1.23 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.23/release-team.md) diff --git a/content/en/docs/concepts/architecture/nodes.md b/content/en/docs/concepts/architecture/nodes.md index 74e81092ae..6946a6d706 100644 --- a/content/en/docs/concepts/architecture/nodes.md +++ b/content/en/docs/concepts/architecture/nodes.md @@ -93,7 +93,7 @@ For self-registration, the kubelet is started with the following options: No-op if `register-node` is false. - `--node-ip` - IP address of the node. - `--node-labels` - {{< glossary_tooltip text="Labels" term_id="label" >}} to add when registering the node in the cluster (see label restrictions enforced by the [NodeRestriction admission plugin](/docs/reference/access-authn-authz/admission-controllers/#noderestriction)). - - `--node-status-update-frequency` - Specifies how often kubelet posts node status to master. + - `--node-status-update-frequency` - Specifies how often kubelet posts its node status to the API server. When the [Node authorization mode](/docs/reference/access-authn-authz/node/) and [NodeRestriction admission plugin](/docs/reference/access-authn-authz/admission-controllers/#noderestriction) are enabled, @@ -335,7 +335,7 @@ the same time: (default 0.01) per second. The reason these policies are implemented per availability zone is because one -availability zone might become partitioned from the master while the others remain +availability zone might become partitioned from the control plane while the others remain connected. If your cluster does not span multiple cloud provider availability zones, then the eviction mechanism does not take per-zone unavailability into account. diff --git a/content/en/docs/concepts/cluster-administration/logging.md b/content/en/docs/concepts/cluster-administration/logging.md index fb2d37ed58..4916548a73 100644 --- a/content/en/docs/concepts/cluster-administration/logging.md +++ b/content/en/docs/concepts/cluster-administration/logging.md @@ -57,7 +57,15 @@ The output is: ... ``` -You can use `kubectl logs --previous` to retrieve logs from a previous instantiation of a container. If your pod has multiple containers, specify which container's logs you want to access by appending a container name to the command. See the [`kubectl logs` documentation](/docs/reference/generated/kubectl/kubectl-commands#logs) for more details. +You can use `kubectl logs --previous` to retrieve logs from a previous instantiation of a container. +If your pod has multiple containers, specify which container's logs you want to access by +appending a container name to the command, with a `-c` flag, like so: + +```console +kubectl logs counter -c count +``` + +See the [`kubectl logs` documentation](/docs/reference/generated/kubectl/kubectl-commands#logs) for more details. ## Logging at the node level diff --git a/content/en/docs/concepts/configuration/secret.md b/content/en/docs/concepts/configuration/secret.md index 5f1b5e1f52..82e8a5737d 100644 --- a/content/en/docs/concepts/configuration/secret.md +++ b/content/en/docs/concepts/configuration/secret.md @@ -146,14 +146,6 @@ data: extra: YmFyCg== ``` -When creating a `Pod`, Kubernetes automatically creates a service account Secret -and automatically modifies your Pod to use this Secret. The service account token -Secret contains credentials for accessing the API. - -The automatic creation and use of API credentials can be disabled or -overridden if desired. However, if all you need to do is securely access the -API server, this is the recommended workflow. - See the [ServiceAccount](/docs/tasks/configure-pod-container/configure-service-account/) documentation for more information on how service accounts work. You can also check the `automountServiceAccountToken` field and the @@ -161,6 +153,20 @@ You can also check the `automountServiceAccountToken` field and the [`Pod`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core) for information on referencing service account from Pods. +{{< note >}} +Automatic creation of API credentials in secrets to mount into running pods +is no longer used in v1.22 and newer versions. Instead, API credentials are +obtained directly by using the [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/) API, +and are mounted into Pods using a [projected volume](/docs/reference/access-authn-authz/service-accounts-admin/#bound-service-account-token-volume). +The tokens obtained using this method have bounded lifetimes, and are automatically +invalidated when the Pod they are mounted into is deleted. + +Service account token secrets can still be [created manually](/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token) +if you need a token that never expires. +However, using the [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/) +subresource to obtain a token to access the API is recommended instead. +{{< /note >}} + ### Docker config Secrets You can use one of the following `type` values to create a Secret to diff --git a/content/en/docs/concepts/extend-kubernetes/_index.md b/content/en/docs/concepts/extend-kubernetes/_index.md index 6f43b994a1..7686666b58 100644 --- a/content/en/docs/concepts/extend-kubernetes/_index.md +++ b/content/en/docs/concepts/extend-kubernetes/_index.md @@ -39,6 +39,7 @@ Customization approaches can be broadly divided into *configuration*, which only *Configuration files* and *flags* are documented in the Reference section of the online documentation, under each binary: * [kubelet](/docs/reference/command-line-tools-reference/kubelet/) +* [kube-proxy](/docs/reference/command-line-tools-reference/kube-proxy/) * [kube-apiserver](/docs/reference/command-line-tools-reference/kube-apiserver/) * [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/) * [kube-scheduler](/docs/reference/command-line-tools-reference/kube-scheduler/). diff --git a/content/en/docs/concepts/extend-kubernetes/service-catalog.md b/content/en/docs/concepts/extend-kubernetes/service-catalog.md index 26517de9c6..8c8b1aa238 100644 --- a/content/en/docs/concepts/extend-kubernetes/service-catalog.md +++ b/content/en/docs/concepts/extend-kubernetes/service-catalog.md @@ -230,7 +230,6 @@ The following example describes how to map secret values into application enviro * If you are familiar with {{< glossary_tooltip text="Helm Charts" term_id="helm-chart" >}}, [install Service Catalog using Helm](/docs/tasks/service-catalog/install-service-catalog-using-helm/) into your Kubernetes cluster. Alternatively, you can [install Service Catalog using the SC tool](/docs/tasks/service-catalog/install-service-catalog-using-sc/). * View [sample service brokers](https://github.com/openservicebrokerapi/servicebroker/blob/master/gettingStarted.md#sample-service-brokers). * Explore the [kubernetes-sigs/service-catalog](https://github.com/kubernetes-sigs/service-catalog) project. -* View [svc-cat.io](https://svc-cat.io/docs/). diff --git a/content/en/docs/concepts/overview/components.md b/content/en/docs/concepts/overview/components.md index fb3997b283..60433f63e5 100644 --- a/content/en/docs/concepts/overview/components.md +++ b/content/en/docs/concepts/overview/components.md @@ -30,7 +30,7 @@ Control plane components can be run on any machine in the cluster. However, for simplicity, set up scripts typically start all control plane components on the same machine, and do not run user containers on this machine. See [Creating Highly Available clusters with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/) -for an example control plane setup that runs across multiple VMs. +for an example control plane setup that runs across multiple machines. ### kube-apiserver diff --git a/content/en/docs/concepts/policy/pod-security-policy.md b/content/en/docs/concepts/policy/pod-security-policy.md index 34ea1ecf3f..ea16157fcb 100644 --- a/content/en/docs/concepts/policy/pod-security-policy.md +++ b/content/en/docs/concepts/policy/pod-security-policy.md @@ -11,9 +11,13 @@ weight: 30 {{< feature-state for_k8s_version="v1.21" state="deprecated" >}} -PodSecurityPolicy is deprecated as of Kubernetes v1.21, and will be removed in v1.25. It has been replaced by -[Pod Security Admission](/docs/concepts/security/pod-security-admission/). For more information on the deprecation, +{{< caution >}} +PodSecurityPolicy is deprecated as of Kubernetes v1.21, and **will be removed in v1.25**. We recommend migrating to +[Pod Security Admission](/docs/concepts/security/pod-security-admission/), or a 3rd party admission plugin. +For a migration guide, see [Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller](/docs/tasks/configure-pod-container/migrate-from-psp/). +For more information on the deprecation, see [PodSecurityPolicy Deprecation: Past, Present, and Future](/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/). +{{< /caution >}} Pod Security Policies enable fine-grained authorization of pod creation and updates. diff --git a/content/en/docs/concepts/security/overview.md b/content/en/docs/concepts/security/overview.md index 9519ef1eaf..9373e78ea9 100644 --- a/content/en/docs/concepts/security/overview.md +++ b/content/en/docs/concepts/security/overview.md @@ -123,7 +123,7 @@ Area of Concern for Containers | Recommendation | Container Vulnerability Scanning and OS Dependency Security | As part of an image build step, you should scan your containers for known vulnerabilities. Image Signing and Enforcement | Sign container images to maintain a system of trust for the content of your containers. Disallow privileged users | When constructing containers, consult your documentation for how to create users inside of the containers that have the least level of operating system privilege necessary in order to carry out the goal of the container. -Use container runtime with stronger isolation | Select [container runtime classes](/docs/concepts/containers/runtime-class/) that provider stronger isolation +Use container runtime with stronger isolation | Select [container runtime classes](/docs/concepts/containers/runtime-class/) that provide stronger isolation ## Code diff --git a/content/en/docs/concepts/security/pod-security-admission.md b/content/en/docs/concepts/security/pod-security-admission.md index 5969d2bb5d..67b8770a84 100644 --- a/content/en/docs/concepts/security/pod-security-admission.md +++ b/content/en/docs/concepts/security/pod-security-admission.md @@ -19,7 +19,7 @@ The Kubernetes [Pod Security Standards](/docs/concepts/security/pod-security-sta different isolation levels for Pods. These standards let you define how you want to restrict the behavior of pods in a clear, consistent fashion. -As an Beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip +As a Beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip text="admission controller" term_id="admission-controller" >}}, the successor to [PodSecurityPolicies](/docs/concepts/policy/pod-security-policy/). Pod security restrictions are applied at the {{< glossary_tooltip text="namespace" term_id="namespace" >}} level when pods @@ -125,7 +125,7 @@ applied to workload resources, only to the resulting pod objects. ## Exemptions -You can define _exemptions_ from pod security enforcement in order allow the creation of pods that +You can define _exemptions_ from pod security enforcement in order to allow the creation of pods that would have otherwise been prohibited due to the policy associated with a given namespace. Exemptions can be statically configured in the [Admission Controller configuration](/docs/tasks/configure-pod-container/enforce-standards-admission-controller/#configure-the-admission-controller). diff --git a/content/en/docs/concepts/security/pod-security-standards.md b/content/en/docs/concepts/security/pod-security-standards.md index 73341e4c71..c4333c1542 100644 --- a/content/en/docs/concepts/security/pod-security-standards.md +++ b/content/en/docs/concepts/security/pod-security-standards.md @@ -52,8 +52,8 @@ fail validation. Baseline policy specification - Control - Policy + Control + Policy HostProcess diff --git a/content/en/docs/concepts/services-networking/endpoint-slices.md b/content/en/docs/concepts/services-networking/endpoint-slices.md index da8d09d9d5..cd90ecdcfd 100644 --- a/content/en/docs/concepts/services-networking/endpoint-slices.md +++ b/content/en/docs/concepts/services-networking/endpoint-slices.md @@ -147,9 +147,9 @@ In the v1 API, the per endpoint `topology` was effectively removed in favor of the dedicated fields `nodeName` and `zone`. Setting arbitrary topology fields on the `endpoint` field of an `EndpointSlice` -resource has been deprecated and is not be supported in the v1 API. Instead, -the v1 API supports setting individual `nodeName` and `zone` fields. These -fields are automatically translated between API versions. For example, the +resource has been deprecated and is not supported in the v1 API. +Instead, the v1 API supports setting individual `nodeName` and `zone` fields. +These fields are automatically translated between API versions. For example, the value of the `"topology.kubernetes.io/zone"` key in the `topology` field in the v1beta1 API is accessible as the `zone` field in the v1 API. {{< /note >}} diff --git a/content/en/docs/contribute/new-content/blogs-case-studies.md b/content/en/docs/contribute/new-content/blogs-case-studies.md index 0380bd7e2d..2b0d9f0cdd 100644 --- a/content/en/docs/contribute/new-content/blogs-case-studies.md +++ b/content/en/docs/contribute/new-content/blogs-case-studies.md @@ -83,6 +83,15 @@ To submit a blog post follow these directions: - _initial commit_ - _draft post_ - The blog team will then review your PR and give you comments on things you might need to fix. After that the bot will merge your PR and your blog post will be published. + - If the content of the blog post contains only content that is not expected to require updates to stay accurate for the reader, it can be marked as evergreen and exempted from the automatic warning about outdated content added to blog posts older than one year. + - To mark a blog post as evergreen, add this to the front matter: + + ```yaml + evergreen: true + ``` + - Examples of content that should not be marked evergreen: + - **Tutorials** that only apply to specific releases or versions and not all future versions + - References to pre-GA APIs or features ## Submit a case study diff --git a/content/en/docs/reference/_index.md b/content/en/docs/reference/_index.md index 1a9f35b2d2..021d2f840d 100644 --- a/content/en/docs/reference/_index.md +++ b/content/en/docs/reference/_index.md @@ -66,6 +66,7 @@ client libraries: * List of [ports and protocols](/docs/reference/ports-and-protocols/) that should be open on control plane and worker nodes + ## Config APIs This section hosts the documentation for "unpublished" APIs which are used to @@ -73,12 +74,12 @@ configure kubernetes components or tools. Most of these APIs are not exposed by the API server in a RESTful way though they are essential for a user or an operator to use or manage a cluster. - * [kube-apiserver configuration (v1alpha1)](/docs/reference/config-api/apiserver-config.v1alpha1/) * [kube-apiserver configuration (v1)](/docs/reference/config-api/apiserver-config.v1/) * [kube-apiserver encryption (v1)](/docs/reference/config-api/apiserver-encryption.v1/) * [kubelet configuration (v1alpha1)](/docs/reference/config-api/kubelet-config.v1alpha1/) and [kubelet configuration (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/) +* [kubelet credential providers (v1alpha1)](/docs/reference/config-api/kubelet-credentialprovider.v1alpha1/) * [kube-scheduler configuration (v1beta2)](/docs/reference/config-api/kube-scheduler-config.v1beta2/) and [kube-scheduler configuration (v1beta3)](/docs/reference/config-api/kube-scheduler-config.v1beta3/) * [kube-proxy configuration (v1alpha1)](/docs/reference/config-api/kube-proxy-config.v1alpha1/) diff --git a/content/en/docs/reference/access-authn-authz/authentication.md b/content/en/docs/reference/access-authn-authz/authentication.md index a7d5cd84d9..30e1725859 100644 --- a/content/en/docs/reference/access-authn-authz/authentication.md +++ b/content/en/docs/reference/access-authn-authz/authentication.md @@ -1144,7 +1144,9 @@ If specified, `clientKeyData` and `clientCertificateData` must both must be pres {{< /tabs >}} Optionally, the response can include the expiry of the credential formatted as a -RFC3339 timestamp. Presence or absence of an expiry has the following impact: +[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) timestamp. + +Presence or absence of an expiry has the following impact: - If an expiry is included, the bearer token and TLS credentials are cached until the expiry time is reached, or if the server responds with a 401 HTTP status code, diff --git a/content/en/docs/reference/access-authn-authz/node.md b/content/en/docs/reference/access-authn-authz/node.md index 141dc8bb61..6e7c538eb0 100644 --- a/content/en/docs/reference/access-authn-authz/node.md +++ b/content/en/docs/reference/access-authn-authz/node.md @@ -34,8 +34,8 @@ Write operations: Auth-related operations: -* read/write access to the certificationsigningrequests API for TLS bootstrapping -* the ability to create tokenreviews and subjectaccessreviews for delegated authentication/authorization checks +* read/write access to the [CertificateSigningRequests API](/docs/reference/access-authn-authz/certificate-signing-requests/) for TLS bootstrapping +* the ability to create TokenReviews and SubjectAccessReviews for delegated authentication/authorization checks In future releases, the node authorizer may add or remove permissions to ensure kubelets have the minimal set of permissions required to operate correctly. diff --git a/content/en/docs/reference/access-authn-authz/psp-to-pod-security-standards.md b/content/en/docs/reference/access-authn-authz/psp-to-pod-security-standards.md new file mode 100644 index 0000000000..468579f982 --- /dev/null +++ b/content/en/docs/reference/access-authn-authz/psp-to-pod-security-standards.md @@ -0,0 +1,275 @@ +--- +reviewers: +- tallclair +- liggitt +title: Mapping PodSecurityPolicies to Pod Security Standards +content_type: concept +weight: 95 +--- + + +The tables below enumerate the configuration parameters on +[PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/) objects, whether the field mutates +and/or validates pods, and how the configuration values map to the +[Pod Security Standards](/docs/concepts/security/pod-security-standards/). + +For each applicable parameter, the allowed values for the +[Baseline](/docs/concepts/security/pod-security-standards/#baseline) and +[Restricted](/docs/concepts/security/pod-security-standards/#restricted) profiles are listed. +Anything outside the allowed values for those profiles would fall under the +[Privileged](/docs/concepts/security/pod-security-standards/#priveleged) profile. "No opinion" +means all values are allowed under all Pod Security Standards. + +For a step-by-step migration guide, see +[Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller](/docs/tasks/configure-pod-container/migrate-from-psp/). + + + +## PodSecurityPolicy Spec + +The fields enumerated in this table are part of the `PodSecurityPolicySpec`, which is specified +under the `.spec` field path. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mapping PodSecurityPolicySpec fields to Pod Security Standards
PodSecurityPolicySpecTypePod Security Standards Equivalent
privilegedValidatingBaseline & Restricted: false / undefined / nil
defaultAddCapabilitiesMutating & ValidatingRequirements match allowedCapabilities below.
allowedCapabilitiesValidating +

Baseline: subset of

+
    +
  • AUDIT_WRITE
  • +
  • CHOWN
  • +
  • DAC_OVERRIDE
  • +
  • FOWNER
  • +
  • FSETID
  • +
  • KILL
  • +
  • MKNOD
  • +
  • NET_BIND_SERVICE
  • +
  • SETFCAP
  • +
  • SETGID
  • +
  • SETPCAP
  • +
  • SETUID
  • +
  • SYS_CHROOT
  • +
+

Restricted: empty / undefined / nil OR a list containing only NET_BIND_SERVICE +

requiredDropCapabilitiesMutating & Validating +

Baseline: no opinion

+

Restricted: must include ALL

+
volumesValidating +

Baseline: anything except

+
    +
  • hostPath
  • +
  • *
  • +
+

Restricted: subset of

+
    +
  • configMap
  • +
  • csi
  • +
  • downwardAPI
  • +
  • emptyDir
  • +
  • ephemeral
  • +
  • persistentVolumeClaim
  • +
  • projected
  • +
  • secret
  • +
+
hostNetworkValidatingBaseline & Restricted: false / undefined / nil
hostPortsValidatingBaseline & Restricted: undefined / nil / empty
hostPIDValidatingBaseline & Restricted: false / undefined / nil
hostIPCValidatingBaseline & Restricted: false / undefined / nil
seLinuxMutating & Validating +

Baseline & Restricted: + seLinux.rule is MustRunAs, with the following options

+
    +
  • user is unset ("" / undefined / nil)
  • +
  • role is unset ("" / undefined / nil)
  • +
  • type is unset or one of: container_t, container_init_t, container_kvm_t
  • +
  • level is anything
  • +
+
runAsUserMutating & Validating +

Baseline: Anything

+

Restricted: rule is MustRunAsNonRoot

+
runAsGroupMutating (MustRunAs) & Validating + No opinion +
supplementalGroupsMutating & Validating + No opinion +
fsGroupMutating & Validating + No opinion +
readOnlyRootFilesystemMutating & Validating + No opinion +
defaultAllowPrivilegeEscalationMutating + No opinion (non-validating) +
allowPrivilegeEscalationMutating & Validating +

Only mutating if set to false

+

Baseline: No opinion

+

Restricted: false

+
allowedHostPathsValidatingNo opinion (volumes takes precedence)
allowedFlexVolumesValidatingNo opinion (volumes takes precedence)
allowedCSIDriversValidatingNo opinion (volumes takes precedence)
allowedUnsafeSysctlsValidatingBaseline & Restricted: undefined / nil / empty
forbiddenSysctlsValidatingNo opinion
allowedProcMountTypes
(alpha feature)
ValidatingBaseline & Restricted: ["Default"] OR undefined / nil / empty
runtimeClass
 .defaultRuntimeClassName
MutatingNo opinion
runtimeClass
 .allowedRuntimeClassNames
ValidatingNo opinion
+ +## PodSecurityPolicy annotations + +The [annotations](/docs/concepts/overview/working-with-objects/annotations/) enumerated in this +table can be specified under `.metadata.annotations` on the PodSecurityPolicy object. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mapping PodSecurityPolicy annotations to Pod Security Standards
PSP AnnotationTypePod Security Standards Equivalent
seccomp.security.alpha.kubernetes.io
/defaultProfileName
MutatingNo opinion
seccomp.security.alpha.kubernetes.io
/allowedProfileNames
Validating +

Baseline: "runtime/default," (Trailing comma to allow unset)

+

Restricted: "runtime/default" (No trailing comma)

+

localhost/* values are also permitted for both Baseline & Restricted.

+
apparmor.security.beta.kubernetes.io
/defaultProfileName
MutatingNo opinion
apparmor.security.beta.kubernetes.io
/allowedProfileNames
Validating +

Baseline: "runtime/default," (Trailing comma to allow unset)

+

Restricted: "runtime/default" (No trailing comma)

+

localhost/* values are also permitted for both Baseline & Restricted.

+
diff --git a/content/en/docs/reference/config-api/apiserver-audit.v1.md b/content/en/docs/reference/config-api/apiserver-audit.v1.md index e817b838ae..3cca579663 100644 --- a/content/en/docs/reference/config-api/apiserver-audit.v1.md +++ b/content/en/docs/reference/config-api/apiserver-audit.v1.md @@ -19,13 +19,13 @@ auto_generated: true ## `Event` {#audit-k8s-io-v1-Event} - - **Appears in:** + - [EventList](#audit-k8s-io-v1-EventList) -Event captures all the information that can be included in an API audit log. +

Event captures all the information that can be included in an API audit log.

+ @@ -34,152 +34,134 @@ Event captures all the information that can be included in an API audit log. - - +

AuditLevel at which event was generated

+ - - +

Unique audit ID, generated for each request.

+ - - +

Stage of the request handling when this event instance was generated.

+ - - +

RequestURI is the request URI as sent by the client to a server.

+ - - +

Verb is the kubernetes verb associated with the request. +For non-resource requests, this is the lower-cased HTTP method.

+ - - +

Authenticated user information.

+ - - +

Impersonated user information.

+ - - +

Source IPs, from where the request originated and intermediate proxies.

+ - - +

UserAgent records the user agent string reported by the client. +Note that the UserAgent is provided by the client, and must not be trusted.

+ - - +

Object reference this request is targeted at. +Does not apply for List-type requests, or non-resource requests.

+ - - +For non-status type error responses, this will be auto-populated with the error Message.

+ - - +Omitted for non-resource requests. Only logged at Request Level and higher.

+ - - +at Response Level.

+ - - +

Time the request reached the apiserver.

+ - - +

Time the request reached current audit stage.

+ - - +should be short. Annotations are included in the Metadata level.

+ - -
FieldDescription
apiVersion
string
audit.k8s.io/v1
kind
string
Event
level [Required]
Level
- AuditLevel at which event was generated
auditID [Required]
-k8s.io/apimachinery/pkg/types.UID +k8s.io/apimachinery/pkg/types.UID
- Unique audit ID, generated for each request.
stage [Required]
Stage
- Stage of the request handling when this event instance was generated.
requestURI [Required]
string
- RequestURI is the request URI as sent by the client to a server.
verb [Required]
string
- Verb is the kubernetes verb associated with the request. -For non-resource requests, this is the lower-cased HTTP method.
user [Required]
authentication/v1.UserInfo
- Authenticated user information.
impersonatedUser
authentication/v1.UserInfo
- Impersonated user information.
sourceIPs
[]string
- Source IPs, from where the request originated and intermediate proxies.
userAgent
string
- UserAgent records the user agent string reported by the client. -Note that the UserAgent is provided by the client, and must not be trusted.
objectRef
ObjectReference
- Object reference this request is targeted at. -Does not apply for List-type requests, or non-resource requests.
responseStatus
meta/v1.Status
- The response status, populated even when the ResponseObject is not a Status type. +

The response status, populated even when the ResponseObject is not a Status type. For successful responses, this will only include the Code and StatusSuccess. -For non-status type error responses, this will be auto-populated with the error Message.

requestObject
-k8s.io/apimachinery/pkg/runtime.Unknown +k8s.io/apimachinery/pkg/runtime.Unknown
- API object from the request, in JSON format. The RequestObject is recorded as-is in the request +

API object from the request, in JSON format. The RequestObject is recorded as-is in the request (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or merging. It is an external versioned object type, and may not be a valid object on its own. -Omitted for non-resource requests. Only logged at Request Level and higher.

responseObject
-k8s.io/apimachinery/pkg/runtime.Unknown +k8s.io/apimachinery/pkg/runtime.Unknown
- API object returned in the response, in JSON. The ResponseObject is recorded after conversion +

API object returned in the response, in JSON. The ResponseObject is recorded after conversion to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged -at Response Level.

requestReceivedTimestamp
meta/v1.MicroTime
- Time the request reached the apiserver.
stageTimestamp
meta/v1.MicroTime
- Time the request reached current audit stage.
annotations
map[string]string
- Annotations is an unstructured key value map stored with an audit event that may be set by +

Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values -should be short. Annotations are included in the Metadata level.

@@ -187,10 +169,9 @@ should be short. Annotations are included in the Metadata level. +

EventList is a list of audit Events.

-EventList is a list of audit Events. - @@ -198,41 +179,33 @@ EventList is a list of audit Events. - - + No description provided. - - + No description provided. - -
FieldDescription
apiVersion
string
audit.k8s.io/v1
kind
string
EventList
metadata
meta/v1.ListMeta
- No description provided. -
items [Required]
[]Event
- No description provided. -
## `Policy` {#audit-k8s-io-v1-Policy} - - **Appears in:** + - [PolicyList](#audit-k8s-io-v1-PolicyList) -Policy defines the configuration of audit logging, and the rules for how different request -categories are logged. +

Policy defines the configuration of audit logging, and the rules for how different request +categories are logged.

+ @@ -241,50 +214,44 @@ categories are logged. - - +

ObjectMeta is included for interoperability with API infrastructure.

+Refer to the Kubernetes API documentation for the fields of the metadata field. - - +PolicyRules are strictly ordered.

+ - - +

OmitStages is a list of stages for which no events are created. Note that this can also +be specified per rule in which case the union of both are omitted.

+ - - +in a rule will override the global default.

+ - -
FieldDescription
apiVersion
string
audit.k8s.io/v1
kind
string
Policy
metadata
meta/v1.ObjectMeta
- ObjectMeta is included for interoperability with API infrastructure.Refer to the Kubernetes API documentation for the fields of the metadata field.
rules [Required]
[]PolicyRule
- Rules specify the audit Level a request should be recorded at. +

Rules specify the audit Level a request should be recorded at. A request may match multiple rules, in which case the FIRST matching rule is used. The default audit level is None, but can be overridden by a catch-all rule at the end of the list. -PolicyRules are strictly ordered.

omitStages
[]Stage
- OmitStages is a list of stages for which no events are created. Note that this can also -be specified per rule in which case the union of both are omitted.
omitManagedFields
bool
- OmitManagedFields indicates whether to omit the managed fields of the request +

OmitManagedFields indicates whether to omit the managed fields of the request and response bodies from being written to the API audit log. This is used as a global default - a value of 'true' will omit the managed fileds, otherwise the managed fields will be included in the API audit log. Note that this can also be specified per rule in which case the value specified -in a rule will override the global default.

@@ -292,10 +259,9 @@ in a rule will override the global default. +

PolicyList is a list of audit Policies.

-PolicyList is a list of audit Policies. - @@ -303,86 +269,71 @@ PolicyList is a list of audit Policies. - - + No description provided. - - + No description provided. - -
FieldDescription
apiVersion
string
audit.k8s.io/v1
kind
string
PolicyList
metadata
meta/v1.ListMeta
- No description provided. -
items [Required]
[]Policy
- No description provided. -
## `GroupResources` {#audit-k8s-io-v1-GroupResources} - - **Appears in:** + - [PolicyRule](#audit-k8s-io-v1-PolicyRule) -GroupResources represents resource kinds in an API group. +

GroupResources represents resource kinds in an API group.

+ - +

Group is the name of the API group that contains the resources. +The empty string represents the core API group.

+ - - +'' matches all resources and their subresources. +'pods/' matches all subresources of pods. +'*/scale' matches all scale subresources.

+

If wildcard is present, the validation rule will ensure resources do not +overlap with each other.

+

An empty list implies all resources and subresources in this API groups apply.

+ - - +An empty list implies that every instance of the resource is matched.

+ - -
FieldDescription
group
string
- Group is the name of the API group that contains the resources. -The empty string represents the core API group.
resources
[]string
- Resources is a list of resources this rule applies to. - -For example: +

Resources is a list of resources this rule applies to.

+

For example: 'pods' matches pods. 'pods/log' matches the log subresource of pods. -'∗' matches all resources and their subresources. -'pods/∗' matches all subresources of pods. -'∗/scale' matches all scale subresources. - -If wildcard is present, the validation rule will ensure resources do not -overlap with each other. - -An empty list implies all resources and subresources in this API groups apply.

resourceNames
[]string
- ResourceNames is a list of resource instance names that the policy matches. +

ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. -An empty list implies that every instance of the resource is matched.

@@ -390,216 +341,189 @@ An empty list implies that every instance of the resource is matched. (Alias of `string`) - **Appears in:** + - [Event](#audit-k8s-io-v1-Event) + - [PolicyRule](#audit-k8s-io-v1-PolicyRule) -Level defines the amount of information logged during auditing +

Level defines the amount of information logged during auditing

+ ## `ObjectReference` {#audit-k8s-io-v1-ObjectReference} - - **Appears in:** + - [Event](#audit-k8s-io-v1-Event) -ObjectReference contains enough information to let you inspect or modify the referred object. +

ObjectReference contains enough information to let you inspect or modify the referred object.

+ - + No description provided. - - + No description provided. - - + No description provided. - - + No description provided. - - +

APIGroup is the name of the API group that contains the referred object. +The empty string represents the core API group.

+ - - +

APIVersion is the version of the API group that contains the referred object.

+ - - + No description provided. - - + No description provided. - -
FieldDescription
resource
string
- No description provided. -
namespace
string
- No description provided. -
name
string
- No description provided. -
uid
-k8s.io/apimachinery/pkg/types.UID +k8s.io/apimachinery/pkg/types.UID
- No description provided. -
apiGroup
string
- APIGroup is the name of the API group that contains the referred object. -The empty string represents the core API group.
apiVersion
string
- APIVersion is the version of the API group that contains the referred object.
resourceVersion
string
- No description provided. -
subresource
string
- No description provided. -
## `PolicyRule` {#audit-k8s-io-v1-PolicyRule} - - **Appears in:** + - [Policy](#audit-k8s-io-v1-Policy) -PolicyRule maps requests based off metadata to an audit Level. -Requests must match the rules of every field (an intersection of rules). +

PolicyRule maps requests based off metadata to an audit Level. +Requests must match the rules of every field (an intersection of rules).

+ - +

The Level that requests matching this rule are recorded at.

+ - - +

The users (by authenticated user name) this rule applies to. +An empty list implies every user.

+ - - +An empty list implies every user group.

+ - - +

The verbs that match this rule. +An empty list implies every verb.

+ - - +

Resources that this rule matches. An empty list implies all kinds in all API groups.

+ - - +

Namespaces that this rule matches. +The empty string "" matches non-namespaced resources. +An empty list implies every namespace.

+ - - +"/metrics" - Log requests for apiserver metrics +"/healthz" - Log all health checks

+ - - +An empty list means no restrictions will apply.

+ - - +Policy.OmitManagedFields will stand. + + - -
FieldDescription
level [Required]
Level
- The Level that requests matching this rule are recorded at.
users
[]string
- The users (by authenticated user name) this rule applies to. -An empty list implies every user.
userGroups
[]string
- The user groups this rule applies to. A user is considered matching +

The user groups this rule applies to. A user is considered matching if it is a member of any of the UserGroups. -An empty list implies every user group.

verbs
[]string
- The verbs that match this rule. -An empty list implies every verb.
resources
[]GroupResources
- Resources that this rule matches. An empty list implies all kinds in all API groups.
namespaces
[]string
- Namespaces that this rule matches. -The empty string "" matches non-namespaced resources. -An empty list implies every namespace.
nonResourceURLs
[]string
- NonResourceURLs is a set of URL paths that should be audited. -∗s are allowed, but only as the full, final step in the path. +

NonResourceURLs is a set of URL paths that should be audited. +s are allowed, but only as the full, final step in the path. Examples: - "/metrics" - Log requests for apiserver metrics - "/healthz∗" - Log all health checks

omitStages
[]Stage
- OmitStages is a list of stages for which no events are created. Note that this can also +

OmitStages is a list of stages for which no events are created. Note that this can also be specified policy wide in which case the union of both are omitted. -An empty list means no restrictions will apply.

omitManagedFields
bool
- OmitManagedFields indicates whether to omit the managed fields of the request -and response bodies from being written to the API audit log. -- a value of 'true' will drop the managed fields from the API audit log -- a value of 'false' indicates that the managed fileds should be included - in the API audit log +

OmitManagedFields indicates whether to omit the managed fields of the request +and response bodies from being written to the API audit log.

+
    +
  • a value of 'true' will drop the managed fields from the API audit log
  • +
  • a value of 'false' indicates that the managed fileds should be included +in the API audit log Note that the value, if specified, in this rule will override the global default If a value is not specified then the global default specified in -Policy.OmitManagedFields will stand.
@@ -607,14 +531,17 @@ Policy.OmitManagedFields will stand. (Alias of `string`) - **Appears in:** + - [Event](#audit-k8s-io-v1-Event) + - [Policy](#audit-k8s-io-v1-Policy) + - [PolicyRule](#audit-k8s-io-v1-PolicyRule) -Stage defines the stages in request handling that audit events may be generated. +

Stage defines the stages in request handling that audit events may be generated.

+ diff --git a/content/en/docs/reference/config-api/apiserver-config.v1.md b/content/en/docs/reference/config-api/apiserver-config.v1.md index 7767a4e406..dcb903e848 100644 --- a/content/en/docs/reference/config-api/apiserver-config.v1.md +++ b/content/en/docs/reference/config-api/apiserver-config.v1.md @@ -4,7 +4,8 @@ content_type: tool-reference package: apiserver.config.k8s.io/v1 auto_generated: true --- -Package v1 is the v1 version of the API. +

Package v1 is the v1 version of the API.

+ ## Resource Types @@ -17,10 +18,9 @@ Package v1 is the v1 version of the API. +

AdmissionConfiguration provides versioned configuration for admission controllers.

-AdmissionConfiguration provides versioned configuration for admission controllers. - @@ -28,64 +28,57 @@ AdmissionConfiguration provides versioned configuration for admission controller - - +

Plugins allows specifying a configuration per admission control plugin.

+ - -
FieldDescription
apiVersion
string
apiserver.config.k8s.io/v1
kind
string
AdmissionConfiguration
plugins
[]AdmissionPluginConfiguration
- Plugins allows specifying a configuration per admission control plugin.
## `AdmissionPluginConfiguration` {#apiserver-config-k8s-io-v1-AdmissionPluginConfiguration} - - **Appears in:** + - [AdmissionConfiguration](#apiserver-config-k8s-io-v1-AdmissionConfiguration) -AdmissionPluginConfiguration provides the configuration for a single plug-in. +

AdmissionPluginConfiguration provides the configuration for a single plug-in.

+ - +

Name is the name of the admission controller. +It must match the registered admission plugin name.

+ - - +

Path is the path to a configuration file that contains the plugin's +configuration

+ - - +

Configuration is an embedded configuration object to be used as the plugin's +configuration. If present, it will be used instead of the path to the configuration file.

+ - -
FieldDescription
name [Required]
string
- Name is the name of the admission controller. -It must match the registered admission plugin name.
path
string
- Path is the path to a configuration file that contains the plugin's -configuration
configuration
-k8s.io/apimachinery/pkg/runtime.Unknown +k8s.io/apimachinery/pkg/runtime.Unknown
- Configuration is an embedded configuration object to be used as the plugin's -configuration. If present, it will be used instead of the path to the configuration file.
diff --git a/content/en/docs/reference/config-api/apiserver-webhookadmission.v1.md b/content/en/docs/reference/config-api/apiserver-webhookadmission.v1.md index cecebc3d10..f0c6a5b953 100644 --- a/content/en/docs/reference/config-api/apiserver-webhookadmission.v1.md +++ b/content/en/docs/reference/config-api/apiserver-webhookadmission.v1.md @@ -4,7 +4,8 @@ content_type: tool-reference package: apiserver.config.k8s.io/v1 auto_generated: true --- -Package v1 is the v1 version of the API. +

Package v1 is the v1 version of the API.

+ ## Resource Types @@ -17,10 +18,9 @@ Package v1 is the v1 version of the API. +

WebhookAdmission provides configuration for the webhook admission controller.

-WebhookAdmission provides configuration for the webhook admission controller. - @@ -28,17 +28,14 @@ WebhookAdmission provides configuration for the webhook admission controller. - - +

KubeConfigFile is the path to the kubeconfig file.

+ - -
FieldDescription
apiVersion
string
apiserver.config.k8s.io/v1
kind
string
WebhookAdmission
kubeConfigFile [Required]
string
- KubeConfigFile is the path to the kubeconfig file.
diff --git a/content/en/docs/reference/config-api/client-authentication.v1.md b/content/en/docs/reference/config-api/client-authentication.v1.md index 20f7554854..f06c337fab 100644 --- a/content/en/docs/reference/config-api/client-authentication.v1.md +++ b/content/en/docs/reference/config-api/client-authentication.v1.md @@ -17,11 +17,10 @@ auto_generated: true +

ExecCredential is used by exec-based plugins to communicate credentials to +HTTP transports.

-ExecCredential is used by exec-based plugins to communicate credentials to -HTTP transports. - @@ -29,221 +28,202 @@ HTTP transports. - - +

Spec holds information passed to the plugin by the transport.

+ - - +

Status is filled in by the plugin and holds the credentials that the transport +should use to contact the API.

+ - -
FieldDescription
apiVersion
string
client.authentication.k8s.io/v1
kind
string
ExecCredential
spec [Required]
ExecCredentialSpec
- Spec holds information passed to the plugin by the transport.
status
ExecCredentialStatus
- Status is filled in by the plugin and holds the credentials that the transport -should use to contact the API.
## `Cluster` {#client-authentication-k8s-io-v1-Cluster} - - **Appears in:** + - [ExecCredentialSpec](#client-authentication-k8s-io-v1-ExecCredentialSpec) -Cluster contains information to allow an exec plugin to communicate -with the kubernetes cluster being authenticated to. - -To ensure that this struct contains everything someone would need to communicate +

Cluster contains information to allow an exec plugin to communicate +with the kubernetes cluster being authenticated to.

+

To ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields -should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception -of CertificateAuthority, since CA data will always be passed to the plugin as bytes. +should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception +of CertificateAuthority, since CA data will always be passed to the plugin as bytes.

+ - +

Server is the address of the kubernetes cluster (https://hostname:port).

+ - - +used to contact the server is used.

+ - - +

InsecureSkipTLSVerify skips the validity check for the server's certificate. +This will make your HTTPS connections insecure.

+ - - +

CAData contains PEM-encoded certificate authority certificates. +If empty, system roots should be used.

+ - - +

ProxyURL is the URL to the proxy to be used for all requests to this +cluster.

+ - - +to be stored directly in the kubeconfig.

+ - -
FieldDescription
server [Required]
string
- Server is the address of the kubernetes cluster (https://hostname:port).
tls-server-name
string
- TLSServerName is passed to the server for SNI and is used in the client to +

TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname -used to contact the server is used.

insecure-skip-tls-verify
bool
- InsecureSkipTLSVerify skips the validity check for the server's certificate. -This will make your HTTPS connections insecure.
certificate-authority-data
[]byte
- CAData contains PEM-encoded certificate authority certificates. -If empty, system roots should be used.
proxy-url
string
- ProxyURL is the URL to the proxy to be used for all requests to this -cluster.
config
-k8s.io/apimachinery/pkg/runtime.RawExtension +k8s.io/apimachinery/pkg/runtime.RawExtension
- Config holds additional config data that is specific to the exec -plugin with regards to the cluster being authenticated to. - -This data is sourced from the clientcmd Cluster object's -extensions[client.authentication.k8s.io/exec] field: - -clusters: -- name: my-cluster - cluster: - ... - extensions: - - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config - extension: - audience: 06e3fbd18de8 # arbitrary config - -In some environments, the user config may be exactly the same across many clusters +

Config holds additional config data that is specific to the exec +plugin with regards to the cluster being authenticated to.

+

This data is sourced from the clientcmd Cluster object's +extensions[client.authentication.k8s.io/exec] field:

+

clusters:

+
    +
  • name: my-cluster +cluster: +... +extensions: +
      +
    • name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config +extension: +audience: 06e3fbd18de8 # arbitrary config
    • +
    +
  • +
+

In some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need -to be stored directly in the kubeconfig.

## `ExecCredentialSpec` {#client-authentication-k8s-io-v1-ExecCredentialSpec} - - **Appears in:** + - [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential) -ExecCredentialSpec holds request and runtime specific information provided by -the transport. +

ExecCredentialSpec holds request and runtime specific information provided by +the transport.

+ - +ExecConfig.ProvideClusterInfo).

+ - - +

Interactive declares whether stdin has been passed to this exec plugin.

+ - -
FieldDescription
cluster
Cluster
- Cluster contains information to allow an exec plugin to communicate with the +

Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., -ExecConfig.ProvideClusterInfo).

interactive [Required]
bool
- Interactive declares whether stdin has been passed to this exec plugin.
## `ExecCredentialStatus` {#client-authentication-k8s-io-v1-ExecCredentialStatus} - - **Appears in:** + - [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential) -ExecCredentialStatus holds credentials for the transport to use. - -Token and ClientKeyData are sensitive fields. This data should only be +

ExecCredentialStatus holds credentials for the transport to use.

+

Token and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin -itself should at least be protected via file permissions. +itself should at least be protected via file permissions.

+ - +

ExpirationTimestamp indicates a time when the provided credentials expire.

+ - - +

Token is a bearer token used by the client for request authentication.

+ - - +

PEM-encoded client TLS certificates (including intermediates, if any).

+ - - +

PEM-encoded private key for the above certificate.

+ - -
FieldDescription
expirationTimestamp
meta/v1.Time
- ExpirationTimestamp indicates a time when the provided credentials expire.
token [Required]
string
- Token is a bearer token used by the client for request authentication.
clientCertificateData [Required]
string
- PEM-encoded client TLS certificates (including intermediates, if any).
clientKeyData [Required]
string
- PEM-encoded private key for the above certificate.
diff --git a/content/en/docs/reference/config-api/client-authentication.v1beta1.md b/content/en/docs/reference/config-api/client-authentication.v1beta1.md index 025e762274..2e840b5805 100644 --- a/content/en/docs/reference/config-api/client-authentication.v1beta1.md +++ b/content/en/docs/reference/config-api/client-authentication.v1beta1.md @@ -17,8 +17,9 @@ auto_generated: true -ExecCredential is used by exec-based plugins to communicate credentials to -HTTP transports. +

ExecCredential is used by exec-based plugins to communicate credentials to +HTTP transports.

+ @@ -32,15 +33,15 @@ HTTP transports. ExecCredentialSpec @@ -53,13 +54,14 @@ should use to contact the API. - [ExecCredentialSpec](#client-authentication-k8s-io-v1beta1-ExecCredentialSpec) -Cluster contains information to allow an exec plugin to communicate -with the kubernetes cluster being authenticated to. -To ensure that this struct contains everything someone would need to communicate +

Cluster contains information to allow an exec plugin to communicate +with the kubernetes cluster being authenticated to.

+

To ensure that this struct contains everything someone would need to communicate with a kubernetes cluster (just like they would via a kubeconfig), the fields -should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception -of CertificateAuthority, since CA data will always be passed to the plugin as bytes. +should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception +of CertificateAuthority, since CA data will always be passed to the plugin as bytes.

+
FieldDescription
- Spec holds information passed to the plugin by the transport. +

Spec holds information passed to the plugin by the transport.

status
ExecCredentialStatus
- Status is filled in by the plugin and holds the credentials that the transport -should use to contact the API. +

Status is filled in by the plugin and holds the credentials that the transport +should use to contact the API.

@@ -70,67 +72,69 @@ of CertificateAuthority, since CA data will always be passed to the plugin as by string @@ -143,8 +147,10 @@ to be stored directly in the kubeconfig. - [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential) -ExecCredentialSpec holds request and runtime specific information provided by -the transport. + +

ExecCredentialSpec holds request and runtime specific information provided by +the transport.

+
FieldDescription
- Server is the address of the kubernetes cluster (https://hostname:port). +

Server is the address of the kubernetes cluster (https://hostname:port).

tls-server-name
string
- TLSServerName is passed to the server for SNI and is used in the client to +

TLSServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname -used to contact the server is used. +used to contact the server is used.

insecure-skip-tls-verify
bool
- InsecureSkipTLSVerify skips the validity check for the server's certificate. -This will make your HTTPS connections insecure. +

InsecureSkipTLSVerify skips the validity check for the server's certificate. +This will make your HTTPS connections insecure.

certificate-authority-data
[]byte
- CAData contains PEM-encoded certificate authority certificates. -If empty, system roots should be used. +

CAData contains PEM-encoded certificate authority certificates. +If empty, system roots should be used.

proxy-url
string
- ProxyURL is the URL to the proxy to be used for all requests to this -cluster. +

ProxyURL is the URL to the proxy to be used for all requests to this +cluster.

config
-k8s.io/apimachinery/pkg/runtime.RawExtension +k8s.io/apimachinery/pkg/runtime.RawExtension
- Config holds additional config data that is specific to the exec -plugin with regards to the cluster being authenticated to. - -This data is sourced from the clientcmd Cluster object's -extensions[client.authentication.k8s.io/exec] field: - -clusters: -- name: my-cluster - cluster: - ... - extensions: - - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config - extension: - audience: 06e3fbd18de8 # arbitrary config - -In some environments, the user config may be exactly the same across many clusters +

Config holds additional config data that is specific to the exec +plugin with regards to the cluster being authenticated to.

+

This data is sourced from the clientcmd Cluster object's +extensions[client.authentication.k8s.io/exec] field:

+

clusters:

+
    +
  • name: my-cluster +cluster: +... +extensions: +
      +
    • name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config +extension: +audience: 06e3fbd18de8 # arbitrary config
    • +
    +
  • +
+

In some environments, the user config may be exactly the same across many clusters (i.e. call this exec plugin) minus some details that are specific to each cluster such as the audience. This field allows the per cluster config to be directly specified with the cluster info. Using this field to store secret data is not recommended as one of the prime benefits of exec plugins is that no secrets need -to be stored directly in the kubeconfig. +to be stored directly in the kubeconfig.

@@ -155,17 +161,17 @@ the transport. Cluster @@ -178,11 +184,12 @@ ExecConfig.ProvideClusterInfo). - [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential) -ExecCredentialStatus holds credentials for the transport to use. -Token and ClientKeyData are sensitive fields. This data should only be +

ExecCredentialStatus holds credentials for the transport to use.

+

Token and ClientKeyData are sensitive fields. This data should only be transmitted in-memory between client and exec plugin process. Exec plugin -itself should at least be protected via file permissions. +itself should at least be protected via file permissions.

+
FieldDescription
- Cluster contains information to allow an exec plugin to communicate with the +

Cluster contains information to allow an exec plugin to communicate with the kubernetes cluster being authenticated to. Note that Cluster is non-nil only when provideClusterInfo is set to true in the exec provider config (i.e., -ExecConfig.ProvideClusterInfo). +ExecConfig.ProvideClusterInfo).

interactive [Required]
bool
- Interactive declares whether stdin has been passed to this exec plugin. +

Interactive declares whether stdin has been passed to this exec plugin.

@@ -193,28 +200,28 @@ itself should at least be protected via file permissions. meta/v1.Time diff --git a/content/en/docs/reference/config-api/kube-proxy-config.v1alpha1.md b/content/en/docs/reference/config-api/kube-proxy-config.v1alpha1.md index 2dc445cd7e..b3d1fc98ff 100644 --- a/content/en/docs/reference/config-api/kube-proxy-config.v1alpha1.md +++ b/content/en/docs/reference/config-api/kube-proxy-config.v1alpha1.md @@ -17,8 +17,9 @@ auto_generated: true -KubeProxyConfiguration contains everything necessary to configure the -Kubernetes proxy server. +

KubeProxyConfiguration contains everything necessary to configure the +Kubernetes proxy server.

+
FieldDescription
- ExpirationTimestamp indicates a time when the provided credentials expire. +

ExpirationTimestamp indicates a time when the provided credentials expire.

token [Required]
string
- Token is a bearer token used by the client for request authentication. +

Token is a bearer token used by the client for request authentication.

clientCertificateData [Required]
string
- PEM-encoded client TLS certificates (including intermediates, if any). +

PEM-encoded client TLS certificates (including intermediates, if any).

clientKeyData [Required]
string
- PEM-encoded private key for the above certificate. +

PEM-encoded private key for the above certificate.

@@ -32,164 +33,164 @@ Kubernetes proxy server. map[string]bool @@ -202,8 +203,10 @@ An empty string slice is meant to select all network interfaces. - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -KubeProxyConntrackConfiguration contains conntrack settings for -the Kubernetes proxy server. + +

KubeProxyConntrackConfiguration contains conntrack settings for +the Kubernetes proxy server.

+
FieldDescription
- featureGates is a map of feature names to bools that enable or disable alpha/experimental features. +

featureGates is a map of feature names to bools that enable or disable alpha/experimental features.

bindAddress [Required]
string
- bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 -for all interfaces) +

bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0 +for all interfaces)

healthzBindAddress [Required]
string
- healthzBindAddress is the IP address and port for the health check server to serve on, -defaulting to 0.0.0.0:10256 +

healthzBindAddress is the IP address and port for the health check server to serve on, +defaulting to 0.0.0.0:10256

metricsBindAddress [Required]
string
- metricsBindAddress is the IP address and port for the metrics server to serve on, -defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces) +

metricsBindAddress is the IP address and port for the metrics server to serve on, +defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)

bindAddressHardFail [Required]
bool
- bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit +

bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit

enableProfiling [Required]
bool
- enableProfiling enables profiling via web interface on /debug/pprof handler. -Profiling handlers will be handled by metrics server. +

enableProfiling enables profiling via web interface on /debug/pprof handler. +Profiling handlers will be handled by metrics server.

clusterCIDR [Required]
string
- clusterCIDR is the CIDR range of the pods in the cluster. It is used to +

clusterCIDR is the CIDR range of the pods in the cluster. It is used to bridge traffic coming from outside of the cluster. If not provided, -no off-cluster bridging will be performed. +no off-cluster bridging will be performed.

hostnameOverride [Required]
string
- hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname. +

hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.

clientConnection [Required]
ClientConnectionConfiguration
- clientConnection specifies the kubeconfig file and client connection settings for the proxy -server to use when communicating with the apiserver. +

clientConnection specifies the kubeconfig file and client connection settings for the proxy +server to use when communicating with the apiserver.

iptables [Required]
KubeProxyIPTablesConfiguration
- iptables contains iptables-related configuration options. +

iptables contains iptables-related configuration options.

ipvs [Required]
KubeProxyIPVSConfiguration
- ipvs contains ipvs-related configuration options. +

ipvs contains ipvs-related configuration options.

oomScoreAdj [Required]
int32
- oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within -the range [-1000, 1000] +

oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within +the range [-1000, 1000]

mode [Required]
ProxyMode
- mode specifies which proxy mode to use. +

mode specifies which proxy mode to use.

portRange [Required]
string
- portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed -in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen. +

portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed +in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.

udpIdleTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). -Must be greater than 0. Only applicable for proxyMode=userspace. +

udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s'). +Must be greater than 0. Only applicable for proxyMode=userspace.

conntrack [Required]
KubeProxyConntrackConfiguration
- conntrack contains conntrack-related configuration options. +

conntrack contains conntrack-related configuration options.

configSyncPeriod [Required]
-meta/v1.Duration +meta/v1.Duration
- configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater -than 0. +

configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater +than 0.

nodePortAddresses [Required]
[]string
- nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid +

nodePortAddresses is the --nodeport-addresses value for kube-proxy process. Values must be valid IP blocks. These values are as a parameter to select the interfaces where nodeport works. In case someone would like to expose a service on localhost for local visit and some other interfaces for particular purpose, a list of IP blocks would do that. -If set it to "127.0.0.0/8", kube-proxy will only select the loopback interface for NodePort. +If set it to "127.0.0.0/8", kube-proxy will only select the loopback interface for NodePort. If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node. -An empty string slice is meant to select all network interfaces. +An empty string slice is meant to select all network interfaces.

winkernel [Required]
KubeProxyWinkernelConfiguration
- winkernel contains winkernel-related configuration options. +

winkernel contains winkernel-related configuration options.

showHiddenMetricsForVersion [Required]
string
- ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics. +

ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.

detectLocalMode [Required]
LocalMode
- DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR +

DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR

@@ -214,33 +217,33 @@ the Kubernetes proxy server. int32 @@ -253,8 +256,10 @@ table. (e.g. '60s'). Must be greater than 0 to set. - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -KubeProxyIPTablesConfiguration contains iptables-related configuration -details for the Kubernetes proxy server. + +

KubeProxyIPTablesConfiguration contains iptables-related configuration +details for the Kubernetes proxy server.

+
FieldDescription
- maxPerCore is the maximum number of NAT connections to track -per CPU core (0 to leave the limit as-is and ignore min). +

maxPerCore is the maximum number of NAT connections to track +per CPU core (0 to leave the limit as-is and ignore min).

min [Required]
int32
- min is the minimum value of connect-tracking records to allocate, -regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is). +

min is the minimum value of connect-tracking records to allocate, +regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).

tcpEstablishedTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- tcpEstablishedTimeout is how long an idle TCP connection will be kept open -(e.g. '2s'). Must be greater than 0 to set. +

tcpEstablishedTimeout is how long an idle TCP connection will be kept open +(e.g. '2s'). Must be greater than 0 to set.

tcpCloseWaitTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- tcpCloseWaitTimeout is how long an idle conntrack entry +

tcpCloseWaitTimeout is how long an idle conntrack entry in CLOSE_WAIT state will remain in the conntrack -table. (e.g. '60s'). Must be greater than 0 to set. +table. (e.g. '60s'). Must be greater than 0 to set.

@@ -265,31 +270,31 @@ details for the Kubernetes proxy server. int32 @@ -302,8 +307,10 @@ the pure iptables proxy mode. Values must be within the range [0, 31]. - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -KubeProxyIPVSConfiguration contains ipvs-related configuration -details for the Kubernetes proxy server. + +

KubeProxyIPVSConfiguration contains ipvs-related configuration +details for the Kubernetes proxy server.

+
FieldDescription
- masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using -the pure iptables proxy mode. Values must be within the range [0, 31]. +

masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using +the pure iptables proxy mode. Values must be within the range [0, 31].

masqueradeAll [Required]
bool
- masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode. +

masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.

syncPeriod [Required]
-meta/v1.Duration +meta/v1.Duration
- syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', -'2h22m'). Must be greater than 0. +

syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m', +'2h22m'). Must be greater than 0.

minSyncPeriod [Required]
-meta/v1.Duration +meta/v1.Duration
- minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', -'2h22m'). +

minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m', +'2h22m').

@@ -311,66 +318,66 @@ details for the Kubernetes proxy server. @@ -383,8 +390,10 @@ The default value is 0, which preserves the current timeout value on the system. - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -KubeProxyWinkernelConfiguration contains Windows/HNS settings for -the Kubernetes proxy server. + +

KubeProxyWinkernelConfiguration contains Windows/HNS settings for +the Kubernetes proxy server.

+
FieldDescription
syncPeriod [Required]
-meta/v1.Duration +meta/v1.Duration
- syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', -'2h22m'). Must be greater than 0. +

syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m', +'2h22m'). Must be greater than 0.

minSyncPeriod [Required]
-meta/v1.Duration +meta/v1.Duration
- minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', -'2h22m'). +

minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m', +'2h22m').

scheduler [Required]
string
- ipvs scheduler +

ipvs scheduler

excludeCIDRs [Required]
[]string
- excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch -when cleaning up ipvs services. +

excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch +when cleaning up ipvs services.

strictARP [Required]
bool
- strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries -from kube-ipvs0 interface +

strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries +from kube-ipvs0 interface

tcpTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- tcpTimeout is the timeout value used for idle IPVS TCP sessions. -The default value is 0, which preserves the current timeout value on the system. +

tcpTimeout is the timeout value used for idle IPVS TCP sessions. +The default value is 0, which preserves the current timeout value on the system.

tcpFinTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. -The default value is 0, which preserves the current timeout value on the system. +

tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN. +The default value is 0, which preserves the current timeout value on the system.

udpTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- udpTimeout is the timeout value used for IPVS UDP packets. -The default value is 0, which preserves the current timeout value on the system. +

udpTimeout is the timeout value used for IPVS UDP packets. +The default value is 0, which preserves the current timeout value on the system.

@@ -395,24 +404,24 @@ the Kubernetes proxy server. string @@ -421,36 +430,38 @@ with DSR ## `LocalMode` {#kubeproxy-config-k8s-io-v1alpha1-LocalMode} (Alias of `string`) + **Appears in:** - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -LocalMode represents modes to detect local traffic from the node + +

LocalMode represents modes to detect local traffic from the node

+ ## `ProxyMode` {#kubeproxy-config-k8s-io-v1alpha1-ProxyMode} (Alias of `string`) + **Appears in:** - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -ProxyMode represents modes used by the Kubernetes proxy server. -Currently, three modes of proxy are available in Linux platform: 'userspace' (older, going to be EOL), 'iptables' -(newer, faster), 'ipvs'(newest, better in performance and scalability). - -Two modes of proxy are available in Windows platform: 'userspace'(older, stable) and 'kernelspace' (newer, faster). - -In Linux platform, if proxy mode is blank, use the best-available proxy (currently iptables, but may change in the +

ProxyMode represents modes used by the Kubernetes proxy server.

+

Currently, three modes of proxy are available in Linux platform: 'userspace' (older, going to be EOL), 'iptables' +(newer, faster), 'ipvs'(newest, better in performance and scalability).

+

Two modes of proxy are available in Windows platform: 'userspace'(older, stable) and 'kernelspace' (newer, faster).

+

In Linux platform, if proxy mode is blank, use the best-available proxy (currently iptables, but may change in the future). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy. IPVS mode will be enabled when proxy mode is set to 'ipvs', -and the fall back path is firstly iptables and then userspace. - -In Windows platform, if proxy mode is blank, use the best-available proxy (currently userspace, but may change in the +and the fall back path is firstly iptables and then userspace.

+

In Windows platform, if proxy mode is blank, use the best-available proxy (currently userspace, but may change in the future). If winkernel proxy is selected, regardless of how, but the Windows kernel can't support this mode of proxy, -this always falls back to the userspace proxy. +this always falls back to the userspace proxy.

+ @@ -464,7 +475,15 @@ this always falls back to the userspace proxy. - [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration) -ClientConnectionConfiguration contains details for constructing a client. +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) + +- [GenericControllerManagerConfiguration](#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration) + + +

ClientConnectionConfiguration contains details for constructing a client.

+
FieldDescription
- networkName is the name of the network kube-proxy will use -to create endpoints and policies +

networkName is the name of the network kube-proxy will use +to create endpoints and policies

sourceVip [Required]
string
- sourceVip is the IP address of the source VIP endoint used for -NAT when loadbalancing +

sourceVip is the IP address of the source VIP endoint used for +NAT when loadbalancing

enableDSR [Required]
bool
- enableDSR tells kube-proxy whether HNS policies should be created -with DSR +

enableDSR tells kube-proxy whether HNS policies should be created +with DSR

@@ -475,37 +494,75 @@ ClientConnectionConfiguration contains details for constructing a client. string + + +
FieldDescription
- kubeconfig is the path to a KubeConfig file. +

kubeconfig is the path to a KubeConfig file.

acceptContentTypes [Required]
string
- acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the +

acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the default value of 'application/json'. This field will control all connections to the server used by a particular -client. +client.

contentType [Required]
string
- contentType is the content type used when sending data to the server from this client. +

contentType is the content type used when sending data to the server from this client.

qps [Required]
float32
- qps controls the number of queries per second allowed for this connection. +

qps controls the number of queries per second allowed for this connection.

burst [Required]
int32
- burst allows extra queries to accumulate when a client is exceeding its rate. +

burst allows extra queries to accumulate when a client is exceeding its rate.

+
+ +## `DebuggingConfiguration` {#DebuggingConfiguration} + + +**Appears in:** + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) + +- [GenericControllerManagerConfiguration](#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration) + + +

DebuggingConfiguration holds configuration for Debugging related features.

+ + + + + + + + + + + + @@ -516,9 +573,11 @@ client. **Appears in:** +- [LoggingConfiguration](#LoggingConfiguration) -FormatOptions contains options for the different logging formats. +

FormatOptions contains options for the different logging formats.

+
FieldDescription
enableProfiling [Required]
+bool +
+

enableProfiling enables profiling via web interface host:port/debug/pprof/

+
enableContentionProfiling [Required]
+bool +
+

enableContentionProfiling enables lock contention profiling, if +enableProfiling is true.

@@ -529,7 +588,7 @@ FormatOptions contains options for the different logging formats. JSONOptions @@ -542,7 +601,9 @@ FormatOptions contains options for the different logging formats. - [FormatOptions](#FormatOptions) -JSONOptions contains options for logging format "json". + +

JSONOptions contains options for logging format "json".

+
FieldDescription
- [Experimental] JSON contains options for logging format "json". +

[Experimental] JSON contains options for logging format "json".

@@ -553,17 +614,176 @@ JSONOptions contains options for logging format "json". bool + + +
FieldDescription
- [Experimental] SplitStream redirects error messages to stderr while +

[Experimental] SplitStream redirects error messages to stderr while info messages go to stdout, with buffering. The default is to write -both to stdout, without buffering. +both to stdout, without buffering.

infoBufferSize [Required]
k8s.io/apimachinery/pkg/api/resource.QuantityValue
- [Experimental] InfoBufferSize sets the size of the info stream when -using split streams. The default is zero, which disables buffering. +

[Experimental] InfoBufferSize sets the size of the info stream when +using split streams. The default is zero, which disables buffering.

+
+ +## `LeaderElectionConfiguration` {#LeaderElectionConfiguration} + + +**Appears in:** + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) + +- [GenericControllerManagerConfiguration](#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration) + + +

LeaderElectionConfiguration defines the configuration of leader election +clients for components that can run with leader election enabled.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
leaderElect [Required]
+bool +
+

leaderElect enables a leader election client to gain leadership +before executing the main loop. Enable this when running replicated +components for high availability.

+
leaseDuration [Required]
+meta/v1.Duration +
+

leaseDuration is the duration that non-leader candidates will wait +after observing a leadership renewal until attempting to acquire +leadership of a led but unrenewed leader slot. This is effectively the +maximum duration that a leader can be stopped before it is replaced +by another candidate. This is only applicable if leader election is +enabled.

+
renewDeadline [Required]
+meta/v1.Duration +
+

renewDeadline is the interval between attempts by the acting master to +renew a leadership slot before it stops leading. This must be less +than or equal to the lease duration. This is only applicable if leader +election is enabled.

+
retryPeriod [Required]
+meta/v1.Duration +
+

retryPeriod is the duration the clients should wait between attempting +acquisition and renewal of a leadership. This is only applicable if +leader election is enabled.

+
resourceLock [Required]
+string +
+

resourceLock indicates the resource object type that will be used to lock +during leader election cycles.

+
resourceName [Required]
+string +
+

resourceName indicates the name of resource object that will be used to lock +during leader election cycles.

+
resourceNamespace [Required]
+string +
+

resourceName indicates the namespace of resource object that will be used to lock +during leader election cycles.

+
+ +## `LoggingConfiguration` {#LoggingConfiguration} + + +**Appears in:** + +- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) + + +

LoggingConfiguration contains logging options +Refer Logs Options for more information.

+ + + + + + + + + + + + + + + + + + + + + + + + @@ -572,11 +792,14 @@ using split streams. The default is zero, which disables buffering. ## `VModuleConfiguration` {#VModuleConfiguration} (Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) + **Appears in:** +- [LoggingConfiguration](#LoggingConfiguration) -VModuleConfiguration is a collection of individual file names or patterns -and the corresponding verbosity threshold. +

VModuleConfiguration is a collection of individual file names or patterns +and the corresponding verbosity threshold.

+ diff --git a/content/en/docs/reference/config-api/kube-scheduler-config.v1beta2.md b/content/en/docs/reference/config-api/kube-scheduler-config.v1beta2.md index 6e04ce3879..8c5f981659 100644 --- a/content/en/docs/reference/config-api/kube-scheduler-config.v1beta2.md +++ b/content/en/docs/reference/config-api/kube-scheduler-config.v1beta2.md @@ -20,15 +20,338 @@ auto_generated: true +## `ClientConnectionConfiguration` {#ClientConnectionConfiguration} + + +**Appears in:** + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + + +

ClientConnectionConfiguration contains details for constructing a client.

+ + +
FieldDescription
format [Required]
+string +
+

Format Flag specifies the structure of log messages. +default value of format is text

+
flushFrequency [Required]
+time.Duration +
+

Maximum number of seconds between log flushes. Ignored if the +selected logging backend writes log messages without buffering.

+
verbosity [Required]
+uint32 +
+

Verbosity is the threshold that determines which log messages are +logged. Default is zero which logs only the most important +messages. Higher values enable additional messages. Error messages +are always logged.

+
vmodule [Required]
+VModuleConfiguration +
+

VModule overrides the verbosity threshold for individual files. +Only supported for "text" log format.

+
sanitization [Required]
+bool +
+

[Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). +Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)

+
options [Required]
+FormatOptions +
+

[Experimental] Options holds additional parameters that are specific +to the different logging formats. Only the options for the selected +format get used, but all of them get validated.

+ + + + + + + + + + + + + + + + + + + + +
FieldDescription
kubeconfig [Required]
+string +
+

kubeconfig is the path to a KubeConfig file.

+
acceptContentTypes [Required]
+string +
+

acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the +default value of 'application/json'. This field will control all connections to the server used by a particular +client.

+
contentType [Required]
+string +
+

contentType is the content type used when sending data to the server from this client.

+
qps [Required]
+float32 +
+

qps controls the number of queries per second allowed for this connection.

+
burst [Required]
+int32 +
+

burst allows extra queries to accumulate when a client is exceeding its rate.

+
+ +## `DebuggingConfiguration` {#DebuggingConfiguration} + + +**Appears in:** + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + + +

DebuggingConfiguration holds configuration for Debugging related features.

+ + + + + + + + + + + + + + +
FieldDescription
enableProfiling [Required]
+bool +
+

enableProfiling enables profiling via web interface host:port/debug/pprof/

+
enableContentionProfiling [Required]
+bool +
+

enableContentionProfiling enables lock contention profiling, if +enableProfiling is true.

+
+ +## `FormatOptions` {#FormatOptions} + + +**Appears in:** + +- [LoggingConfiguration](#LoggingConfiguration) + + +

FormatOptions contains options for the different logging formats.

+ + + + + + + + + + + +
FieldDescription
json [Required]
+JSONOptions +
+

[Experimental] JSON contains options for logging format "json".

+
+ +## `JSONOptions` {#JSONOptions} + + +**Appears in:** + +- [FormatOptions](#FormatOptions) + + +

JSONOptions contains options for logging format "json".

+ + + + + + + + + + + + + + +
FieldDescription
splitStream [Required]
+bool +
+

[Experimental] SplitStream redirects error messages to stderr while +info messages go to stdout, with buffering. The default is to write +both to stdout, without buffering.

+
infoBufferSize [Required]
+k8s.io/apimachinery/pkg/api/resource.QuantityValue +
+

[Experimental] InfoBufferSize sets the size of the info stream when +using split streams. The default is zero, which disables buffering.

+
+ +## `LeaderElectionConfiguration` {#LeaderElectionConfiguration} + + +**Appears in:** + +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + + +

LeaderElectionConfiguration defines the configuration of leader election +clients for components that can run with leader election enabled.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
leaderElect [Required]
+bool +
+

leaderElect enables a leader election client to gain leadership +before executing the main loop. Enable this when running replicated +components for high availability.

+
leaseDuration [Required]
+meta/v1.Duration +
+

leaseDuration is the duration that non-leader candidates will wait +after observing a leadership renewal until attempting to acquire +leadership of a led but unrenewed leader slot. This is effectively the +maximum duration that a leader can be stopped before it is replaced +by another candidate. This is only applicable if leader election is +enabled.

+
renewDeadline [Required]
+meta/v1.Duration +
+

renewDeadline is the interval between attempts by the acting master to +renew a leadership slot before it stops leading. This must be less +than or equal to the lease duration. This is only applicable if leader +election is enabled.

+
retryPeriod [Required]
+meta/v1.Duration +
+

retryPeriod is the duration the clients should wait between attempting +acquisition and renewal of a leadership. This is only applicable if +leader election is enabled.

+
resourceLock [Required]
+string +
+

resourceLock indicates the resource object type that will be used to lock +during leader election cycles.

+
resourceName [Required]
+string +
+

resourceName indicates the name of resource object that will be used to lock +during leader election cycles.

+
resourceNamespace [Required]
+string +
+

resourceName indicates the namespace of resource object that will be used to lock +during leader election cycles.

+
+ +## `LoggingConfiguration` {#LoggingConfiguration} + + +**Appears in:** + +- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) + + +

LoggingConfiguration contains logging options +Refer Logs Options for more information.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
format [Required]
+string +
+

Format Flag specifies the structure of log messages. +default value of format is text

+
flushFrequency [Required]
+time.Duration +
+

Maximum number of seconds between log flushes. Ignored if the +selected logging backend writes log messages without buffering.

+
verbosity [Required]
+uint32 +
+

Verbosity is the threshold that determines which log messages are +logged. Default is zero which logs only the most important +messages. Higher values enable additional messages. Error messages +are always logged.

+
vmodule [Required]
+VModuleConfiguration +
+

VModule overrides the verbosity threshold for individual files. +Only supported for "text" log format.

+
sanitization [Required]
+bool +
+

[Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). +Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)

+
options [Required]
+FormatOptions +
+

[Experimental] Options holds additional parameters that are specific +to the different logging formats. Only the options for the selected +format get used, but all of them get validated.

+
+ +## `VModuleConfiguration` {#VModuleConfiguration} + +(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) + +**Appears in:** + +- [LoggingConfiguration](#LoggingConfiguration) + + +

VModuleConfiguration is a collection of individual file names or patterns +and the corresponding verbosity threshold.

+ + + + + + ## `DefaultPreemptionArgs` {#kubescheduler-config-k8s-io-v1beta2-DefaultPreemptionArgs} +

DefaultPreemptionArgs holds arguments used to configure the +DefaultPreemption plugin.

-DefaultPreemptionArgs holds arguments used to configure the -DefaultPreemption plugin. - @@ -36,34 +359,30 @@ DefaultPreemption plugin. - - +unspecified.

+ - - +0 nodes. Defaults to 100 nodes if unspecified.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
DefaultPreemptionArgs
minCandidateNodesPercentage [Required]
int32
- MinCandidateNodesPercentage is the minimum number of candidates to +

MinCandidateNodesPercentage is the minimum number of candidates to shortlist when dry running preemption as a percentage of number of nodes. Must be in the range [0, 100]. Defaults to 10% of the cluster size if -unspecified.

minCandidateNodesAbsolute [Required]
int32
- MinCandidateNodesAbsolute is the absolute minimum number of candidates to +

MinCandidateNodesAbsolute is the absolute minimum number of candidates to shortlist. The likely number of candidates enumerated for dry running preemption is given by the formula: -numCandidates = max(numNodes ∗ minCandidateNodesPercentage, minCandidateNodesAbsolute) -We say "likely" because there are other factors such as PDB violations +numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute) +We say "likely" because there are other factors such as PDB violations that play a role in the number of candidates shortlisted. Must be at least -0 nodes. Defaults to 100 nodes if unspecified.

@@ -71,10 +390,9 @@ that play a role in the number of candidates shortlisted. Must be at least +

InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.

-InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin. - @@ -82,18 +400,15 @@ InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plug - - +

HardPodAffinityWeight is the scoring weight for existing pods with a +matching hard affinity to the incoming pod.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
InterPodAffinityArgs
hardPodAffinityWeight [Required]
int32
- HardPodAffinityWeight is the scoring weight for existing pods with a -matching hard affinity to the incoming pod.
@@ -101,10 +416,9 @@ matching hard affinity to the incoming pod. +

KubeSchedulerConfiguration configures a scheduler

-KubeSchedulerConfiguration configures a scheduler - @@ -112,116 +426,103 @@ KubeSchedulerConfiguration configures a scheduler - - +

Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16

+ - - +

LeaderElection defines the configuration of leader election client.

+ - - +

ClientConnection specifies the kubeconfig file and client connection +settings for the proxy server to use when communicating with the apiserver.

+ - - +HealthzBindAddress is the IP address and port for the health check server to serve on.

+ - - +

MetricsBindAddress is the IP address and port for the metrics server to serve on.

+ - - +

DebuggingConfiguration holds configuration for Debugging related features +TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration

+ - - +nodes will be scored.

+ - - +will be used.

+ - - +the default value (10s) will be used.

+ - - +with the "default-scheduler" profile, if present here.

+ - - +

Extenders are the list of scheduler extenders, each holding the values of how to communicate +with the extender. These extenders are shared by all scheduler profiles.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
KubeSchedulerConfiguration
parallelism [Required]
int32
- Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16
leaderElection [Required]
LeaderElectionConfiguration
- LeaderElection defines the configuration of leader election client.
clientConnection [Required]
ClientConnectionConfiguration
- ClientConnection specifies the kubeconfig file and client connection -settings for the proxy server to use when communicating with the apiserver.
healthzBindAddress [Required]
string
- Note: Both HealthzBindAddress and MetricsBindAddress fields are deprecated. +

Note: Both HealthzBindAddress and MetricsBindAddress fields are deprecated. Only empty address or port 0 is allowed. Anything else will fail validation. -HealthzBindAddress is the IP address and port for the health check server to serve on.

metricsBindAddress [Required]
string
- MetricsBindAddress is the IP address and port for the metrics server to serve on.
DebuggingConfiguration [Required]
DebuggingConfiguration
(Members of DebuggingConfiguration are embedded into this type.) - DebuggingConfiguration holds configuration for Debugging related features -TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration
percentageOfNodesToScore [Required]
int32
- PercentageOfNodesToScore is the percentage of all nodes that once found feasible +

PercentageOfNodesToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find -at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. +at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the -nodes will be scored.

podInitialBackoffSeconds [Required]
int64
- PodInitialBackoffSeconds is the initial backoff for unschedulable pods. +

PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) -will be used.

podMaxBackoffSeconds [Required]
int64
- PodMaxBackoffSeconds is the max backoff for unschedulable pods. +

PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, -the default value (10s) will be used.

profiles [Required]
[]KubeSchedulerProfile
- Profiles are scheduling profiles that kube-scheduler supports. Pods can +

Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled -with the "default-scheduler" profile, if present here.

extenders [Required]
[]Extender
- Extenders are the list of scheduler extenders, each holding the values of how to communicate -with the extender. These extenders are shared by all scheduler profiles.
@@ -229,10 +530,9 @@ with the extender. These extenders are shared by all scheduler profiles. +

NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.

-NodeAffinityArgs holds arguments to configure the NodeAffinity plugin. - @@ -240,22 +540,19 @@ NodeAffinityArgs holds arguments to configure the NodeAffinity plugin. - - +a specific Node (such as Daemonset Pods) might remain unschedulable.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
NodeAffinityArgs
addedAffinity
core/v1.NodeAffinity
- AddedAffinity is applied to all Pods additionally to the NodeAffinity +

AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match -a specific Node (such as Daemonset Pods) might remain unschedulable.

@@ -263,10 +560,9 @@ a specific Node (such as Daemonset Pods) might remain unschedulable. +

NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.

-NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin. - @@ -274,17 +570,14 @@ NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResour - - +

Resources to be managed, the default is "cpu" and "memory" if not specified.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
NodeResourcesBalancedAllocationArgs
resources [Required]
[]ResourceSpec
- Resources to be managed, the default is "cpu" and "memory" if not specified.
@@ -292,10 +585,9 @@ NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResour +

NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.

-NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin. - @@ -303,38 +595,33 @@ NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plug - - +

IgnoredResources is the list of resources that NodeResources fit filter +should ignore. This doesn't apply to scoring.

+ - - +

IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. +e.g. if group is ["example.com"], it will ignore all resource names that begin +with "example.com", such as "example.com/aaa" and "example.com/bbb". +A resource group name can't contain '/'. This doesn't apply to scoring.

+ - - +

ScoringStrategy selects the node resource scoring strategy. +The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
NodeResourcesFitArgs
ignoredResources [Required]
[]string
- IgnoredResources is the list of resources that NodeResources fit filter -should ignore. This doesn't apply to scoring.
ignoredResourceGroups [Required]
[]string
- IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. -e.g. if group is ["example.com"], it will ignore all resource names that begin -with "example.com", such as "example.com/aaa" and "example.com/bbb". -A resource group name can't contain '/'. This doesn't apply to scoring.
scoringStrategy [Required]
ScoringStrategy
- ScoringStrategy selects the node resource scoring strategy. -The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.
@@ -342,10 +629,9 @@ The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.< +

PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.

-PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin. - @@ -353,38 +639,34 @@ PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread pl - - +When not empty, .defaultingType must be "List".

+ - - +

DefaultingType determines how .defaultConstraints are deduced. Can be one +of "System" or "List".

+ +

Defaults to "List" if feature gate DefaultPodTopologySpread is disabled +and to "System" if enabled.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
PodTopologySpreadArgs
defaultConstraints
[]core/v1.TopologySpreadConstraint
- DefaultConstraints defines topology spread constraints to be applied to -Pods that don't define any in `pod.spec.topologySpreadConstraints`. -`.defaultConstraints[∗].labelSelectors` must be empty, as they are +

DefaultConstraints defines topology spread constraints to be applied to +Pods that don't define any in pod.spec.topologySpreadConstraints. +.defaultConstraints[*].labelSelectors must be empty, as they are deduced from the Pod's membership to Services, ReplicationControllers, ReplicaSets or StatefulSets. -When not empty, .defaultingType must be "List".

defaultingType
PodTopologySpreadConstraintsDefaulting
- DefaultingType determines how .defaultConstraints are deduced. Can be one -of "System" or "List". - -- "System": Use kubernetes defined constraints that spread Pods among - Nodes and Zones. -- "List": Use constraints defined in .defaultConstraints. - -Defaults to "List" if feature gate DefaultPodTopologySpread is disabled -and to "System" if enabled.
@@ -392,10 +674,9 @@ and to "System" if enabled. +

VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.

-VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin. - @@ -403,587 +684,536 @@ VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin. - - +If this value is nil, the default value (600) will be used.

+ - - +The default shape points are:

+
    +
  1. 0 for 0 utilization
  2. +
  3. 10 for 100 utilization +All points must be sorted in increasing order by utilization.
  4. +
+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta2
kind
string
VolumeBindingArgs
bindTimeoutSeconds [Required]
int64
- BindTimeoutSeconds is the timeout in seconds in volume binding operation. +

BindTimeoutSeconds is the timeout in seconds in volume binding operation. Value must be non-negative integer. The value zero indicates no waiting. -If this value is nil, the default value (600) will be used.

shape
[]UtilizationShapePoint
- Shape specifies the points defining the score function shape, which is +

Shape specifies the points defining the score function shape, which is used to score nodes based on the utilization of statically provisioned PVs. The utilization is calculated by dividing the total requested storage of the pod by the total capacity of feasible PVs on each node. Each point contains utilization (ranges from 0 to 100) and its associated score (ranges from 0 to 10). You can turn the priority by specifying different scores for different utilization numbers. -The default shape points are: -1) 0 for 0 utilization -2) 10 for 100 utilization -All points must be sorted in increasing order by utilization.

## `Extender` {#kubescheduler-config-k8s-io-v1beta2-Extender} - - **Appears in:** + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) -Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, -it is assumed that the extender chose not to provide that extension. +

Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, +it is assumed that the extender chose not to provide that extension.

+ - +

URLPrefix at which the extender is available

+ - - +

Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.

+ - - +

Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.

+ - - +

Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.

+ - - +

The numeric multiplier for the node scores that the prioritize call generates. +The weight should be a positive integer

+ - - +can implement this function.

+ - - +

EnableHTTPS specifies whether https should be used to communicate with the extender

+ - - +

TLSConfig specifies the transport layer security config

+ - - +

HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize +timeout is ignored, k8s/other extenders priorities are used to select the node.

+ - - +assuming that the extender already cached full details of all nodes in the cluster

+ - - +

ManagedResources is a list of extended resources that are managed by +this extender.

+ + - - +

Ignorable specifies if the extender is ignorable, i.e. scheduling should not +fail when the extender returns an error or is not reachable.

+ - -
FieldDescription
urlPrefix [Required]
string
- URLPrefix at which the extender is available
filterVerb [Required]
string
- Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.
preemptVerb [Required]
string
- Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.
prioritizeVerb [Required]
string
- Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.
weight [Required]
int64
- The numeric multiplier for the node scores that the prioritize call generates. -The weight should be a positive integer
bindVerb [Required]
string
- Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. +

Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender -can implement this function.

enableHTTPS [Required]
bool
- EnableHTTPS specifies whether https should be used to communicate with the extender
tlsConfig [Required]
ExtenderTLSConfig
- TLSConfig specifies the transport layer security config
httpTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize -timeout is ignored, k8s/other extenders priorities are used to select the node.
nodeCacheCapable [Required]
bool
- NodeCacheCapable specifies that the extender is capable of caching node information, +

NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes -assuming that the extender already cached full details of all nodes in the cluster

managedResources
[]ExtenderManagedResource
- ManagedResources is a list of extended resources that are managed by -this extender. -- A pod will be sent to the extender on the Filter, Prioritize and Bind - (if the extender is the binder) phases iff the pod requests at least - one of the extended resources in this list. If empty or unspecified, - all pods will be sent to this extender. -- If IgnoredByScheduler is set to true for a resource, kube-scheduler - will skip checking the resource in predicates.
ignorable [Required]
bool
- Ignorable specifies if the extender is ignorable, i.e. scheduling should not -fail when the extender returns an error or is not reachable.
## `ExtenderManagedResource` {#kubescheduler-config-k8s-io-v1beta2-ExtenderManagedResource} - - **Appears in:** + - [Extender](#kubescheduler-config-k8s-io-v1beta2-Extender) -ExtenderManagedResource describes the arguments of extended resources -managed by an extender. +

ExtenderManagedResource describes the arguments of extended resources +managed by an extender.

+ - +

Name is the extended resource name.

+ - - +

IgnoredByScheduler indicates whether kube-scheduler should ignore this +resource when applying predicates.

+ - -
FieldDescription
name [Required]
string
- Name is the extended resource name.
ignoredByScheduler [Required]
bool
- IgnoredByScheduler indicates whether kube-scheduler should ignore this -resource when applying predicates.
## `ExtenderTLSConfig` {#kubescheduler-config-k8s-io-v1beta2-ExtenderTLSConfig} - - **Appears in:** + - [Extender](#kubescheduler-config-k8s-io-v1beta2-Extender) -ExtenderTLSConfig contains settings to enable TLS with extender +

ExtenderTLSConfig contains settings to enable TLS with extender

+ - +

Server should be accessed without verifying the TLS certificate. For testing only.

+ - - +server is used.

+ - - +

Server requires TLS client certificate authentication

+ - - +

Server requires TLS client certificate authentication

+ - - +

Trusted root certificates for server

+ - - +

CertData holds PEM-encoded bytes (typically read from a client certificate file). +CertData takes precedence over CertFile

+ - - +

KeyData holds PEM-encoded bytes (typically read from a client certificate key file). +KeyData takes precedence over KeyFile

+ - - +

CAData holds PEM-encoded bytes (typically read from a root certificates bundle). +CAData takes precedence over CAFile

+ - -
FieldDescription
insecure [Required]
bool
- Server should be accessed without verifying the TLS certificate. For testing only.
serverName [Required]
string
- ServerName is passed to the server for SNI and is used in the client to check server +

ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the -server is used.

certFile [Required]
string
- Server requires TLS client certificate authentication
keyFile [Required]
string
- Server requires TLS client certificate authentication
caFile [Required]
string
- Trusted root certificates for server
certData [Required]
[]byte
- CertData holds PEM-encoded bytes (typically read from a client certificate file). -CertData takes precedence over CertFile
keyData [Required]
[]byte
- KeyData holds PEM-encoded bytes (typically read from a client certificate key file). -KeyData takes precedence over KeyFile
caData [Required]
[]byte
- CAData holds PEM-encoded bytes (typically read from a root certificates bundle). -CAData takes precedence over CAFile
## `KubeSchedulerProfile` {#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerProfile} - - **Appears in:** + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) -KubeSchedulerProfile is a scheduling profile. +

KubeSchedulerProfile is a scheduling profile.

+ - +

SchedulerName is the name of the scheduler associated to this profile. +If SchedulerName matches with the pod's "spec.schedulerName", then the pod +is scheduled with this profile.

+ - - +PluginConfig must be specified for all profiles.

+ - - +for that plugin.

+ - -
FieldDescription
schedulerName [Required]
string
- SchedulerName is the name of the scheduler associated to this profile. -If SchedulerName matches with the pod's "spec.schedulerName", then the pod -is scheduled with this profile.
plugins [Required]
Plugins
- Plugins specify the set of plugins that should be enabled or disabled. +

Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and -PluginConfig must be specified for all profiles.

pluginConfig [Required]
[]PluginConfig
- PluginConfig is an optional set of custom plugin arguments for each plugin. +

PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config -for that plugin.

## `Plugin` {#kubescheduler-config-k8s-io-v1beta2-Plugin} - - **Appears in:** + - [PluginSet](#kubescheduler-config-k8s-io-v1beta2-PluginSet) -Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins. +

Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.

+ - +

Name defines the name of plugin

+ - - +

Weight defines the weight of plugin, only used for Score plugins.

+ - -
FieldDescription
name [Required]
string
- Name defines the name of plugin
weight [Required]
int32
- Weight defines the weight of plugin, only used for Score plugins.
## `PluginConfig` {#kubescheduler-config-k8s-io-v1beta2-PluginConfig} - - **Appears in:** + - [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerProfile) -PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. +

PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. -It is up to the plugin to process these Args. +It is up to the plugin to process these Args.

+ - +

Name defines the name of plugin being configured

+ - - +

Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.

+ - -
FieldDescription
name [Required]
string
- Name defines the name of plugin being configured
args [Required]
-k8s.io/apimachinery/pkg/runtime.RawExtension +k8s.io/apimachinery/pkg/runtime.RawExtension
- Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.
## `PluginSet` {#kubescheduler-config-k8s-io-v1beta2-PluginSet} - - **Appears in:** + - [Plugins](#kubescheduler-config-k8s-io-v1beta2-Plugins) -PluginSet specifies enabled and disabled plugins for an extension point. -If an array is empty, missing, or nil, default plugins at that extension point will be used. +

PluginSet specifies enabled and disabled plugins for an extension point. +If an array is empty, missing, or nil, default plugins at that extension point will be used.

+ - +These are called after default plugins and in the same order specified here.

+ - - +

Disabled specifies default plugins that should be disabled. +When all default plugins need to be disabled, an array containing only one "*" should be provided.

+ - -
FieldDescription
enabled [Required]
[]Plugin
- Enabled specifies plugins that should be enabled in addition to default plugins. +

Enabled specifies plugins that should be enabled in addition to default plugins. If the default plugin is also configured in the scheduler config file, the weight of plugin will be overridden accordingly. -These are called after default plugins and in the same order specified here.

disabled [Required]
[]Plugin
- Disabled specifies default plugins that should be disabled. -When all default plugins need to be disabled, an array containing only one "∗" should be provided.
## `Plugins` {#kubescheduler-config-k8s-io-v1beta2-Plugins} - - **Appears in:** + - [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerProfile) -Plugins include multiple extension points. When specified, the list of plugins for +

Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to -be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order. +be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.

+ - +

QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.

+ - - +

PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the scheduling framework.

+ - - +

Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.

+ - - +

PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.

+ - - +

PreScore is a list of plugins that are invoked before scoring.

+ - - +

Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.

+ - - +

Reserve is a list of plugins invoked when reserving/unreserving resources +after a node is assigned to run the pod.

+ - - +

Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.

+ - - +

PreBind is a list of plugins that should be invoked before a pod is bound.

+ - - +

Bind is a list of plugins that should be invoked at "Bind" extension point of the scheduling framework. +The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.

+ - - +

PostBind is a list of plugins that should be invoked after a pod is successfully bound.

+ - - +

MultiPoint is a simplified config section to enable plugins for all valid extension points.

+ - -
FieldDescription
queueSort [Required]
PluginSet
- QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.
preFilter [Required]
PluginSet
- PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the scheduling framework.
filter [Required]
PluginSet
- Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.
postFilter [Required]
PluginSet
- PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.
preScore [Required]
PluginSet
- PreScore is a list of plugins that are invoked before scoring.
score [Required]
PluginSet
- Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.
reserve [Required]
PluginSet
- Reserve is a list of plugins invoked when reserving/unreserving resources -after a node is assigned to run the pod.
permit [Required]
PluginSet
- Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.
preBind [Required]
PluginSet
- PreBind is a list of plugins that should be invoked before a pod is bound.
bind [Required]
PluginSet
- Bind is a list of plugins that should be invoked at "Bind" extension point of the scheduling framework. -The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.
postBind [Required]
PluginSet
- PostBind is a list of plugins that should be invoked after a pod is successfully bound.
multiPoint [Required]
PluginSet
- MultiPoint is a simplified config section to enable plugins for all valid extension points.
@@ -991,125 +1221,118 @@ The scheduler call these plugins in order. Scheduler skips the rest of these plu (Alias of `string`) - **Appears in:** + - [PodTopologySpreadArgs](#kubescheduler-config-k8s-io-v1beta2-PodTopologySpreadArgs) -PodTopologySpreadConstraintsDefaulting defines how to set default constraints -for the PodTopologySpread plugin. +

PodTopologySpreadConstraintsDefaulting defines how to set default constraints +for the PodTopologySpread plugin.

+ ## `RequestedToCapacityRatioParam` {#kubescheduler-config-k8s-io-v1beta2-RequestedToCapacityRatioParam} - - **Appears in:** + - [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy) -RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters +

RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters

+ - +

Shape is a list of points defining the scoring function shape.

+ - -
FieldDescription
shape [Required]
[]UtilizationShapePoint
- Shape is a list of points defining the scoring function shape.
## `ResourceSpec` {#kubescheduler-config-k8s-io-v1beta2-ResourceSpec} - - **Appears in:** + - [NodeResourcesBalancedAllocationArgs](#kubescheduler-config-k8s-io-v1beta2-NodeResourcesBalancedAllocationArgs) + - [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy) -ResourceSpec represents a single resource. +

ResourceSpec represents a single resource.

+ - +

Name of the resource.

+ - - +

Weight of the resource.

+ - -
FieldDescription
name [Required]
string
- Name of the resource.
weight [Required]
int64
- Weight of the resource.
## `ScoringStrategy` {#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy} - - **Appears in:** + - [NodeResourcesFitArgs](#kubescheduler-config-k8s-io-v1beta2-NodeResourcesFitArgs) -ScoringStrategy define ScoringStrategyType for node resource plugin +

ScoringStrategy define ScoringStrategyType for node resource plugin

+ - +

Type selects which strategy to run.

+ - - +Weight defaults to 1 if not specified or explicitly set to 0.

+ - - +

Arguments specific to RequestedToCapacityRatio strategy.

+ - -
FieldDescription
type [Required]
ScoringStrategyType
- Type selects which strategy to run.
resources [Required]
[]ResourceSpec
- Resources to consider when scoring. -The default resource set includes "cpu" and "memory" with an equal weight. +

Resources to consider when scoring. +The default resource set includes "cpu" and "memory" with an equal weight. Allowed weights go from 1 to 100. -Weight defaults to 1 if not specified or explicitly set to 0.

requestedToCapacityRatio [Required]
RequestedToCapacityRatioParam
- Arguments specific to RequestedToCapacityRatio strategy.
@@ -1117,401 +1340,48 @@ Weight defaults to 1 if not specified or explicitly set to 0. (Alias of `string`) - **Appears in:** + - [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy) -ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin. +

ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin.

+ ## `UtilizationShapePoint` {#kubescheduler-config-k8s-io-v1beta2-UtilizationShapePoint} - - **Appears in:** + - [VolumeBindingArgs](#kubescheduler-config-k8s-io-v1beta2-VolumeBindingArgs) + - [RequestedToCapacityRatioParam](#kubescheduler-config-k8s-io-v1beta2-RequestedToCapacityRatioParam) -UtilizationShapePoint represents single point of priority function shape. +

UtilizationShapePoint represents single point of priority function shape.

+ - +

Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.

+ - - +

Score assigned to given utilization (y axis). Valid values are 0 to 10.

+ - -
FieldDescription
utilization [Required]
int32
- Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.
score [Required]
int32
- Score assigned to given utilization (y axis). Valid values are 0 to 10.
- - - -## `ClientConnectionConfiguration` {#ClientConnectionConfiguration} - - - - -**Appears in:** -- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) - - -ClientConnectionConfiguration contains details for constructing a client. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
kubeconfig [Required]
-string -
- kubeconfig is the path to a KubeConfig file.
acceptContentTypes [Required]
-string -
- acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the -default value of 'application/json'. This field will control all connections to the server used by a particular -client.
contentType [Required]
-string -
- contentType is the content type used when sending data to the server from this client.
qps [Required]
-float32 -
- qps controls the number of queries per second allowed for this connection.
burst [Required]
-int32 -
- burst allows extra queries to accumulate when a client is exceeding its rate.
- -## `DebuggingConfiguration` {#DebuggingConfiguration} - - - - -**Appears in:** -- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) - - -DebuggingConfiguration holds configuration for Debugging related features. - - - - - - - - - - - - - - - - - - -
FieldDescription
enableProfiling [Required]
-bool -
- enableProfiling enables profiling via web interface host:port/debug/pprof/
enableContentionProfiling [Required]
-bool -
- enableContentionProfiling enables lock contention profiling, if -enableProfiling is true.
- -## `FormatOptions` {#FormatOptions} - - - - -**Appears in:** -- [LoggingConfiguration](#LoggingConfiguration) - - -FormatOptions contains options for the different logging formats. - - - - - - - - - - - - - -
FieldDescription
json [Required]
-JSONOptions -
- [Experimental] JSON contains options for logging format "json".
- -## `JSONOptions` {#JSONOptions} - - - - -**Appears in:** -- [FormatOptions](#FormatOptions) - - -JSONOptions contains options for logging format "json". - - - - - - - - - - - - - - - - - - -
FieldDescription
splitStream [Required]
-bool -
- [Experimental] SplitStream redirects error messages to stderr while -info messages go to stdout, with buffering. The default is to write -both to stdout, without buffering.
infoBufferSize [Required]
-k8s.io/apimachinery/pkg/api/resource.QuantityValue -
- [Experimental] InfoBufferSize sets the size of the info stream when -using split streams. The default is zero, which disables buffering.
- -## `LeaderElectionConfiguration` {#LeaderElectionConfiguration} - - - - -**Appears in:** -- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) - - -LeaderElectionConfiguration defines the configuration of leader election -clients for components that can run with leader election enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
leaderElect [Required]
-bool -
- leaderElect enables a leader election client to gain leadership -before executing the main loop. Enable this when running replicated -components for high availability.
leaseDuration [Required]
-meta/v1.Duration -
- leaseDuration is the duration that non-leader candidates will wait -after observing a leadership renewal until attempting to acquire -leadership of a led but unrenewed leader slot. This is effectively the -maximum duration that a leader can be stopped before it is replaced -by another candidate. This is only applicable if leader election is -enabled.
renewDeadline [Required]
-meta/v1.Duration -
- renewDeadline is the interval between attempts by the acting master to -renew a leadership slot before it stops leading. This must be less -than or equal to the lease duration. This is only applicable if leader -election is enabled.
retryPeriod [Required]
-meta/v1.Duration -
- retryPeriod is the duration the clients should wait between attempting -acquisition and renewal of a leadership. This is only applicable if -leader election is enabled.
resourceLock [Required]
-string -
- resourceLock indicates the resource object type that will be used to lock -during leader election cycles.
resourceName [Required]
-string -
- resourceName indicates the name of resource object that will be used to lock -during leader election cycles.
resourceNamespace [Required]
-string -
- resourceName indicates the namespace of resource object that will be used to lock -during leader election cycles.
- -## `LoggingConfiguration` {#LoggingConfiguration} - - - - -**Appears in:** -- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) - - -LoggingConfiguration contains logging options -Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
format [Required]
-string -
- Format Flag specifies the structure of log messages. -default value of format is `text`
flushFrequency [Required]
-time.Duration -
- Maximum number of seconds between log flushes. Ignored if the -selected logging backend writes log messages without buffering.
verbosity [Required]
-uint32 -
- Verbosity is the threshold that determines which log messages are -logged. Default is zero which logs only the most important -messages. Higher values enable additional messages. Error messages -are always logged.
vmodule [Required]
-VModuleConfiguration -
- VModule overrides the verbosity threshold for individual files. -Only supported for "text" log format.
sanitization [Required]
-bool -
- [Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). -Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)
options [Required]
-FormatOptions -
- [Experimental] Options holds additional parameters that are specific -to the different logging formats. Only the options for the selected -format get used, but all of them get validated.
- -## `VModuleConfiguration` {#VModuleConfiguration} - -(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) - - -**Appears in:** -- [LoggingConfiguration](#LoggingConfiguration) - - -VModuleConfiguration is a collection of individual file names or patterns -and the corresponding verbosity threshold. - - diff --git a/content/en/docs/reference/config-api/kube-scheduler-config.v1beta3.md b/content/en/docs/reference/config-api/kube-scheduler-config.v1beta3.md index 55ae376feb..6c8635415e 100644 --- a/content/en/docs/reference/config-api/kube-scheduler-config.v1beta3.md +++ b/content/en/docs/reference/config-api/kube-scheduler-config.v1beta3.md @@ -24,11 +24,10 @@ auto_generated: true +

DefaultPreemptionArgs holds arguments used to configure the +DefaultPreemption plugin.

-DefaultPreemptionArgs holds arguments used to configure the -DefaultPreemption plugin. - @@ -36,34 +35,30 @@ DefaultPreemption plugin. - - +unspecified.

+ - - +0 nodes. Defaults to 100 nodes if unspecified.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
DefaultPreemptionArgs
minCandidateNodesPercentage [Required]
int32
- MinCandidateNodesPercentage is the minimum number of candidates to +

MinCandidateNodesPercentage is the minimum number of candidates to shortlist when dry running preemption as a percentage of number of nodes. Must be in the range [0, 100]. Defaults to 10% of the cluster size if -unspecified.

minCandidateNodesAbsolute [Required]
int32
- MinCandidateNodesAbsolute is the absolute minimum number of candidates to +

MinCandidateNodesAbsolute is the absolute minimum number of candidates to shortlist. The likely number of candidates enumerated for dry running preemption is given by the formula: -numCandidates = max(numNodes ∗ minCandidateNodesPercentage, minCandidateNodesAbsolute) -We say "likely" because there are other factors such as PDB violations +numCandidates = max(numNodes * minCandidateNodesPercentage, minCandidateNodesAbsolute) +We say "likely" because there are other factors such as PDB violations that play a role in the number of candidates shortlisted. Must be at least -0 nodes. Defaults to 100 nodes if unspecified.

@@ -71,10 +66,9 @@ that play a role in the number of candidates shortlisted. Must be at least +

InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin.

-InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plugin. - @@ -82,18 +76,15 @@ InterPodAffinityArgs holds arguments used to configure the InterPodAffinity plug - - +

HardPodAffinityWeight is the scoring weight for existing pods with a +matching hard affinity to the incoming pod.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
InterPodAffinityArgs
hardPodAffinityWeight [Required]
int32
- HardPodAffinityWeight is the scoring weight for existing pods with a -matching hard affinity to the incoming pod.
@@ -101,10 +92,9 @@ matching hard affinity to the incoming pod. +

KubeSchedulerConfiguration configures a scheduler

-KubeSchedulerConfiguration configures a scheduler - @@ -112,98 +102,87 @@ KubeSchedulerConfiguration configures a scheduler - - +

Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16

+ - - +

LeaderElection defines the configuration of leader election client.

+ - - +

ClientConnection specifies the kubeconfig file and client connection +settings for the proxy server to use when communicating with the apiserver.

+ - - +

DebuggingConfiguration holds configuration for Debugging related features +TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration

+ - - +nodes will be scored.

+ - - +will be used.

+ - - +the default value (10s) will be used.

+ - - +with the "default-scheduler" profile, if present here.

+ - - +

Extenders are the list of scheduler extenders, each holding the values of how to communicate +with the extender. These extenders are shared by all scheduler profiles.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
KubeSchedulerConfiguration
parallelism [Required]
int32
- Parallelism defines the amount of parallelism in algorithms for scheduling a Pods. Must be greater than 0. Defaults to 16
leaderElection [Required]
LeaderElectionConfiguration
- LeaderElection defines the configuration of leader election client.
clientConnection [Required]
ClientConnectionConfiguration
- ClientConnection specifies the kubeconfig file and client connection -settings for the proxy server to use when communicating with the apiserver.
DebuggingConfiguration [Required]
DebuggingConfiguration
(Members of DebuggingConfiguration are embedded into this type.) - DebuggingConfiguration holds configuration for Debugging related features -TODO: We might wanna make this a substruct like Debugging componentbaseconfigv1alpha1.DebuggingConfiguration
percentageOfNodesToScore [Required]
int32
- PercentageOfNodesToScore is the percentage of all nodes that once found feasible +

PercentageOfNodesToScore is the percentage of all nodes that once found feasible for running a pod, the scheduler stops its search for more feasible nodes in the cluster. This helps improve scheduler's performance. Scheduler always tries to find -at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. +at least "minFeasibleNodesToFind" feasible nodes no matter what the value of this flag is. Example: if the cluster size is 500 nodes and the value of this flag is 30, then scheduler stops finding further feasible nodes once it finds 150 feasible ones. When the value is 0, default percentage (5%--50% based on the size of the cluster) of the -nodes will be scored.

podInitialBackoffSeconds [Required]
int64
- PodInitialBackoffSeconds is the initial backoff for unschedulable pods. +

PodInitialBackoffSeconds is the initial backoff for unschedulable pods. If specified, it must be greater than 0. If this value is null, the default value (1s) -will be used.

podMaxBackoffSeconds [Required]
int64
- PodMaxBackoffSeconds is the max backoff for unschedulable pods. +

PodMaxBackoffSeconds is the max backoff for unschedulable pods. If specified, it must be greater than podInitialBackoffSeconds. If this value is null, -the default value (10s) will be used.

profiles [Required]
[]KubeSchedulerProfile
- Profiles are scheduling profiles that kube-scheduler supports. Pods can +

Profiles are scheduling profiles that kube-scheduler supports. Pods can choose to be scheduled under a particular profile by setting its associated scheduler name. Pods that don't specify any scheduler name are scheduled -with the "default-scheduler" profile, if present here.

extenders [Required]
[]Extender
- Extenders are the list of scheduler extenders, each holding the values of how to communicate -with the extender. These extenders are shared by all scheduler profiles.
@@ -211,10 +190,9 @@ with the extender. These extenders are shared by all scheduler profiles. +

NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.

-NodeAffinityArgs holds arguments to configure the NodeAffinity plugin. - @@ -222,22 +200,19 @@ NodeAffinityArgs holds arguments to configure the NodeAffinity plugin. - - +a specific Node (such as Daemonset Pods) might remain unschedulable.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
NodeAffinityArgs
addedAffinity
core/v1.NodeAffinity
- AddedAffinity is applied to all Pods additionally to the NodeAffinity +

AddedAffinity is applied to all Pods additionally to the NodeAffinity specified in the PodSpec. That is, Nodes need to satisfy AddedAffinity AND .spec.NodeAffinity. AddedAffinity is empty by default (all Nodes match). When AddedAffinity is used, some Pods with affinity requirements that match -a specific Node (such as Daemonset Pods) might remain unschedulable.

@@ -245,10 +220,9 @@ a specific Node (such as Daemonset Pods) might remain unschedulable. +

NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin.

-NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResourcesBalancedAllocation plugin. - @@ -256,17 +230,14 @@ NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResour - - +

Resources to be managed, the default is "cpu" and "memory" if not specified.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
NodeResourcesBalancedAllocationArgs
resources [Required]
[]ResourceSpec
- Resources to be managed, the default is "cpu" and "memory" if not specified.
@@ -274,10 +245,9 @@ NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResour +

NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin.

-NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plugin. - @@ -285,38 +255,33 @@ NodeResourcesFitArgs holds arguments used to configure the NodeResourcesFit plug - - +

IgnoredResources is the list of resources that NodeResources fit filter +should ignore. This doesn't apply to scoring.

+ - - +

IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. +e.g. if group is ["example.com"], it will ignore all resource names that begin +with "example.com", such as "example.com/aaa" and "example.com/bbb". +A resource group name can't contain '/'. This doesn't apply to scoring.

+ - - +

ScoringStrategy selects the node resource scoring strategy. +The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
NodeResourcesFitArgs
ignoredResources [Required]
[]string
- IgnoredResources is the list of resources that NodeResources fit filter -should ignore. This doesn't apply to scoring.
ignoredResourceGroups [Required]
[]string
- IgnoredResourceGroups defines the list of resource groups that NodeResources fit filter should ignore. -e.g. if group is ["example.com"], it will ignore all resource names that begin -with "example.com", such as "example.com/aaa" and "example.com/bbb". -A resource group name can't contain '/'. This doesn't apply to scoring.
scoringStrategy [Required]
ScoringStrategy
- ScoringStrategy selects the node resource scoring strategy. -The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.
@@ -324,10 +289,9 @@ The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.< +

PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin.

-PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread plugin. - @@ -335,38 +299,34 @@ PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread pl - - +When not empty, .defaultingType must be "List".

+ - - +

DefaultingType determines how .defaultConstraints are deduced. Can be one +of "System" or "List".

+ +

Defaults to "List" if feature gate DefaultPodTopologySpread is disabled +and to "System" if enabled.

+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
PodTopologySpreadArgs
defaultConstraints
[]core/v1.TopologySpreadConstraint
- DefaultConstraints defines topology spread constraints to be applied to -Pods that don't define any in `pod.spec.topologySpreadConstraints`. -`.defaultConstraints[∗].labelSelectors` must be empty, as they are +

DefaultConstraints defines topology spread constraints to be applied to +Pods that don't define any in pod.spec.topologySpreadConstraints. +.defaultConstraints[*].labelSelectors must be empty, as they are deduced from the Pod's membership to Services, ReplicationControllers, ReplicaSets or StatefulSets. -When not empty, .defaultingType must be "List".

defaultingType
PodTopologySpreadConstraintsDefaulting
- DefaultingType determines how .defaultConstraints are deduced. Can be one -of "System" or "List". - -- "System": Use kubernetes defined constraints that spread Pods among - Nodes and Zones. -- "List": Use constraints defined in .defaultConstraints. - -Defaults to "List" if feature gate DefaultPodTopologySpread is disabled -and to "System" if enabled.
@@ -374,10 +334,9 @@ and to "System" if enabled. +

VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin.

-VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin. - @@ -385,602 +344,552 @@ VolumeBindingArgs holds arguments used to configure the VolumeBinding plugin. - - +If this value is nil, the default value (600) will be used.

+ - - +The default shape points are:

+
    +
  1. 0 for 0 utilization
  2. +
  3. 10 for 100 utilization +All points must be sorted in increasing order by utilization.
  4. +
+ - -
FieldDescription
apiVersion
string
kubescheduler.config.k8s.io/v1beta3
kind
string
VolumeBindingArgs
bindTimeoutSeconds [Required]
int64
- BindTimeoutSeconds is the timeout in seconds in volume binding operation. +

BindTimeoutSeconds is the timeout in seconds in volume binding operation. Value must be non-negative integer. The value zero indicates no waiting. -If this value is nil, the default value (600) will be used.

shape
[]UtilizationShapePoint
- Shape specifies the points defining the score function shape, which is +

Shape specifies the points defining the score function shape, which is used to score nodes based on the utilization of statically provisioned PVs. The utilization is calculated by dividing the total requested storage of the pod by the total capacity of feasible PVs on each node. Each point contains utilization (ranges from 0 to 100) and its associated score (ranges from 0 to 10). You can turn the priority by specifying different scores for different utilization numbers. -The default shape points are: -1) 0 for 0 utilization -2) 10 for 100 utilization -All points must be sorted in increasing order by utilization.

## `Extender` {#kubescheduler-config-k8s-io-v1beta3-Extender} - - **Appears in:** + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) -Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, -it is assumed that the extender chose not to provide that extension. +

Extender holds the parameters used to communicate with the extender. If a verb is unspecified/empty, +it is assumed that the extender chose not to provide that extension.

+ - +

URLPrefix at which the extender is available

+ - - +

Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.

+ - - +

Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.

+ - - +

Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.

+ - - +

The numeric multiplier for the node scores that the prioritize call generates. +The weight should be a positive integer

+ - - +can implement this function.

+ - - +

EnableHTTPS specifies whether https should be used to communicate with the extender

+ - - +

TLSConfig specifies the transport layer security config

+ - - +

HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize +timeout is ignored, k8s/other extenders priorities are used to select the node.

+ - - +assuming that the extender already cached full details of all nodes in the cluster

+ - - +

ManagedResources is a list of extended resources that are managed by +this extender.

+ + - - +

Ignorable specifies if the extender is ignorable, i.e. scheduling should not +fail when the extender returns an error or is not reachable.

+ - -
FieldDescription
urlPrefix [Required]
string
- URLPrefix at which the extender is available
filterVerb [Required]
string
- Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.
preemptVerb [Required]
string
- Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.
prioritizeVerb [Required]
string
- Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.
weight [Required]
int64
- The numeric multiplier for the node scores that the prioritize call generates. -The weight should be a positive integer
bindVerb [Required]
string
- Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. +

Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender. If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender -can implement this function.

enableHTTPS [Required]
bool
- EnableHTTPS specifies whether https should be used to communicate with the extender
tlsConfig [Required]
ExtenderTLSConfig
- TLSConfig specifies the transport layer security config
httpTimeout [Required]
-meta/v1.Duration +meta/v1.Duration
- HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize -timeout is ignored, k8s/other extenders priorities are used to select the node.
nodeCacheCapable [Required]
bool
- NodeCacheCapable specifies that the extender is capable of caching node information, +

NodeCacheCapable specifies that the extender is capable of caching node information, so the scheduler should only send minimal information about the eligible nodes -assuming that the extender already cached full details of all nodes in the cluster

managedResources
[]ExtenderManagedResource
- ManagedResources is a list of extended resources that are managed by -this extender. -- A pod will be sent to the extender on the Filter, Prioritize and Bind - (if the extender is the binder) phases iff the pod requests at least - one of the extended resources in this list. If empty or unspecified, - all pods will be sent to this extender. -- If IgnoredByScheduler is set to true for a resource, kube-scheduler - will skip checking the resource in predicates.
ignorable [Required]
bool
- Ignorable specifies if the extender is ignorable, i.e. scheduling should not -fail when the extender returns an error or is not reachable.
## `ExtenderManagedResource` {#kubescheduler-config-k8s-io-v1beta3-ExtenderManagedResource} - - **Appears in:** + - [Extender](#kubescheduler-config-k8s-io-v1beta3-Extender) -ExtenderManagedResource describes the arguments of extended resources -managed by an extender. +

ExtenderManagedResource describes the arguments of extended resources +managed by an extender.

+ - +

Name is the extended resource name.

+ - - +

IgnoredByScheduler indicates whether kube-scheduler should ignore this +resource when applying predicates.

+ - -
FieldDescription
name [Required]
string
- Name is the extended resource name.
ignoredByScheduler [Required]
bool
- IgnoredByScheduler indicates whether kube-scheduler should ignore this -resource when applying predicates.
## `ExtenderTLSConfig` {#kubescheduler-config-k8s-io-v1beta3-ExtenderTLSConfig} - - **Appears in:** + - [Extender](#kubescheduler-config-k8s-io-v1beta3-Extender) -ExtenderTLSConfig contains settings to enable TLS with extender +

ExtenderTLSConfig contains settings to enable TLS with extender

+ - +

Server should be accessed without verifying the TLS certificate. For testing only.

+ - - +server is used.

+ - - +

Server requires TLS client certificate authentication

+ - - +

Server requires TLS client certificate authentication

+ - - +

Trusted root certificates for server

+ - - +

CertData holds PEM-encoded bytes (typically read from a client certificate file). +CertData takes precedence over CertFile

+ - - +

KeyData holds PEM-encoded bytes (typically read from a client certificate key file). +KeyData takes precedence over KeyFile

+ - - +

CAData holds PEM-encoded bytes (typically read from a root certificates bundle). +CAData takes precedence over CAFile

+ - -
FieldDescription
insecure [Required]
bool
- Server should be accessed without verifying the TLS certificate. For testing only.
serverName [Required]
string
- ServerName is passed to the server for SNI and is used in the client to check server +

ServerName is passed to the server for SNI and is used in the client to check server certificates against. If ServerName is empty, the hostname used to contact the -server is used.

certFile [Required]
string
- Server requires TLS client certificate authentication
keyFile [Required]
string
- Server requires TLS client certificate authentication
caFile [Required]
string
- Trusted root certificates for server
certData [Required]
[]byte
- CertData holds PEM-encoded bytes (typically read from a client certificate file). -CertData takes precedence over CertFile
keyData [Required]
[]byte
- KeyData holds PEM-encoded bytes (typically read from a client certificate key file). -KeyData takes precedence over KeyFile
caData [Required]
[]byte
- CAData holds PEM-encoded bytes (typically read from a root certificates bundle). -CAData takes precedence over CAFile
## `KubeSchedulerProfile` {#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerProfile} - - **Appears in:** + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) -KubeSchedulerProfile is a scheduling profile. +

KubeSchedulerProfile is a scheduling profile.

+ - +

SchedulerName is the name of the scheduler associated to this profile. +If SchedulerName matches with the pod's "spec.schedulerName", then the pod +is scheduled with this profile.

+ - - +PluginConfig must be specified for all profiles.

+ - - +for that plugin.

+ - -
FieldDescription
schedulerName [Required]
string
- SchedulerName is the name of the scheduler associated to this profile. -If SchedulerName matches with the pod's "spec.schedulerName", then the pod -is scheduled with this profile.
plugins [Required]
Plugins
- Plugins specify the set of plugins that should be enabled or disabled. +

Plugins specify the set of plugins that should be enabled or disabled. Enabled plugins are the ones that should be enabled in addition to the default plugins. Disabled plugins are any of the default plugins that should be disabled. When no enabled or disabled plugin is specified for an extension point, default plugins for that extension point will be used if there is any. If a QueueSort plugin is specified, the same QueueSort Plugin and -PluginConfig must be specified for all profiles.

pluginConfig [Required]
[]PluginConfig
- PluginConfig is an optional set of custom plugin arguments for each plugin. +

PluginConfig is an optional set of custom plugin arguments for each plugin. Omitting config args for a plugin is equivalent to using the default config -for that plugin.

## `Plugin` {#kubescheduler-config-k8s-io-v1beta3-Plugin} - - **Appears in:** + - [PluginSet](#kubescheduler-config-k8s-io-v1beta3-PluginSet) -Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins. +

Plugin specifies a plugin name and its weight when applicable. Weight is used only for Score plugins.

+ - +

Name defines the name of plugin

+ - - +

Weight defines the weight of plugin, only used for Score plugins.

+ - -
FieldDescription
name [Required]
string
- Name defines the name of plugin
weight [Required]
int32
- Weight defines the weight of plugin, only used for Score plugins.
## `PluginConfig` {#kubescheduler-config-k8s-io-v1beta3-PluginConfig} - - **Appears in:** + - [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerProfile) -PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. +

PluginConfig specifies arguments that should be passed to a plugin at the time of initialization. A plugin that is invoked at multiple extension points is initialized once. Args can have arbitrary structure. -It is up to the plugin to process these Args. +It is up to the plugin to process these Args.

+ - +

Name defines the name of plugin being configured

+ - - +

Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.

+ - -
FieldDescription
name [Required]
string
- Name defines the name of plugin being configured
args [Required]
-k8s.io/apimachinery/pkg/runtime.RawExtension +k8s.io/apimachinery/pkg/runtime.RawExtension
- Args defines the arguments passed to the plugins at the time of initialization. Args can have arbitrary structure.
## `PluginSet` {#kubescheduler-config-k8s-io-v1beta3-PluginSet} - - **Appears in:** + - [Plugins](#kubescheduler-config-k8s-io-v1beta3-Plugins) -PluginSet specifies enabled and disabled plugins for an extension point. -If an array is empty, missing, or nil, default plugins at that extension point will be used. +

PluginSet specifies enabled and disabled plugins for an extension point. +If an array is empty, missing, or nil, default plugins at that extension point will be used.

+ - +These are called after default plugins and in the same order specified here.

+ - - +

Disabled specifies default plugins that should be disabled. +When all default plugins need to be disabled, an array containing only one "*" should be provided.

+ - -
FieldDescription
enabled [Required]
[]Plugin
- Enabled specifies plugins that should be enabled in addition to default plugins. +

Enabled specifies plugins that should be enabled in addition to default plugins. If the default plugin is also configured in the scheduler config file, the weight of plugin will be overridden accordingly. -These are called after default plugins and in the same order specified here.

disabled [Required]
[]Plugin
- Disabled specifies default plugins that should be disabled. -When all default plugins need to be disabled, an array containing only one "∗" should be provided.
## `Plugins` {#kubescheduler-config-k8s-io-v1beta3-Plugins} - - **Appears in:** + - [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerProfile) -Plugins include multiple extension points. When specified, the list of plugins for +

Plugins include multiple extension points. When specified, the list of plugins for a particular extension point are the only ones enabled. If an extension point is omitted from the config, then the default set of plugins is used for that extension point. Enabled plugins are called in the order specified here, after default plugins. If they need to -be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order. +be invoked before default plugins, default plugins must be disabled and re-enabled here in desired order.

+ - +

QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.

+ - - +

PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the scheduling framework.

+ - - +

Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.

+ - - +

PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.

+ - - +

PreScore is a list of plugins that are invoked before scoring.

+ - - +

Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.

+ - - +

Reserve is a list of plugins invoked when reserving/unreserving resources +after a node is assigned to run the pod.

+ - - +

Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.

+ - - +

PreBind is a list of plugins that should be invoked before a pod is bound.

+ - - +

Bind is a list of plugins that should be invoked at "Bind" extension point of the scheduling framework. +The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.

+ - - +

PostBind is a list of plugins that should be invoked after a pod is successfully bound.

+ - - +set in both multiPoint.Enabled and multiPoint.Disabled, the plugin will be enabled. Similarly, +including multiPoint.Disabled = '*' and multiPoint.Enabled = pluginA will still register that specific +plugin through MultiPoint. This follows the same behavior as all other extension point configurations. + + - -
FieldDescription
queueSort [Required]
PluginSet
- QueueSort is a list of plugins that should be invoked when sorting pods in the scheduling queue.
preFilter [Required]
PluginSet
- PreFilter is a list of plugins that should be invoked at "PreFilter" extension point of the scheduling framework.
filter [Required]
PluginSet
- Filter is a list of plugins that should be invoked when filtering out nodes that cannot run the Pod.
postFilter [Required]
PluginSet
- PostFilter is a list of plugins that are invoked after filtering phase, but only when no feasible nodes were found for the pod.
preScore [Required]
PluginSet
- PreScore is a list of plugins that are invoked before scoring.
score [Required]
PluginSet
- Score is a list of plugins that should be invoked when ranking nodes that have passed the filtering phase.
reserve [Required]
PluginSet
- Reserve is a list of plugins invoked when reserving/unreserving resources -after a node is assigned to run the pod.
permit [Required]
PluginSet
- Permit is a list of plugins that control binding of a Pod. These plugins can prevent or delay binding of a Pod.
preBind [Required]
PluginSet
- PreBind is a list of plugins that should be invoked before a pod is bound.
bind [Required]
PluginSet
- Bind is a list of plugins that should be invoked at "Bind" extension point of the scheduling framework. -The scheduler call these plugins in order. Scheduler skips the rest of these plugins as soon as one returns success.
postBind [Required]
PluginSet
- PostBind is a list of plugins that should be invoked after a pod is successfully bound.
multiPoint [Required]
PluginSet
- MultiPoint is a simplified config section to enable plugins for all valid extension points. +

MultiPoint is a simplified config section to enable plugins for all valid extension points. Plugins enabled through MultiPoint will automatically register for every individual extension point the plugin has implemented. Disabling a plugin through MultiPoint disables that behavior. -The same is true for disabling "∗" through MultiPoint (no default plugins will be automatically registered). -Plugins can still be disabled through their individual extension points. - -In terms of precedence, plugin config follows this basic hierarchy - 1. Specific extension points - 2. Explicitly configured MultiPoint plugins - 3. The set of default plugins, as MultiPoint plugins +The same is true for disabling "*" through MultiPoint (no default plugins will be automatically registered). +Plugins can still be disabled through their individual extension points.

+

In terms of precedence, plugin config follows this basic hierarchy

+
    +
  1. Specific extension points
  2. +
  3. Explicitly configured MultiPoint plugins
  4. +
  5. The set of default plugins, as MultiPoint plugins This implies that a higher precedence plugin will run first and overwrite any settings within MultiPoint. Explicitly user-configured plugins also take a higher precedence over default plugins. Within this hierarchy, an Enabled setting takes precedence over Disabled. For example, if a plugin is -set in both `multiPoint.Enabled` and `multiPoint.Disabled`, the plugin will be enabled. Similarly, -including `multiPoint.Disabled = '∗'` and `multiPoint.Enabled = pluginA` will still register that specific -plugin through MultiPoint. This follows the same behavior as all other extension point configurations.
@@ -988,125 +897,118 @@ plugin through MultiPoint. This follows the same behavior as all other extension (Alias of `string`) - **Appears in:** + - [PodTopologySpreadArgs](#kubescheduler-config-k8s-io-v1beta3-PodTopologySpreadArgs) -PodTopologySpreadConstraintsDefaulting defines how to set default constraints -for the PodTopologySpread plugin. +

PodTopologySpreadConstraintsDefaulting defines how to set default constraints +for the PodTopologySpread plugin.

+ ## `RequestedToCapacityRatioParam` {#kubescheduler-config-k8s-io-v1beta3-RequestedToCapacityRatioParam} - - **Appears in:** + - [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy) -RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters +

RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters

+ - +

Shape is a list of points defining the scoring function shape.

+ - -
FieldDescription
shape [Required]
[]UtilizationShapePoint
- Shape is a list of points defining the scoring function shape.
## `ResourceSpec` {#kubescheduler-config-k8s-io-v1beta3-ResourceSpec} - - **Appears in:** + - [NodeResourcesBalancedAllocationArgs](#kubescheduler-config-k8s-io-v1beta3-NodeResourcesBalancedAllocationArgs) + - [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy) -ResourceSpec represents a single resource. +

ResourceSpec represents a single resource.

+ - +

Name of the resource.

+ - - +

Weight of the resource.

+ - -
FieldDescription
name [Required]
string
- Name of the resource.
weight [Required]
int64
- Weight of the resource.
## `ScoringStrategy` {#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy} - - **Appears in:** + - [NodeResourcesFitArgs](#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs) -ScoringStrategy define ScoringStrategyType for node resource plugin +

ScoringStrategy define ScoringStrategyType for node resource plugin

+ - +

Type selects which strategy to run.

+ - - +Weight defaults to 1 if not specified or explicitly set to 0.

+ - - +

Arguments specific to RequestedToCapacityRatio strategy.

+ - -
FieldDescription
type [Required]
ScoringStrategyType
- Type selects which strategy to run.
resources [Required]
[]ResourceSpec
- Resources to consider when scoring. -The default resource set includes "cpu" and "memory" with an equal weight. +

Resources to consider when scoring. +The default resource set includes "cpu" and "memory" with an equal weight. Allowed weights go from 1 to 100. -Weight defaults to 1 if not specified or explicitly set to 0.

requestedToCapacityRatio [Required]
RequestedToCapacityRatioParam
- Arguments specific to RequestedToCapacityRatio strategy.
@@ -1114,49 +1016,48 @@ Weight defaults to 1 if not specified or explicitly set to 0. (Alias of `string`) - **Appears in:** + - [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy) -ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin. +

ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin.

+ ## `UtilizationShapePoint` {#kubescheduler-config-k8s-io-v1beta3-UtilizationShapePoint} - - **Appears in:** + - [VolumeBindingArgs](#kubescheduler-config-k8s-io-v1beta3-VolumeBindingArgs) + - [RequestedToCapacityRatioParam](#kubescheduler-config-k8s-io-v1beta3-RequestedToCapacityRatioParam) -UtilizationShapePoint represents single point of priority function shape. +

UtilizationShapePoint represents single point of priority function shape.

+ - +

Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.

+ - - +

Score assigned to given utilization (y axis). Valid values are 0 to 10.

+ - -
FieldDescription
utilization [Required]
int32
- Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.
score [Required]
int32
- Score assigned to given utilization (y axis). Valid values are 0 to 10.
@@ -1166,339 +1067,313 @@ UtilizationShapePoint represents single point of priority function shape. ## `ClientConnectionConfiguration` {#ClientConnectionConfiguration} - - **Appears in:** + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) -ClientConnectionConfiguration contains details for constructing a client. +

ClientConnectionConfiguration contains details for constructing a client.

+ - +

kubeconfig is the path to a KubeConfig file.

+ - - +client.

+ - - +

contentType is the content type used when sending data to the server from this client.

+ - - +

qps controls the number of queries per second allowed for this connection.

+ - - +

burst allows extra queries to accumulate when a client is exceeding its rate.

+ - -
FieldDescription
kubeconfig [Required]
string
- kubeconfig is the path to a KubeConfig file.
acceptContentTypes [Required]
string
- acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the +

acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the default value of 'application/json'. This field will control all connections to the server used by a particular -client.

contentType [Required]
string
- contentType is the content type used when sending data to the server from this client.
qps [Required]
float32
- qps controls the number of queries per second allowed for this connection.
burst [Required]
int32
- burst allows extra queries to accumulate when a client is exceeding its rate.
## `DebuggingConfiguration` {#DebuggingConfiguration} - - **Appears in:** -- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) +- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) + + +

DebuggingConfiguration holds configuration for Debugging related features.

-DebuggingConfiguration holds configuration for Debugging related features. - +

enableProfiling enables profiling via web interface host:port/debug/pprof/

+ - - +

enableContentionProfiling enables lock contention profiling, if +enableProfiling is true.

+ - -
FieldDescription
enableProfiling [Required]
bool
- enableProfiling enables profiling via web interface host:port/debug/pprof/
enableContentionProfiling [Required]
bool
- enableContentionProfiling enables lock contention profiling, if -enableProfiling is true.
## `FormatOptions` {#FormatOptions} - - **Appears in:** + - [LoggingConfiguration](#LoggingConfiguration) -FormatOptions contains options for the different logging formats. +

FormatOptions contains options for the different logging formats.

+ - +

[Experimental] JSON contains options for logging format "json".

+ - -
FieldDescription
json [Required]
JSONOptions
- [Experimental] JSON contains options for logging format "json".
## `JSONOptions` {#JSONOptions} - - **Appears in:** + - [FormatOptions](#FormatOptions) -JSONOptions contains options for logging format "json". +

JSONOptions contains options for logging format "json".

+ - +both to stdout, without buffering.

+ - - +

[Experimental] InfoBufferSize sets the size of the info stream when +using split streams. The default is zero, which disables buffering.

+ - -
FieldDescription
splitStream [Required]
bool
- [Experimental] SplitStream redirects error messages to stderr while +

[Experimental] SplitStream redirects error messages to stderr while info messages go to stdout, with buffering. The default is to write -both to stdout, without buffering.

infoBufferSize [Required]
k8s.io/apimachinery/pkg/api/resource.QuantityValue
- [Experimental] InfoBufferSize sets the size of the info stream when -using split streams. The default is zero, which disables buffering.
## `LeaderElectionConfiguration` {#LeaderElectionConfiguration} - - **Appears in:** + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration) + - [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration) -LeaderElectionConfiguration defines the configuration of leader election -clients for components that can run with leader election enabled. +

LeaderElectionConfiguration defines the configuration of leader election +clients for components that can run with leader election enabled.

+ - +components for high availability.

+ - - +enabled.

+ - - +election is enabled.

+ - - +leader election is enabled.

+ - - +

resourceLock indicates the resource object type that will be used to lock +during leader election cycles.

+ - - +

resourceName indicates the name of resource object that will be used to lock +during leader election cycles.

+ - - +

resourceName indicates the namespace of resource object that will be used to lock +during leader election cycles.

+ - -
FieldDescription
leaderElect [Required]
bool
- leaderElect enables a leader election client to gain leadership +

leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated -components for high availability.

leaseDuration [Required]
-meta/v1.Duration +meta/v1.Duration
- leaseDuration is the duration that non-leader candidates will wait +

leaseDuration is the duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is -enabled.

renewDeadline [Required]
-meta/v1.Duration +meta/v1.Duration
- renewDeadline is the interval between attempts by the acting master to +

renewDeadline is the interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than or equal to the lease duration. This is only applicable if leader -election is enabled.

retryPeriod [Required]
-meta/v1.Duration +meta/v1.Duration
- retryPeriod is the duration the clients should wait between attempting +

retryPeriod is the duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if -leader election is enabled.

resourceLock [Required]
string
- resourceLock indicates the resource object type that will be used to lock -during leader election cycles.
resourceName [Required]
string
- resourceName indicates the name of resource object that will be used to lock -during leader election cycles.
resourceNamespace [Required]
string
- resourceName indicates the namespace of resource object that will be used to lock -during leader election cycles.
## `LoggingConfiguration` {#LoggingConfiguration} - - **Appears in:** + - [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) -LoggingConfiguration contains logging options -Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. +

LoggingConfiguration contains logging options +Refer Logs Options for more information.

+ - +

Format Flag specifies the structure of log messages. +default value of format is text

+ - - +

Maximum number of seconds between log flushes. Ignored if the +selected logging backend writes log messages without buffering.

+ - - +are always logged.

+ - - +

VModule overrides the verbosity threshold for individual files. +Only supported for "text" log format.

+ - - +

[Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). +Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)

+ - - +format get used, but all of them get validated.

+ - -
FieldDescription
format [Required]
string
- Format Flag specifies the structure of log messages. -default value of format is `text`
flushFrequency [Required]
-time.Duration +time.Duration
- Maximum number of seconds between log flushes. Ignored if the -selected logging backend writes log messages without buffering.
verbosity [Required]
uint32
- Verbosity is the threshold that determines which log messages are +

Verbosity is the threshold that determines which log messages are logged. Default is zero which logs only the most important messages. Higher values enable additional messages. Error messages -are always logged.

vmodule [Required]
VModuleConfiguration
- VModule overrides the verbosity threshold for individual files. -Only supported for "text" log format.
sanitization [Required]
bool
- [Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). -Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)
options [Required]
FormatOptions
- [Experimental] Options holds additional parameters that are specific +

[Experimental] Options holds additional parameters that are specific to the different logging formats. Only the options for the selected -format get used, but all of them get validated.

@@ -1506,12 +1381,13 @@ format get used, but all of them get validated. (Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) - **Appears in:** + - [LoggingConfiguration](#LoggingConfiguration) -VModuleConfiguration is a collection of individual file names or patterns -and the corresponding verbosity threshold. +

VModuleConfiguration is a collection of individual file names or patterns +and the corresponding verbosity threshold.

+ diff --git a/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md b/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md index f3c5b521ab..8874cf6a36 100644 --- a/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md +++ b/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md @@ -4,280 +4,245 @@ content_type: tool-reference package: kubeadm.k8s.io/v1beta2 auto_generated: true --- -## Overview - -Package v1beta2 defines the v1beta2 version of the kubeadm configuration file format. -This version improves on the v1beta1 format by fixing some minor issues and adding a few new fields. - -A list of changes since v1beta1: - -- "certificateKey" field is added to InitConfiguration and JoinConfiguration. -- "ignorePreflightErrors" field is added to the NodeRegistrationOptions. -- The JSON "omitempty" tag is used in a more places where appropriate. -- The JSON "omitempty" tag of the "taints" field (inside NodeRegistrationOptions) is removed. - -See the Kubernetes 1.15 changelog for further details. - -Migration from old kubeadm config versions - -Please convert your v1beta1 configuration files to v1beta2 using the "kubeadm config migrate" command of kubeadm v1.15.x -(conversion from older releases of kubeadm config files requires older release of kubeadm as well e.g. - -- kubeadm v1.11 should be used to migrate v1alpha1 to v1alpha2; kubeadm v1.12 should be used to translate v1alpha2 to v1alpha3; -- kubeadm v1.13 or v1.14 should be used to translate v1alpha3 to v1beta1) - -Nevertheless, kubeadm v1.15.x will support reading from v1beta1 version of the kubeadm config file format. - -## Basics - -The preferred way to configure kubeadm is to pass an YAML configuration file with the `--config` option. Some of the +

Overview

+

Package v1beta2 defines the v1beta2 version of the kubeadm configuration file format. +This version improves on the v1beta1 format by fixing some minor issues and adding a few new fields.

+

A list of changes since v1beta1:

+ +

See the Kubernetes 1.15 changelog for further details.

+

Migration from old kubeadm config versions

+

Please convert your v1beta1 configuration files to v1beta2 using the "kubeadm config migrate" command of kubeadm v1.15.x +(conversion from older releases of kubeadm config files requires older release of kubeadm as well e.g.

+ +

Nevertheless, kubeadm v1.15.x will support reading from v1beta1 version of the kubeadm config file format.

+

Basics

+

The preferred way to configure kubeadm is to pass an YAML configuration file with the --config option. Some of the configuration options defined in the kubeadm config file are also available as command line flags, but only -the most common/simple use case are supported with this approach. - -A kubeadm config file could contain multiple configuration types separated using three dashes (`---`). - -kubeadm supports the following configuration types: - -```yaml -apiVersion: kubeadm.k8s.io/v1beta2 -kind: InitConfiguration - -apiVersion: kubeadm.k8s.io/v1beta2 -kind: ClusterConfiguration - -apiVersion: kubelet.config.k8s.io/v1beta1 -kind: KubeletConfiguration - -apiVersion: kubeproxy.config.k8s.io/v1alpha1 -kind: KubeProxyConfiguration - -apiVersion: kubeadm.k8s.io/v1beta2 -kind: JoinConfiguration -``` - -To print the defaults for "init" and "join" actions use the following commands: - -```shell -kubeadm config print init-defaults +the most common/simple use case are supported with this approach.

+

A kubeadm config file could contain multiple configuration types separated using three dashes (---).

+

kubeadm supports the following configuration types:

+
apiVersion: kubeadm.k8s.io/v1beta2
+kind: InitConfiguration
+
+apiVersion: kubeadm.k8s.io/v1beta2
+kind: ClusterConfiguration
+
+apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+
+apiVersion: kubeproxy.config.k8s.io/v1alpha1
+kind: KubeProxyConfiguration
+
+apiVersion: kubeadm.k8s.io/v1beta2
+kind: JoinConfiguration
+

To print the defaults for "init" and "join" actions use the following commands:

+
kubeadm config print init-defaults
 kubeadm config print join-defaults
-```
-
-The list of configuration types that must be included in a configuration file depends by the action you are
-performing (`init` or `join`) and by the configuration options you are going to use (defaults or advanced customization).
-
-If some configuration types are not provided, or provided only partially, kubeadm will use default values; defaults
+

The list of configuration types that must be included in a configuration file depends by the action you are +performing (init or join) and by the configuration options you are going to use (defaults or advanced customization).

+

If some configuration types are not provided, or provided only partially, kubeadm will use default values; defaults provided by kubeadm includes also enforcing consistency of values across components when required (e.g. -`--cluster-cidr` flag on controller manager and `clusterCIDR` on kube-proxy). - -Users are always allowed to override default values, with the only exception of a small subset of setting with -relevance for security (e.g. enforce authorization-mode Node and RBAC on API server) - -If the user provides a configuration types that is not expected for the action you are performing, kubeadm will -ignore those types and print a warning. - -## Kubeadm init configuration types - -When executing kubeadm init with the `--config` option, the following configuration types could be used: +--cluster-cidr flag on controller manager and clusterCIDR on kube-proxy).

+

Users are always allowed to override default values, with the only exception of a small subset of setting with +relevance for security (e.g. enforce authorization-mode Node and RBAC on API server)

+

If the user provides a configuration types that is not expected for the action you are performing, kubeadm will +ignore those types and print a warning.

+

Kubeadm init configuration types

+

When executing kubeadm init with the --config option, the following configuration types could be used: InitConfiguration, ClusterConfiguration, KubeProxyConfiguration, KubeletConfiguration, but only one -between InitConfiguration and ClusterConfiguration is mandatory. - -```yaml -apiVersion: kubeadm.k8s.io/v1beta2 -kind: InitConfiguration -bootstrapTokens: - ... -nodeRegistration: - ... -``` - -The InitConfiguration type should be used to configure runtime settings, that in case of `kubeadm init` +between InitConfiguration and ClusterConfiguration is mandatory.

+
apiVersion: kubeadm.k8s.io/v1beta2
+kind: InitConfiguration
+bootstrapTokens:
+  ...
+nodeRegistration:
+  ...
+

The InitConfiguration type should be used to configure runtime settings, that in case of kubeadm init are the configuration of the bootstrap token and all the setting which are specific to the node where kubeadm -is executed, including: - -- `nodeRegistration`, that holds fields that relate to registering the new node to the cluster; - use it to customize the node name, the CRI socket to use or any other settings that should apply to this - node only (e.g. the node ip). - -- `apiServer`, that represents the endpoint of the instance of the API server to be deployed on this node; - use it e.g. to customize the API server advertise address. - - ```yaml - apiVersion: kubeadm.k8s.io/v1beta2 - kind: ClusterConfiguration - networking: - ... - etcd: - ... - apiServer: - extraArgs: - ... - extraVolumes: - ... - ... - ``` - -The ClusterConfiguration type should be used to configure cluster-wide settings, -including settings for: - -- Networking, that holds configuration for the networking topology of the cluster; use it e.g. to customize - pod subnet or services subnet. - -- Etcd configurations; use it e.g. to customize the local etcd or to configure the API server - for using an external etcd cluster. - -- kube-apiserver, kube-scheduler, kube-controller-manager configurations; use it to customize control-plane - components by adding customized setting or overriding kubeadm default settings. - - ```yaml - apiVersion: kubeproxy.config.k8s.io/v1alpha1 - kind: KubeProxyConfiguration - ... - ``` - -The KubeProxyConfiguration type should be used to change the configuration passed to kube-proxy instances deployed -in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults. - -See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ or +is executed, including:

+ +
apiVersion: kubeadm.k8s.io/v1beta2
+kind: ClusterConfiguration
+networking:
+    ...
+etcd:
+    ...
+apiServer:
+  extraArgs:
+    ...
+  extraVolumes:
+    ...
+...
+

The ClusterConfiguration type should be used to configure cluster-wide settings, +including settings for:

+ +
apiVersion: kubeproxy.config.k8s.io/v1alpha1
+kind: KubeProxyConfiguration
+  ...
+

The KubeProxyConfiguration type should be used to change the configuration passed to kube-proxy instances deployed +in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults.

+

See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ or https://godoc.org/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration -for kube proxy official documentation. - -```yaml -apiVersion: kubelet.config.k8s.io/v1beta1 -kind: KubeletConfiguration - ... -``` - -The KubeletConfiguration type should be used to change the configurations that will be passed to all kubelet instances -deployed in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults. - -See https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ or +for kube proxy official documentation.

+
apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+  ...
+

The KubeletConfiguration type should be used to change the configurations that will be passed to all kubelet instances +deployed in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults.

+

See https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ or https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration -for kubelet official documentation. - -Here is a fully populated example of a single YAML file containing multiple -configuration types to be used during a `kubeadm init` run. - -```yaml -apiVersion: kubeadm.k8s.io/v1beta2 -kind: InitConfiguration -bootstrapTokens: - - token: "9a08jv.c0izixklcxtmnze7" - description: "kubeadm bootstrap token" - ttl: "24h" - - token: "783bde.3f89s0fje9f38fhf" - description: "another bootstrap token" - usages: - - authentication - - signing - groups: - - system:bootstrappers:kubeadm:default-node-token -nodeRegistration: - name: "ec2-10-100-0-1" - criSocket: "/var/run/dockershim.sock" - taints: - - key: "kubeadmNode" - value: "master" - effect: "NoSchedule" - kubeletExtraArgs: - v: 4 - ignorePreflightErrors: - - IsPrivilegedUser -localAPIEndpoint: - advertiseAddress: "10.100.0.1" - bindPort: 6443 -certificateKey: "e6a2eb8581237ab72a4f494f30285ec12a9694d750b9785706a83bfcbbbd2204" ---- -apiVersion: kubeadm.k8s.io/v1beta2 -kind: ClusterConfiguration -etcd: - # one of local or external -local: - imageRepository: "k8s.gcr.io" - imageTag: "3.2.24" - dataDir: "/var/lib/etcd" - extraArgs: - listen-client-urls: "http://10.100.0.1:2379" - serverCertSANs: - - "ec2-10-100-0-1.compute-1.amazonaws.com" - peerCertSANs: - - "10.100.0.1" -# external: -# endpoints: -# - "10.100.0.1:2379" -# - "10.100.0.2:2379" -# caFile: "/etcd/kubernetes/pki/etcd/etcd-ca.crt" -# certFile: "/etcd/kubernetes/pki/etcd/etcd.crt" -# keyFile: "/etcd/kubernetes/pki/etcd/etcd.key" -networking: - serviceSubnet: "10.96.0.0/16" - podSubnet: "10.244.0.0/24" - dnsDomain: "cluster.local" -kubernetesVersion: "v1.12.0" -controlPlaneEndpoint: "10.100.0.1:6443" -apiServer: - extraArgs: - authorization-mode: "Node,RBAC" - extraVolumes: - - name: "some-volume" - hostPath: "/etc/some-path" - mountPath: "/etc/some-pod-path" - readOnly: false - pathType: File - certSANs: - - "10.100.1.1" - - "ec2-10-100-0-1.compute-1.amazonaws.com" - timeoutForControlPlane: 4m0s -controllerManager: - extraArgs: - "node-cidr-mask-size": "20" - extraVolumes: - - name: "some-volume" - hostPath: "/etc/some-path" - mountPath: "/etc/some-pod-path" - readOnly: false - pathType: File -scheduler: - extraArgs: - address: "10.100.0.1" - extraVolumes: - - name: "some-volume" - hostPath: "/etc/some-path" - mountPath: "/etc/some-pod-path" - readOnly: false - pathType: File -certificatesDir: "/etc/kubernetes/pki" -imageRepository: "k8s.gcr.io" -useHyperKubeImage: false -clusterName: "example-cluster" ---- -apiVersion: kubelet.config.k8s.io/v1beta1 -kind: KubeletConfiguration -# kubelet specific options here ---- -apiVersion: kubeproxy.config.k8s.io/v1alpha1 -kind: KubeProxyConfiguration -# kube-proxy specific options here -``` - -## Kubeadm join configuration types - -When executing kubeadm join with the `--config` option, the JoinConfiguration type should be provided. - -```yaml -apiVersion: kubeadm.k8s.io/v1beta2 -kind: JoinConfiguration - ... -``` - -The JoinConfiguration type should be used to configure runtime settings, that in case of `kubeadm join` +for kubelet official documentation.

+

Here is a fully populated example of a single YAML file containing multiple +configuration types to be used during a kubeadm init run.

+
apiVersion: kubeadm.k8s.io/v1beta2
+kind: InitConfiguration
+bootstrapTokens:
+  - token: "9a08jv.c0izixklcxtmnze7"
+    description: "kubeadm bootstrap token"
+    ttl: "24h"
+  - token: "783bde.3f89s0fje9f38fhf"
+    description: "another bootstrap token"
+    usages:
+      - authentication
+      - signing
+    groups:
+      - system:bootstrappers:kubeadm:default-node-token
+nodeRegistration:
+  name: "ec2-10-100-0-1"
+  criSocket: "/var/run/dockershim.sock"
+  taints:
+    - key: "kubeadmNode"
+      value: "master"
+      effect: "NoSchedule"
+  kubeletExtraArgs:
+    v: 4
+  ignorePreflightErrors:
+    - IsPrivilegedUser
+localAPIEndpoint:
+  advertiseAddress: "10.100.0.1"
+  bindPort: 6443
+certificateKey: "e6a2eb8581237ab72a4f494f30285ec12a9694d750b9785706a83bfcbbbd2204"
+---
+apiVersion: kubeadm.k8s.io/v1beta2
+kind: ClusterConfiguration
+etcd:
+  # one of local or external
+  local:
+    imageRepository: "k8s.gcr.io"
+    imageTag: "3.2.24"
+    dataDir: "/var/lib/etcd"
+    extraArgs:
+      listen-client-urls: "http://10.100.0.1:2379"
+    serverCertSANs:
+      -  "ec2-10-100-0-1.compute-1.amazonaws.com"
+    peerCertSANs:
+      - "10.100.0.1"
+  # external:
+  #   endpoints:
+  #     - "10.100.0.1:2379"
+  #     - "10.100.0.2:2379"
+  #   caFile: "/etcd/kubernetes/pki/etcd/etcd-ca.crt"
+  #   certFile: "/etcd/kubernetes/pki/etcd/etcd.crt"
+  #   keyFile: "/etcd/kubernetes/pki/etcd/etcd.key"
+networking:
+  serviceSubnet: "10.96.0.0/16"
+  podSubnet: "10.244.0.0/24"
+  dnsDomain: "cluster.local"
+kubernetesVersion: "v1.12.0"
+controlPlaneEndpoint: "10.100.0.1:6443"
+apiServer:
+  extraArgs:
+    authorization-mode: "Node,RBAC"
+  extraVolumes:
+    - name: "some-volume"
+      hostPath: "/etc/some-path"
+      mountPath: "/etc/some-pod-path"
+      readOnly: false
+      pathType: File
+  certSANs:
+    - "10.100.1.1"
+    - "ec2-10-100-0-1.compute-1.amazonaws.com"
+  timeoutForControlPlane: 4m0s
+controllerManager:
+  extraArgs:
+    "node-cidr-mask-size": "20"
+  extraVolumes:
+    - name: "some-volume"
+      hostPath: "/etc/some-path"
+      mountPath: "/etc/some-pod-path"
+      readOnly: false
+      pathType: File
+scheduler:
+  extraArgs:
+    address: "10.100.0.1"
+  extraVolumes:
+    - name: "some-volume"
+      hostPath: "/etc/some-path"
+      mountPath: "/etc/some-pod-path"
+      readOnly: false
+      pathType: File
+certificatesDir: "/etc/kubernetes/pki"
+imageRepository: "k8s.gcr.io"
+useHyperKubeImage: false
+clusterName: "example-cluster"
+---
+apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+# kubelet specific options here
+---
+apiVersion: kubeproxy.config.k8s.io/v1alpha1
+kind: KubeProxyConfiguration
+# kube-proxy specific options here
+

Kubeadm join configuration types

+

When executing kubeadm join with the --config option, the JoinConfiguration type should be provided.

+
apiVersion: kubeadm.k8s.io/v1beta2
+kind: JoinConfiguration
+  ...
+

The JoinConfiguration type should be used to configure runtime settings, that in case of kubeadm join are the discovery method used for accessing the cluster info and all the setting which are specific -to the node where kubeadm is executed, including: +to the node where kubeadm is executed, including:

+ -- `NodeRegistration`, that holds fields that relate to registering the new node to the cluster; - use it to customize the node name, the CRI socket to use or any other settings that should apply to this - node only (e.g. the node IP). - -- `APIEndpoint`, that represents the endpoint of the instance of the API server to be eventually deployed on this node. ## Resource Types @@ -293,10 +258,9 @@ to the node where kubeadm is executed, including: +

ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster

-ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster - @@ -304,132 +268,118 @@ ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster - - +

etcd holds configuration for etcd.

+ - - +

networking holds configuration for the networking topology of the cluster.

+ - - +

kubernetesVersion is the target version of the control plane.

+ - - +In case the controlPlaneEndpoint is not specified, the advertiseAddress + bindPort +are used; in case the controlPlaneEndpoint is specified but without a TCP port, +the bindPort is used. +Possible usages are:

+ + - - +

apiServer contains extra settings for the API server.

+ - - +

controllerManager contains extra settings for the controller manager.

+ - - +

scheduler contains extra settings for the scheduler.

+ - - +

dns defines the options for the DNS add-on installed in the cluster.

+ - - +

certificatesDir specifies where to store or look for all required certificates.

+ - - +k8s.gcr.io will be used for all the other images.

+ - - +when this set to true, and at some point it may become ignored.

+ - - +

featureGates contains the feature gates enabled by the user.

+ - - +

The cluster name.

+ - -
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta2
kind
string
ClusterConfiguration
etcd [Required]
Etcd
- `etcd` holds configuration for etcd.
networking [Required]
Networking
- `networking` holds configuration for the networking topology of the cluster.
kubernetesVersion [Required]
string
- `kubernetesVersion` is the target version of the control plane.
controlPlaneEndpoint [Required]
string
- `controlPlaneEndpoint` sets a stable IP address or DNS name for the control plane; it +

controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. -In case the `controlPlaneEndpoint` is not specified, the `advertiseAddress` + `bindPort` -are used; in case the `controlPlaneEndpoint` is specified but without a TCP port, -the `bindPort` is used. -Possible usages are: - -- In a cluster with more than one control plane instances, this field should be - assigned the address of the external load balancer in front of the - control plane instances. -- In environments with enforced node recycling, the `controlPlaneEndpoint` - could be used for assigning a stable DNS to the control plane.

apiServer [Required]
APIServer
- `apiServer` contains extra settings for the API server.
controllerManager [Required]
ControlPlaneComponent
- `controllerManager` contains extra settings for the controller manager.
scheduler [Required]
ControlPlaneComponent
- `scheduler` contains extra settings for the scheduler.
dns [Required]
DNS
- `dns` defines the options for the DNS add-on installed in the cluster.
certificatesDir [Required]
string
- `certificatesDir` specifies where to store or look for all required certificates.
imageRepository [Required]
string
- `mageRepository` sets the container registry to pull images from. -If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is -a CI build (kubernetes version starts with `ci/`) `gcr.io/k8s-staging-ci-images` +

mageRepository sets the container registry to pull images from. +If empty, k8s.gcr.io will be used by default; in case of kubernetes version is +a CI build (kubernetes version starts with ci/) gcr.io/k8s-staging-ci-images is used as a default for control plane components and for kube-proxy, while -`k8s.gcr.io` will be used for all the other images.

useHyperKubeImage [Required]
bool
- `useHyperKubeImage` controls if hyperkube should be used for Kubernetes components +

useHyperKubeImage controls if hyperkube should be used for Kubernetes components instead of their respective separate images. -DEPRECATED: As `hyperkube` is itself deprecated, this fields is too. It will be +DEPRECATED: As hyperkube is itself deprecated, this fields is too. It will be removed in future kubeadm config versions, kubeadm will print multiple warnings -when this set to true, and at some point it may become ignored.

featureGates [Required]
map[string]bool
- `featureGates` contains the feature gates enabled by the user.
clusterName [Required]
string
- The cluster name.
@@ -437,11 +387,10 @@ when this set to true, and at some point it may become ignored. - - -ClusterStatus contains the cluster status. The ClusterStatus will be stored in +

ClusterStatus contains the cluster status. The ClusterStatus will be stored in the kubeadm-config ConfigMap in the cluster, and then updated by kubeadm when -additional control plane instance joins or leaves the cluster. +additional control plane instance joins or leaves the cluster.

+ @@ -450,19 +399,16 @@ additional control plane instance joins or leaves the cluster. - - +The key of the map is the IP of the host's default interface.

+ - -
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta2
kind
string
ClusterStatus
apiEndpoints [Required]
map[string]github.com/tengqm/kubeconfig/config/kubeadm/v1beta2.APIEndpoint
- `apiEndpoints` currently available in the cluster, one for each control +

apiEndpoints currently available in the cluster, one for each control plane/API server instance. -The key of the map is the IP of the host's default interface.

@@ -470,11 +416,10 @@ The key of the map is the IP of the host's default interface. +

InitConfiguration contains a list of elements that is specific "kubeadm init"-only runtime +information.

-InitConfiguration contains a list of elements that is specific "kubeadm init"-only runtime -information. - @@ -482,48 +427,42 @@ information. - - +

bootstrapTokens is respected at kubeadm init time and describes a set of bootstrap tokens to create. +This information IS NOT uploaded to the kubeadm cluster ConfigMap, partly because of its sensitive nature.

+ - - +

nodeRegistration holds fields that relate to registering the new control-plane node to the cluster.

+ - - +fails you may set the desired value here.

+ - - +

certificateKey sets the key with which certificates and keys are encrypted prior to being uploaded in +a secret in the cluster during the uploadcerts init phase.

+ - -
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta2
kind
string
InitConfiguration
bootstrapTokens [Required]
[]BootstrapToken
- `bootstrapTokens` is respected at `kubeadm init` time and describes a set of bootstrap tokens to create. -This information IS NOT uploaded to the kubeadm cluster ConfigMap, partly because of its sensitive nature.
nodeRegistration [Required]
NodeRegistrationOptions
- `nodeRegistration` holds fields that relate to registering the new control-plane node to the cluster.
localAPIEndpoint [Required]
APIEndpoint
- `localAPIEndpoint` represents the endpoint of the API server instance that's deployed on this control plane node. -In HA setups, this differs from `ClusterConfiguration.controlPlaneEndpoint` in the sense that ControlPlaneEndpoint +

localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node. +In HA setups, this differs from ClusterConfiguration.controlPlaneEndpoint in the sense that ControlPlaneEndpoint is the global endpoint for the cluster, which then load-balances the requests to each individual API server. This configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process -fails you may set the desired value here.

certificateKey [Required]
string
- `certificateKey` sets the key with which certificates and keys are encrypted prior to being uploaded in -a secret in the cluster during the `uploadcerts init` phase.
@@ -531,10 +470,9 @@ a secret in the cluster during the `uploadcerts init` phase. +

JoinConfiguration contains elements describing a particular node.

-JoinConfiguration contains elements describing a particular node. - @@ -542,384 +480,347 @@ JoinConfiguration contains elements describing a particular node. - - +

nodeRegistration holds fields that relate to registering the new +control-plane node to the cluster

+ - - +Defaults to "/etc/kubernetes/pki/ca.crt".

+ - - +

discovery specifies the options for the kubelet to use during the TLS +bootstrap process.

+ - - +

controlPlane defines the additional control plane instance to be deployed +on the joining node. If nil, no additional control plane instance will be deployed.

+ - -
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta2
kind
string
JoinConfiguration
nodeRegistration [Required]
NodeRegistrationOptions
- `nodeRegistration` holds fields that relate to registering the new -control-plane node to the cluster
caCertPath [Required]
string
- `caCertPath` is the path to the SSL certificate authority used to +

caCertPath is the path to the SSL certificate authority used to secure comunications between a node and the control-plane. -Defaults to "/etc/kubernetes/pki/ca.crt".

discovery [Required]
Discovery
- `discovery` specifies the options for the kubelet to use during the TLS -bootstrap process.
controlPlane [Required]
JoinControlPlane
- `controlPlane` defines the additional control plane instance to be deployed -on the joining node. If nil, no additional control plane instance will be deployed.
## `APIEndpoint` {#kubeadm-k8s-io-v1beta2-APIEndpoint} - - **Appears in:** + - [ClusterStatus](#kubeadm-k8s-io-v1beta2-ClusterStatus) + - [InitConfiguration](#kubeadm-k8s-io-v1beta2-InitConfiguration) + - [JoinControlPlane](#kubeadm-k8s-io-v1beta2-JoinControlPlane) -APIEndpoint struct contains elements of API server instance deployed on a node. +

APIEndpoint struct contains elements of API server instance deployed on a node.

+ - +

advertiseAddress sets the IP address for the API server to advertise.

+ - - +

bindPort sets the secure port for the API Server to bind to. +Defaults to 6443.

+ - -
FieldDescription
advertiseAddress [Required]
string
- `advertiseAddress` sets the IP address for the API server to advertise.
bindPort [Required]
int32
- `bindPort` sets the secure port for the API Server to bind to. -Defaults to 6443.
## `APIServer` {#kubeadm-k8s-io-v1beta2-APIServer} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta2-ClusterConfiguration) -APIServer holds settings necessary for API server deployments in the cluster. +

APIServer holds settings necessary for API server deployments in the cluster.

+ - + No description provided. - - +

certSANs sets extra Subject Alternative Names (SANs) for the API Server +signing certificate.

+ - - +

timeoutForControlPlane controls the timeout that we wait for the API server +to appear.

+ - -
FieldDescription
ControlPlaneComponent [Required]
ControlPlaneComponent
(Members of ControlPlaneComponent are embedded into this type.) - No description provided. -
certSANs [Required]
[]string
- `certSANs` sets extra Subject Alternative Names (SANs) for the API Server -signing certificate.
timeoutForControlPlane [Required]
-meta/v1.Duration +meta/v1.Duration
- `timeoutForControlPlane` controls the timeout that we wait for the API server -to appear.
## `BootstrapToken` {#kubeadm-k8s-io-v1beta2-BootstrapToken} - - **Appears in:** + - [InitConfiguration](#kubeadm-k8s-io-v1beta2-InitConfiguration) -BootstrapToken describes one bootstrap token, stored as a Secret in the cluster +

BootstrapToken describes one bootstrap token, stored as a Secret in the cluster

+ - +

token is used for establishing bidirectional trust between nodes and control-planes. +Used for joining nodes in the cluster.

+ - - +

description sets a human-friendly message why this token exists and what it's used +for, so other administrators can know its purpose.

+ - - +

ttl defines the time to live for this token. Defaults to '24h'. +expires and ttl are mutually exclusive.

+ - - +

expires specifies the timestamp when this token expires. Defaults to being set +dynamically at runtime based on the ttl. expires and ttl are mutually exclusive.

+ - - +

usages describes the ways in which this token can be used. Can by default be used +for establishing bidirectional trust, but that can be changed here.

+ - - +

groups specifies the extra groups that this token will authenticate as when/if +used for authentication.

+ - -
FieldDescription
token [Required]
BootstrapTokenString
- `token` is used for establishing bidirectional trust between nodes and control-planes. -Used for joining nodes in the cluster.
description [Required]
string
- `description` sets a human-friendly message why this token exists and what it's used -for, so other administrators can know its purpose.
ttl [Required]
-meta/v1.Duration +meta/v1.Duration
- `ttl` defines the time to live for this token. Defaults to '24h'. -`expires` and `ttl` are mutually exclusive.
expires [Required]
meta/v1.Time
- `expires` specifies the timestamp when this token expires. Defaults to being set -dynamically at runtime based on the `ttl`. `expires` and `ttl` are mutually exclusive.
usages [Required]
[]string
- `usages` describes the ways in which this token can be used. Can by default be used -for establishing bidirectional trust, but that can be changed here.
groups [Required]
[]string
- `groups` specifies the extra groups that this token will authenticate as when/if -used for authentication.
## `BootstrapTokenDiscovery` {#kubeadm-k8s-io-v1beta2-BootstrapTokenDiscovery} - - **Appears in:** + - [Discovery](#kubeadm-k8s-io-v1beta2-Discovery) -BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery +

BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery

+ - +

token is a token used to validate cluster information fetched from +the control-plane.

+ - - +

apiServerEndpoint is an IP or domain name to the API server from which information +will be fetched.

+ - - +DER-encoded ASN.1. These hashes can be calculated using, for example, OpenSSL.

+ - - +

unsafeSkipCAVerification allows token-based discovery without CA verification via +caCertHashes. This can weaken the security of kubeadm since other nodes can +impersonate the control-plane.

+ - -
FieldDescription
token [Required]
string
- `token` is a token used to validate cluster information fetched from -the control-plane.
apiServerEndpoint [Required]
string
- `apiServerEndpoint` is an IP or domain name to the API server from which information -will be fetched.
caCertHashes [Required]
[]string
- `caCertHashes` specifies a set of public key pins to verify when token-based discovery +

caCertHashes specifies a set of public key pins to verify when token-based discovery is used. The root CA found during discovery must match one of these values. Specifying an empty set disables root CA pinning, which can be unsafe. -Each hash is specified as ":", where the only currently supported type is "sha256". +Each hash is specified as ":", where the only currently supported type is "sha256". This is a hex-encoded SHA-256 hash of the Subject Public Key Info (SPKI) object in -DER-encoded ASN.1. These hashes can be calculated using, for example, OpenSSL.

unsafeSkipCAVerification [Required]
bool
- `unsafeSkipCAVerification` allows token-based discovery without CA verification via -`caCertHashes`. This can weaken the security of kubeadm since other nodes can -impersonate the control-plane.
## `BootstrapTokenString` {#kubeadm-k8s-io-v1beta2-BootstrapTokenString} - - **Appears in:** + - [BootstrapToken](#kubeadm-k8s-io-v1beta2-BootstrapToken) -BootstrapTokenString is a token of the format abcdef.abcdef0123456789 that is used +

BootstrapTokenString is a token of the format abcdef.abcdef0123456789 that is used for both validation of the practically of the API server from a joining node's point of view and as an authentication method for the node in the bootstrap phase of -"kubeadm join". This token is and should be short-lived +"kubeadm join". This token is and should be short-lived

+ - + No description provided. - - + No description provided. - -
FieldDescription
- [Required]
string
- No description provided. -
- [Required]
string
- No description provided. -
## `ControlPlaneComponent` {#kubeadm-k8s-io-v1beta2-ControlPlaneComponent} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta2-ClusterConfiguration) + - [APIServer](#kubeadm-k8s-io-v1beta2-APIServer) -ControlPlaneComponent holds settings common to control plane component of the cluster +

ControlPlaneComponent holds settings common to control plane component of the cluster

+ - +without leading dash(es).

+ - - +

extraVolumes is an extra set of host volumes mounted to the control plane +component.

+ - -
FieldDescription
extraArgs [Required]
map[string]string
- `extraArgs` is an extra set of flags to pass to a control plane component. +

extraArgs is an extra set of flags to pass to a control plane component. A key in this map is the flag name as it appears on the command line except -without leading dash(es).

extraVolumes [Required]
[]HostPathMount
- `extraVolumes` is an extra set of host volumes mounted to the control plane -component.
## `DNS` {#kubeadm-k8s-io-v1beta2-DNS} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta2-ClusterConfiguration) -DNS defines the DNS addon that should be used in the cluster +

DNS defines the DNS addon that should be used in the cluster

+ - +

type defines the DNS add-on to be used.

+ - - +

ImageMeta allows to customize the image used for the DNS component

+ - -
FieldDescription
type [Required]
DNSAddOnType
- `type` defines the DNS add-on to be used.
ImageMeta [Required]
ImageMeta
(Members of ImageMeta are embedded into this type.) - ImageMeta allows to customize the image used for the DNS component
@@ -927,523 +828,481 @@ DNS defines the DNS addon that should be used in the cluster (Alias of `string`) - **Appears in:** + - [DNS](#kubeadm-k8s-io-v1beta2-DNS) -DNSAddOnType defines string identifying DNS add-on types. +

DNSAddOnType defines string identifying DNS add-on types.

+ ## `Discovery` {#kubeadm-k8s-io-v1beta2-Discovery} - - **Appears in:** + - [JoinConfiguration](#kubeadm-k8s-io-v1beta2-JoinConfiguration) -Discovery specifies the options for the kubelet to use during the TLS Bootstrap process +

Discovery specifies the options for the kubelet to use during the TLS Bootstrap process

+ - +

bootstrapToken is used to set the options for bootstrap token based discovery. +bootstrapToken and file are mutually exclusive.

+ - - +bootstrapToken and file are mutually exclusive.

+ - - +

tlsBootstrapToken is a token used for TLS bootstrapping. +If bootstrapToken is set, this field is defaulted to .bootstrapToken.token, but can be overridden. If file` is set, this field must be set in case the KubeConfigFile does not +contain any other authentication information.

+ - - +

timeout modifies the discovery timeout.

+ - -
FieldDescription
bootstrapToken [Required]
BootstrapTokenDiscovery
- `bootstrapToken` is used to set the options for bootstrap token based discovery. -`bootstrapToken` and `file` are mutually exclusive.
file [Required]
FileDiscovery
- `file` is used to specify a file or URL to a kubeconfig file from which to load +

file is used to specify a file or URL to a kubeconfig file from which to load cluster information. -`bootstrapToken` and `file` are mutually exclusive.

tlsBootstrapToken [Required]
string
- `tlsBootstrapToken` is a token used for TLS bootstrapping. -If `bootstrapToken` is set, this field is defaulted to `.bootstrapToken.token, -but can be overridden. -If `file` is set, this field ∗∗must be set∗∗ in case the KubeConfigFile does not -contain any other authentication information.
timeout [Required]
-meta/v1.Duration +meta/v1.Duration
- `timeout` modifies the discovery timeout.
## `Etcd` {#kubeadm-k8s-io-v1beta2-Etcd} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta2-ClusterConfiguration) -Etcd contains elements describing Etcd configuration. +

Etcd contains elements describing Etcd configuration.

+ - +

local provides configuration knobs for configuring the local etcd instance. +local and external are mutually exclusive.

+ - - +

external describes how to connect to an external etcd cluster. +local and external are mutually exclusive.

+ - -
FieldDescription
local [Required]
LocalEtcd
- `local` provides configuration knobs for configuring the local etcd instance. -`local` and `external` are mutually exclusive.
external [Required]
ExternalEtcd
- `external` describes how to connect to an external etcd cluster. -`local` and `external` are mutually exclusive.
## `ExternalEtcd` {#kubeadm-k8s-io-v1beta2-ExternalEtcd} - - **Appears in:** + - [Etcd](#kubeadm-k8s-io-v1beta2-Etcd) -ExternalEtcd describes an external etcd cluster. -Kubeadm has no knowledge of where certificate files live and they must be supplied. +

ExternalEtcd describes an external etcd cluster. +Kubeadm has no knowledge of where certificate files live and they must be supplied.

+ - +

endpoints of etcd members.

+ - - +

caFile is an SSL Certificate Authority (CA) file used to secure etcd communication. +Required if using a TLS connection.

+ - - +

certFile is an SSL certification file used to secure etcd communication. +Required if using a TLS connection.

+ - - +

keyFile is an SSL key file used to secure etcd communication. +Required if using a TLS connection.

+ - -
FieldDescription
endpoints [Required]
[]string
- `endpoints` of etcd members.
caFile [Required]
string
- `caFile` is an SSL Certificate Authority (CA) file used to secure etcd communication. -Required if using a TLS connection.
certFile [Required]
string
- `certFile` is an SSL certification file used to secure etcd communication. -Required if using a TLS connection.
keyFile [Required]
string
- `keyFile` is an SSL key file used to secure etcd communication. -Required if using a TLS connection.
## `FileDiscovery` {#kubeadm-k8s-io-v1beta2-FileDiscovery} - - **Appears in:** + - [Discovery](#kubeadm-k8s-io-v1beta2-Discovery) -FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information +

FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load cluster information

+ - +

kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file +from which to load cluster information.

+ - -
FieldDescription
kubeConfigPath [Required]
string
- `kubeConfigPath` is used to specify the actual file path or URL to the kubeconfig file -from which to load cluster information.
## `HostPathMount` {#kubeadm-k8s-io-v1beta2-HostPathMount} - - **Appears in:** + - [ControlPlaneComponent](#kubeadm-k8s-io-v1beta2-ControlPlaneComponent) -HostPathMount contains elements describing volumes that are mounted from the host. +

HostPathMount contains elements describing volumes that are mounted from the host.

+ - +

name of the volume inside the Pod template.

+ - - +

hostPath is the path in the host that will be mounted inside the Pod.

+ - - +

mountPathis the path inside the Pod where hostPath volume will be mounted.

+ - - +

readOnly controls write access to the volume.

+ - - +

pathType is the type of the HostPath.

+ - -
FieldDescription
name [Required]
string
- `name` of the volume inside the Pod template.
hostPath [Required]
string
- `hostPath` is the path in the host that will be mounted inside the Pod.
mountPath [Required]
string
- `mountPath`is the path inside the Pod where hostPath volume will be mounted.
readOnly [Required]
bool
- `readOnly` controls write access to the volume.
pathType [Required]
core/v1.HostPathType
- `pathType` is the type of the HostPath.
## `ImageMeta` {#kubeadm-k8s-io-v1beta2-ImageMeta} - - **Appears in:** + - [DNS](#kubeadm-k8s-io-v1beta2-DNS) + - [LocalEtcd](#kubeadm-k8s-io-v1beta2-LocalEtcd) -ImageMeta allows to customize the image used for components that are not -originated from the Kubernetes/Kubernetes release process +

ImageMeta allows to customize the image used for components that are not +originated from the Kubernetes/Kubernetes release process

+ - +

mageRepository sets the container registry to pull images from. +If not set, the imageRepository defined in ClusterConfiguration will be used.

+ - - +version of the above components during upgrades.

+ - -
FieldDescription
imageRepository [Required]
string
- `mageRepository` sets the container registry to pull images from. -If not set, the `imageRepository` defined in ClusterConfiguration will be used.
imageTag [Required]
string
- `imageTag` allows for specifying a tag for the image. +

imageTag allows for specifying a tag for the image. In case this value is set, kubeadm does not change automatically the -version of the above components during upgrades.

## `JoinControlPlane` {#kubeadm-k8s-io-v1beta2-JoinControlPlane} - - **Appears in:** + - [JoinConfiguration](#kubeadm-k8s-io-v1beta2-JoinConfiguration) -JoinControlPlane contains elements describing an additional control plane instance -to be deployed on the joining node. +

JoinControlPlane contains elements describing an additional control plane instance +to be deployed on the joining node.

+ - +

localAPIEndpoint represents the endpoint of the API server instance +to be deployed on this node.

+ - - +The corresponding encryption key is in the InitConfiguration.

+ - -
FieldDescription
localAPIEndpoint [Required]
APIEndpoint
- `localAPIEndpoint` represents the endpoint of the API server instance -to be deployed on this node.
certificateKey [Required]
string
- `certificateKey` is the key that is used for decryption of certificates after +

certificateKey is the key that is used for decryption of certificates after they are downloaded from the secret upon joining a new control plane node. -The corresponding encryption key is in the InitConfiguration.

## `LocalEtcd` {#kubeadm-k8s-io-v1beta2-LocalEtcd} - - **Appears in:** + - [Etcd](#kubeadm-k8s-io-v1beta2-Etcd) -LocalEtcd describes that kubeadm should run an etcd cluster locally. +

LocalEtcd describes that kubeadm should run an etcd cluster locally.

+ - +

ImageMeta allows to customize the container used for etcd.

+ - - +

dataDir is the directory etcd will place its data. +Defaults to "/var/lib/etcd".

+ - - +command line except without leading dash(es).

+ - - +

serverCertSANs sets extra Subject Alternative Names (SANs) for the +etcd server signing certificate.

+ - - +

peerCertSANs sets extra Subject Alternative Names (SANs) for the +etcd peer signing certificate.

+ - -
FieldDescription
ImageMeta [Required]
ImageMeta
(Members of ImageMeta are embedded into this type.) - ImageMeta allows to customize the container used for etcd.
dataDir [Required]
string
- `dataDir` is the directory etcd will place its data. -Defaults to "/var/lib/etcd".
extraArgs [Required]
map[string]string
- `extraArgs` are extra arguments provided to the etcd binary when run +

extraArgs are extra arguments provided to the etcd binary when run inside a static pod. A key in this map is the flag name as it appears on the -command line except without leading dash(es).

serverCertSANs [Required]
[]string
- `serverCertSANs` sets extra Subject Alternative Names (SANs) for the -etcd server signing certificate.
peerCertSANs [Required]
[]string
- `peerCertSANs` sets extra Subject Alternative Names (SANs) for the -etcd peer signing certificate.
## `Networking` {#kubeadm-k8s-io-v1beta2-Networking} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta2-ClusterConfiguration) -Networking contains elements describing cluster's networking configuration +

Networking contains elements describing cluster's networking configuration

+ - +

serviceSubnet is the subnet used by kubernetes Services. Defaults to "10.96.0.0/12".

+ - - +

podSubnet is the subnet used by Pods.

+ - - +

dnsDomain is the DNS domain used by kubernetes Services. Defaults to "cluster.local".

+ - -
FieldDescription
serviceSubnet [Required]
string
- `serviceSubnet` is the subnet used by kubernetes Services. Defaults to "10.96.0.0/12".
podSubnet [Required]
string
- `podSubnet` is the subnet used by Pods.
dnsDomain [Required]
string
- `dnsDomain` is the DNS domain used by kubernetes Services. Defaults to "cluster.local".
## `NodeRegistrationOptions` {#kubeadm-k8s-io-v1beta2-NodeRegistrationOptions} - - **Appears in:** + - [InitConfiguration](#kubeadm-k8s-io-v1beta2-InitConfiguration) + - [JoinConfiguration](#kubeadm-k8s-io-v1beta2-JoinConfiguration) -NodeRegistrationOptions holds fields that relate to registering a new control-plane -or node to the cluster, either via "kubeadm init" or "kubeadm join". +

NodeRegistrationOptions holds fields that relate to registering a new control-plane +or node to the cluster, either via "kubeadm init" or "kubeadm join".

+ - +Defaults to the hostname of the node if not provided.

+ - - +

`criSocket is used to retrieve container runtime information. This information will +be annotated to the Node API object, for later re-use.

+ - - +

taints specifies the taints the Node API object should be registered with. +If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted to +'node-role.kubernetes.io/master=""'. If you don't want to taint your control-plane node, +set this field to an empty list, i.e. taints: [] in the YAML file. This field is +solely used for Node registration.

+ - - +A key in this map is the flag name as it appears on the command line except without leading dash(es).

+ - - +

ignorePreflightErrors provides a list of pre-flight errors to be ignored when the +current node is registered.

+ - -
FieldDescription
name [Required]
string
- `name` is the `.Metadata.Name` field of the Node API object that will be created -in this `kubeadm init` or `kubeadm join` operation. -This field is also used in the `CommonName` field of the kubelet's client certificate +

name is the .Metadata.Name field of the Node API object that will be created +in this kubeadm init or kubeadm join operation. +This field is also used in the CommonName field of the kubelet's client certificate to the API server. -Defaults to the hostname of the node if not provided.

criSocket [Required]
string
- `criSocket is used to retrieve container runtime information. This information will -be annotated to the Node API object, for later re-use.
taints [Required]
[]core/v1.Taint
- `taints` specifies the taints the Node API object should be registered with. -If this field is unset, i.e. nil, in the `kubeadm init` process it will be defaulted to -`'node-role.kubernetes.io/master=""'`. If you don't want to taint your control-plane node, -set this field to an empty list, i.e. `taints: []` in the YAML file. This field is -solely used for Node registration.
kubeletExtraArgs [Required]
map[string]string
- `kubeletExtraArgs` passes through extra arguments to the kubelet. The arguments here are +

kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the 'kubelet-config-1.X' ConfigMap. Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. -A key in this map is the flag name as it appears on the command line except without leading dash(es).

ignorePreflightErrors [Required]
[]string
- `ignorePreflightErrors` provides a list of pre-flight errors to be ignored when the -current node is registered.
diff --git a/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md b/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md index 024a4a6f0a..10c1ff80dd 100644 --- a/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md +++ b/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md @@ -4,293 +4,262 @@ content_type: tool-reference package: kubeadm.k8s.io/v1beta3 auto_generated: true --- -## Overview - -Package v1beta3 defines the v1beta3 version of the kubeadm configuration file format. -This version improves on the v1beta2 format by fixing some minor issues and adding a few new fields. - -A list of changes since v1beta2: - -- The deprecated "ClusterConfiguration.useHyperKubeImage" field has been removed. - Kubeadm no longer supports the hyperkube image. -- The "ClusterConfiguration.DNS.Type" field has been removed since CoreDNS is the only supported - DNS server type by kubeadm. -- Include "datapolicy" tags on the fields that hold secrets. - This would result in the field values to be omitted when API structures are printed with klog. -- Add "InitConfiguration.SkipPhases", "JoinConfiguration.SkipPhases" to allow skipping - a list of phases during kubeadm init/join command execution. -- Add "InitConfiguration.NodeRegistration.ImagePullPolicy" and "JoinConfiguration.NodeRegistration.ImagePullPolicy" - to allow specifying the images pull policy during kubeadm "init" and "join". - The value must be one of "Always", "Never" or "IfNotPresent". - "IfNotPresent" is the default, which has been the existing behavior prior to this addition. -- Add "InitConfiguration.Patches.Directory", "JoinConfiguration.Patches.Directory" to allow - the user to configure a directory from which to take patches for components deployed by kubeadm. -- Move the BootstrapToken∗ API and related utilities out of the "kubeadm" API group to a new group - "bootstraptoken". The kubeadm API version v1beta3 no longer contains the BootstrapToken∗ structures. - -Migration from old kubeadm config versions - -- kubeadm v1.15.x and newer can be used to migrate from v1beta1 to v1beta2. -- kubeadm v1.22.x and newer no longer support v1beta1 and older APIs, but can be used to migrate v1beta2 to v1beta3. - -## Basics - -The preferred way to configure kubeadm is to pass an YAML configuration file with the `--config` option. Some of the +

Overview

+

Package v1beta3 defines the v1beta3 version of the kubeadm configuration file format. +This version improves on the v1beta2 format by fixing some minor issues and adding a few new fields.

+

A list of changes since v1beta2:

+ +

Migration from old kubeadm config versions

+ +

Basics

+

The preferred way to configure kubeadm is to pass an YAML configuration file with the --config option. Some of the configuration options defined in the kubeadm config file are also available as command line flags, but only -the most common/simple use case are supported with this approach. - -A kubeadm config file could contain multiple configuration types separated using three dashes (`---`). - -kubeadm supports the following configuration types: - -```yaml -apiVersion: kubeadm.k8s.io/v1beta3 -kind: InitConfiguration - -apiVersion: kubeadm.k8s.io/v1beta3 -kind: ClusterConfiguration - -apiVersion: kubelet.config.k8s.io/v1beta1 -kind: KubeletConfiguration - -apiVersion: kubeproxy.config.k8s.io/v1alpha1 -kind: KubeProxyConfiguration - -apiVersion: kubeadm.k8s.io/v1beta3 -kind: JoinConfiguration -``` - -To print the defaults for "init" and "join" actions use the following commands: - -```shell -kubeadm config print init-defaults +the most common/simple use case are supported with this approach.

+

A kubeadm config file could contain multiple configuration types separated using three dashes (---).

+

kubeadm supports the following configuration types:

+
apiVersion: kubeadm.k8s.io/v1beta3
+kind: InitConfiguration
+
+apiVersion: kubeadm.k8s.io/v1beta3
+kind: ClusterConfiguration
+
+apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+
+apiVersion: kubeproxy.config.k8s.io/v1alpha1
+kind: KubeProxyConfiguration
+
+apiVersion: kubeadm.k8s.io/v1beta3
+kind: JoinConfiguration
+

To print the defaults for "init" and "join" actions use the following commands:

+
kubeadm config print init-defaults
 kubeadm config print join-defaults
-```
-
-The list of configuration types that must be included in a configuration file depends by the action you are
-performing (`init` or `join`) and by the configuration options you are going to use (defaults or advanced
-customization).
-
-If some configuration types are not provided, or provided only partially, kubeadm will use default values; defaults
+

The list of configuration types that must be included in a configuration file depends by the action you are +performing (init or join) and by the configuration options you are going to use (defaults or advanced +customization).

+

If some configuration types are not provided, or provided only partially, kubeadm will use default values; defaults provided by kubeadm includes also enforcing consistency of values across components when required (e.g. -`--cluster-cidr` flag on controller manager and `clusterCIDR` on kube-proxy). - -Users are always allowed to override default values, with the only exception of a small subset of setting with -relevance for security (e.g. enforce authorization-mode Node and RBAC on api server) - -If the user provides a configuration types that is not expected for the action you are performing, kubeadm will -ignore those types and print a warning. - -## Kubeadm init configuration types - -When executing kubeadm init with the `--config` option, the following configuration types could be used: +--cluster-cidr flag on controller manager and clusterCIDR on kube-proxy).

+

Users are always allowed to override default values, with the only exception of a small subset of setting with +relevance for security (e.g. enforce authorization-mode Node and RBAC on api server)

+

If the user provides a configuration types that is not expected for the action you are performing, kubeadm will +ignore those types and print a warning.

+

Kubeadm init configuration types

+

When executing kubeadm init with the --config option, the following configuration types could be used: InitConfiguration, ClusterConfiguration, KubeProxyConfiguration, KubeletConfiguration, but only one -between InitConfiguration and ClusterConfiguration is mandatory. - -```yaml -apiVersion: kubeadm.k8s.io/v1beta3 -kind: InitConfiguration -bootstrapTokens: - ... -nodeRegistration: - ... -``` - -The InitConfiguration type should be used to configure runtime settings, that in case of kubeadm init +between InitConfiguration and ClusterConfiguration is mandatory.

+
apiVersion: kubeadm.k8s.io/v1beta3
+kind: InitConfiguration
+bootstrapTokens:
+  ...
+nodeRegistration:
+  ...
+

The InitConfiguration type should be used to configure runtime settings, that in case of kubeadm init are the configuration of the bootstrap token and all the setting which are specific to the node where -kubeadm is executed, including: - -- NodeRegistration, that holds fields that relate to registering the new node to the cluster; - use it to customize the node name, the CRI socket to use or any other settings that should apply to this - node only (e.g. the node ip). - -- LocalAPIEndpoint, that represents the endpoint of the instance of the API server to be deployed on this node; - use it e.g. to customize the API server advertise address. - - ``` - apiVersion: kubeadm.k8s.io/v1beta3 - kind: ClusterConfiguration - networking: - ... - etcd: - ... - apiServer: - extraArgs: - ... - extraVolumes: - ... - ... - ``` - -The ClusterConfiguration type should be used to configure cluster-wide settings, -including settings for: - -- Networking, that holds configuration for the networking topology of the cluster; use it e.g. to customize - Pod subnet or services subnet. - -- Etcd configurations; use it e.g. to customize the local etcd or to configure the API server - for using an external etcd cluster. - -- kube-apiserver, kube-scheduler, kube-controller-manager configurations; use it to customize control-plane - components by adding customized setting or overriding kubeadm default settings. - - ```yaml - apiVersion: kubeproxy.config.k8s.io/v1alpha1 - kind: KubeProxyConfiguration - ... - ``` - -The KubeProxyConfiguration type should be used to change the configuration passed to kube-proxy instances -deployed in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults. - -See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ or +kubeadm is executed, including:

+ +
apiVersion: kubeadm.k8s.io/v1beta3
+kind: ClusterConfiguration
+networking:
+  ...
+etcd:
+  ...
+apiServer:
+  extraArgs:
+    ...
+  extraVolumes:
+    ...
+...
+

The ClusterConfiguration type should be used to configure cluster-wide settings, +including settings for:

+ +
apiVersion: kubeproxy.config.k8s.io/v1alpha1
+kind: KubeProxyConfiguration
+  ...
+

The KubeProxyConfiguration type should be used to change the configuration passed to kube-proxy instances +deployed in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults.

+

See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ or https://godoc.org/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration -for kube-proxy official documentation. - -```yaml -apiVersion: kubelet.config.k8s.io/v1beta1 -kind: KubeletConfiguration - ... -``` - -The KubeletConfiguration type should be used to change the configurations that will be passed to all kubelet instances -deployed in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults. - -See https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ or +for kube-proxy official documentation.

+
apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+  ...
+

The KubeletConfiguration type should be used to change the configurations that will be passed to all kubelet instances +deployed in the cluster. If this object is not provided or provided only partially, kubeadm applies defaults.

+

See https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ or https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration -for kubelet official documentation. - -Here is a fully populated example of a single YAML file containing multiple -configuration types to be used during a `kubeadm init` run. - -```yaml -apiVersion: kubeadm.k8s.io/v1beta3 -kind: InitConfiguration -bootstrapTokens: -- token: "9a08jv.c0izixklcxtmnze7" - description: "kubeadm bootstrap token" - ttl: "24h" -- token: "783bde.3f89s0fje9f38fhf" - description: "another bootstrap token" - usages: - - authentication - - signing - groups: - - system:bootstrappers:kubeadm:default-node-token -nodeRegistration: - name: "ec2-10-100-0-1" - criSocket: "/var/run/dockershim.sock" - taints: - - key: "kubeadmNode" - value: "master" - effect: "NoSchedule" - kubeletExtraArgs: - v: 4 -ignorePreflightErrors: -- IsPrivilegedUser - imagePullPolicy: "IfNotPresent" -localAPIEndpoint: - advertiseAddress: "10.100.0.1" - bindPort: 6443 -certificateKey: "e6a2eb8581237ab72a4f494f30285ec12a9694d750b9785706a83bfcbbbd2204" - skipPhases: - - addon/kube-proxy ---- -apiVersion: kubeadm.k8s.io/v1beta3 -kind: ClusterConfiguration -etcd: - # one of local or external - local: - imageRepository: "k8s.gcr.io" - imageTag: "3.2.24" - dataDir: "/var/lib/etcd" - extraArgs: - listen-client-urls: "http://10.100.0.1:2379" - serverCertSANs: - - "ec2-10-100-0-1.compute-1.amazonaws.com" - peerCertSANs: - - "10.100.0.1" - # external: - # endpoints: - # - "10.100.0.1:2379" - # - "10.100.0.2:2379" - # caFile: "/etcd/kubernetes/pki/etcd/etcd-ca.crt" - # certFile: "/etcd/kubernetes/pki/etcd/etcd.crt" - # keyFile: "/etcd/kubernetes/pki/etcd/etcd.key" -networking: - serviceSubnet: "10.96.0.0/16" - podSubnet: "10.244.0.0/24" - dnsDomain: "cluster.local" -kubernetesVersion: "v1.21.0" -controlPlaneEndpoint: "10.100.0.1:6443" -apiServer: - extraArgs: - authorization-mode: "Node,RBAC" - extraVolumes: - - name: "some-volume" - hostPath: "/etc/some-path" - mountPath: "/etc/some-pod-path" - readOnly: false - pathType: File - certSANs: - - "10.100.1.1" - - "ec2-10-100-0-1.compute-1.amazonaws.com" - timeoutForControlPlane: 4m0s -controllerManager: - extraArgs: - "node-cidr-mask-size": "20" - extraVolumes: - - name: "some-volume" - hostPath: "/etc/some-path" - mountPath: "/etc/some-pod-path" - readOnly: false - pathType: File -scheduler: - extraArgs: - address: "10.100.0.1" - extraVolumes: - - name: "some-volume" - hostPath: "/etc/some-path" - mountPath: "/etc/some-pod-path" - readOnly: false - pathType: File -certificatesDir: "/etc/kubernetes/pki" -imageRepository: "k8s.gcr.io" -clusterName: "example-cluster" ---- -apiVersion: kubelet.config.k8s.io/v1beta1 -kind: KubeletConfiguration -# kubelet specific options here ---- -apiVersion: kubeproxy.config.k8s.io/v1alpha1 -kind: KubeProxyConfiguration -# kube-proxy specific options here -``` - -## Kubeadm join configuration types - -When executing `kubeadm join` with the `--config` option, the JoinConfiguration type should be provided. - -```yaml -apiVersion: kubeadm.k8s.io/v1beta3 -kind: JoinConfiguration - ... -``` - -The JoinConfiguration type should be used to configure runtime settings, that in case of `kubeadm join` +for kubelet official documentation.

+

Here is a fully populated example of a single YAML file containing multiple +configuration types to be used during a kubeadm init run.

+
apiVersion: kubeadm.k8s.io/v1beta3
+kind: InitConfiguration
+bootstrapTokens:
+- token: "9a08jv.c0izixklcxtmnze7"
+  description: "kubeadm bootstrap token"
+  ttl: "24h"
+- token: "783bde.3f89s0fje9f38fhf"
+  description: "another bootstrap token"
+  usages:
+  - authentication
+  - signing
+  groups:
+  - system:bootstrappers:kubeadm:default-node-token
+nodeRegistration:
+  name: "ec2-10-100-0-1"
+  criSocket: "/var/run/dockershim.sock"
+  taints:
+  - key: "kubeadmNode"
+    value: "master"
+    effect: "NoSchedule"
+  kubeletExtraArgs:
+    v: 4
+ignorePreflightErrors:
+- IsPrivilegedUser
+   imagePullPolicy: "IfNotPresent"
+localAPIEndpoint:
+  advertiseAddress: "10.100.0.1"
+  bindPort: 6443
+certificateKey: "e6a2eb8581237ab72a4f494f30285ec12a9694d750b9785706a83bfcbbbd2204"
+ skipPhases:
+ - addon/kube-proxy
+---
+apiVersion: kubeadm.k8s.io/v1beta3
+kind: ClusterConfiguration
+etcd:
+  # one of local or external
+  local:
+    imageRepository: "k8s.gcr.io"
+    imageTag: "3.2.24"
+    dataDir: "/var/lib/etcd"
+    extraArgs:
+      listen-client-urls: "http://10.100.0.1:2379"
+    serverCertSANs:
+    -  "ec2-10-100-0-1.compute-1.amazonaws.com"
+    peerCertSANs:
+    - "10.100.0.1"
+  # external:
+    # endpoints:
+    # - "10.100.0.1:2379"
+    # - "10.100.0.2:2379"
+    # caFile: "/etcd/kubernetes/pki/etcd/etcd-ca.crt"
+    # certFile: "/etcd/kubernetes/pki/etcd/etcd.crt"
+    # keyFile: "/etcd/kubernetes/pki/etcd/etcd.key"
+networking:
+  serviceSubnet: "10.96.0.0/16"
+  podSubnet: "10.244.0.0/24"
+  dnsDomain: "cluster.local"
+kubernetesVersion: "v1.21.0"
+controlPlaneEndpoint: "10.100.0.1:6443"
+apiServer:
+  extraArgs:
+    authorization-mode: "Node,RBAC"
+  extraVolumes:
+  - name: "some-volume"
+    hostPath: "/etc/some-path"
+    mountPath: "/etc/some-pod-path"
+    readOnly: false
+    pathType: File
+  certSANs:
+  - "10.100.1.1"
+  - "ec2-10-100-0-1.compute-1.amazonaws.com"
+  timeoutForControlPlane: 4m0s
+controllerManager:
+  extraArgs:
+    "node-cidr-mask-size": "20"
+  extraVolumes:
+  - name: "some-volume"
+    hostPath: "/etc/some-path"
+    mountPath: "/etc/some-pod-path"
+    readOnly: false
+    pathType: File
+scheduler:
+  extraArgs:
+    address: "10.100.0.1"
+  extraVolumes:
+  - name: "some-volume"
+    hostPath: "/etc/some-path"
+    mountPath: "/etc/some-pod-path"
+    readOnly: false
+    pathType: File
+certificatesDir: "/etc/kubernetes/pki"
+imageRepository: "k8s.gcr.io"
+clusterName: "example-cluster"
+---
+apiVersion: kubelet.config.k8s.io/v1beta1
+kind: KubeletConfiguration
+# kubelet specific options here
+---
+apiVersion: kubeproxy.config.k8s.io/v1alpha1
+kind: KubeProxyConfiguration
+# kube-proxy specific options here
+

Kubeadm join configuration types

+

When executing kubeadm join with the --config option, the JoinConfiguration type should be provided.

+
apiVersion: kubeadm.k8s.io/v1beta3
+kind: JoinConfiguration
+  ...
+

The JoinConfiguration type should be used to configure runtime settings, that in case of kubeadm join are the discovery method used for accessing the cluster info and all the setting which are specific -to the node where kubeadm is executed, including: +to the node where kubeadm is executed, including:

+ -- NodeRegistration, that holds fields that relate to registering the new node to the cluster; - use it to customize the node name, the CRI socket to use or any other settings that should apply to this - node only (e.g. the node ip). - -- APIEndpoint, that represents the endpoint of the instance of the API server to be eventually deployed on this node. ## Resource Types - [ClusterConfiguration](#kubeadm-k8s-io-v1beta3-ClusterConfiguration) +- [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration) - [JoinConfiguration](#kubeadm-k8s-io-v1beta3-JoinConfiguration) @@ -299,10 +268,9 @@ to the node where kubeadm is executed, including: +

ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster

-ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster - @@ -310,120 +278,183 @@ ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster - - +

etcd holds the configuration for etcd.

+ - - +

networking holds configuration for the networking topology of the cluster.

+ - - +

kubernetesVersion is the target version of the control plane.

+ - - +In case the controlPlaneEndpoint is not specified, the advertiseAddress + bindPort +are used; in case the controlPlaneEndpoint is specified but without a TCP port, +the bindPort is used. +Possible usages are:

+ + - - +

apiServer contains extra settings for the API server.

+ - - +

controllerManager contains extra settings for the controller manager.

+ - - +

scheduler contains extra settings for the scheduler.

+ - - +

dns defines the options for the DNS add-on installed in the cluster.

+ - - +

certificatesDir specifies where to store or look for all required certificates.

+ - - +

imageRepository sets the container registry to pull images from. +If empty, k8s.gcr.io will be used by default. +In case of kubernetes version is a CI build (kubernetes version starts with ci/) +gcr.io/k8s-staging-ci-images will be used as a default for control plane components +and for kube-proxy, while k8s.gcr.io will be used for all the other images.

+ - - +

featureGates contains the feature gates enabled by the user.

+ - - +

The cluster name.

+ + +
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta3
kind
string
ClusterConfiguration
etcd
Etcd
- `etcd` holds the configuration for etcd.
networking
Networking
- `networking` holds configuration for the networking topology of the cluster.
kubernetesVersion
string
- `kubernetesVersion` is the target version of the control plane.
controlPlaneEndpoint
string
- `controlPlaneEndpoint` sets a stable IP address or DNS name for the control plane. +

controlPlaneEndpoint sets a stable IP address or DNS name for the control plane. It can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. -In case the `controlPlaneEndpoint` is not specified, the `advertiseAddress` + `bindPort` -are used; in case the `controlPlaneEndpoint` is specified but without a TCP port, -the `bindPort` is used. -Possible usages are: - -- In a cluster with more than one control plane instances, this field should be - assigned the address of the external load balancer in front of the - control plane instances. -- In environments with enforced node recycling, the `controlPlaneEndpoint` could - be used for assigning a stable DNS to the control plane.

apiServer
APIServer
- `apiServer` contains extra settings for the API server.
controllerManager
ControlPlaneComponent
- `controllerManager` contains extra settings for the controller manager.
scheduler
ControlPlaneComponent
- `scheduler` contains extra settings for the scheduler.
dns
DNS
- `dns` defines the options for the DNS add-on installed in the cluster.
certificatesDir
string
- `certificatesDir` specifies where to store or look for all required certificates.
imageRepository
string
- `imageRepository` sets the container registry to pull images from. -If empty, `k8s.gcr.io` will be used by default. -In case of kubernetes version is a CI build (kubernetes version starts with `ci/`) -`gcr.io/k8s-staging-ci-images` will be used as a default for control plane components -and for kube-proxy, while `k8s.gcr.io` will be used for all the other images.
featureGates
map[string]bool
- `featureGates` contains the feature gates enabled by the user.
clusterName
string
- The cluster name.
+ +## `InitConfiguration` {#kubeadm-k8s-io-v1beta3-InitConfiguration} + + + +

InitConfiguration contains a list of elements that is specific "kubeadm init"-only runtime +information. +kubeadm init-only information. These fields are solely used the first time kubeadm init runs. +After that, the information in the fields IS NOT uploaded to the kubeadm-config ConfigMap +that is used by kubeadm upgrade for instance. These fields must be omitempty.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta3
kind
string
InitConfiguration
bootstrapTokens
+[]BootstrapToken +
+

bootstrapTokens is respected at kubeadm init time and describes a set of Bootstrap Tokens to create. +This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature

+
nodeRegistration
+NodeRegistrationOptions +
+

nodeRegistration holds fields that relate to registering the new control-plane node +to the cluster.

+
localAPIEndpoint
+APIEndpoint +
+

localAPIEndpoint represents the endpoint of the API server instance that's deployed on this +control plane node. In HA setups, this differs from ClusterConfiguration.controlPlaneEndpoint +in the sense that controlPlaneEndpoint is the global endpoint for the cluster, which then +load-balances the requests to each individual API server. +This configuration object lets you customize what IP/DNS name and port the local API server +advertises it's accessible on. By default, kubeadm tries to auto-detect the IP of the default +interface and use that, but in case that process fails you may set the desired value here.

+
certificateKey
+string +
+

certificateKey sets the key with which certificates and keys are encrypted prior to being +uploaded in a Secret in the cluster during the uploadcerts init phase.

+
skipPhases
+[]string +
+

skipPhases is a list of phases to skip during command execution. +The list of phases can be obtained with the kubeadm init --help command. +The flag "--skip-phases" takes precedence over this field.

+
patches
+Patches +
+

patches contains options related to applying patches to components deployed by kubeadm during +kubeadm init.

+
@@ -431,10 +462,9 @@ and for kube-proxy, while `k8s.gcr.io` will be used for all the other images.JoinConfiguration contains elements describing a particular node.

-JoinConfiguration contains elements describing a particular node. - @@ -442,833 +472,768 @@ JoinConfiguration contains elements describing a particular node. - - +

nodeRegistration holds fields that relate to registering the new +control-plane node to the cluster.

+ - - +Defaults to "/etc/kubernetes/pki/ca.crt".

+ - - +

discovery specifies the options for the kubelet to use during the TLS +bootstrap process.

+ - - +

controlPlane defines the additional control plane instance to be deployed +on the joining node. If nil, no additional control plane instance will be deployed.

+ - - +

skipPhases is a list of phases to skip during command execution. +The list of phases can be obtained with the kubeadm join --help command. +The flag --skip-phases takes precedence over this field.

+ - - +

patches contains options related to applying patches to components deployed +by kubeadm during kubeadm join.

+ - -
FieldDescription
apiVersion
string
kubeadm.k8s.io/v1beta3
kind
string
JoinConfiguration
nodeRegistration
NodeRegistrationOptions
- `nodeRegistration` holds fields that relate to registering the new -control-plane node to the cluster.
caCertPath
string
- `caCertPath` is the path to the SSL certificate authority used to secure +

caCertPath is the path to the SSL certificate authority used to secure comunications between a node and the control-plane. -Defaults to "/etc/kubernetes/pki/ca.crt".

discovery [Required]
Discovery
- `discovery` specifies the options for the kubelet to use during the TLS -bootstrap process.
controlPlane
JoinControlPlane
- `controlPlane` defines the additional control plane instance to be deployed -on the joining node. If nil, no additional control plane instance will be deployed.
skipPhases
[]string
- `skipPhases` is a list of phases to skip during command execution. -The list of phases can be obtained with the `kubeadm join --help` command. -The flag `--skip-phases` takes precedence over this field.
patches
Patches
- `patches` contains options related to applying patches to components deployed -by kubeadm during `kubeadm join`.
## `APIEndpoint` {#kubeadm-k8s-io-v1beta3-APIEndpoint} - - **Appears in:** + +- [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration) + - [JoinControlPlane](#kubeadm-k8s-io-v1beta3-JoinControlPlane) -APIEndpoint struct contains elements of API server instance deployed on a node. +

APIEndpoint struct contains elements of API server instance deployed on a node.

+ - +

advertiseAddress sets the IP address for the API server to advertise.

+ - - +

bindPorti sets the secure port for the API Server to bind to. +Defaults to 6443.

+ - -
FieldDescription
advertiseAddress
string
- `advertiseAddress` sets the IP address for the API server to advertise.
bindPort
int32
- `bindPorti` sets the secure port for the API Server to bind to. -Defaults to 6443.
## `APIServer` {#kubeadm-k8s-io-v1beta3-APIServer} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta3-ClusterConfiguration) -APIServer holds settings necessary for API server deployments in the cluster +

APIServer holds settings necessary for API server deployments in the cluster

+ - + No description provided. - - +

certSANs sets extra Subject Alternative Names (SANs) for the API Server signing +certificate.

+ - - +

timeoutForControlPlane controls the timeout that we wait for API server to appear.

+ - -
FieldDescription
ControlPlaneComponent [Required]
ControlPlaneComponent
(Members of ControlPlaneComponent are embedded into this type.) - No description provided. -
certSANs
[]string
- `certSANs` sets extra Subject Alternative Names (SANs) for the API Server signing -certificate.
timeoutForControlPlane
-meta/v1.Duration +meta/v1.Duration
- `timeoutForControlPlane` controls the timeout that we wait for API server to appear.
## `BootstrapTokenDiscovery` {#kubeadm-k8s-io-v1beta3-BootstrapTokenDiscovery} - - **Appears in:** + - [Discovery](#kubeadm-k8s-io-v1beta3-Discovery) -BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery +

BootstrapTokenDiscovery is used to set the options for bootstrap token based discovery

+ - +

token is a token used to validate cluster information fetched from the +control-plane.

+ - - +

apiServerEndpoint is an IP or domain name to the API server from which +information will be fetched.

+ - - +Each hash is specified as ":", where the only currently supported type is +"sha256". This is a hex-encoded SHA-256 hash of the Subject Public Key Info (SPKI) +object in DER-encoded ASN.1. These hashes can be calculated using, for example, OpenSSL.

+ - - +

unsafeSkipCAVerification allows token-based discovery without CA verification +via caCertHashes. This can weaken the security of kubeadm since other nodes can +impersonate the control-plane.

+ - -
FieldDescription
token [Required]
string
- `token` is a token used to validate cluster information fetched from the -control-plane.
apiServerEndpoint
string
- `apiServerEndpoint` is an IP or domain name to the API server from which -information will be fetched.
caCertHashes
[]string
- `caCertHashes` specifies a set of public key pins to verify when token-based discovery +

caCertHashes specifies a set of public key pins to verify when token-based discovery is used. The root CA found during discovery must match one of these values. Specifying an empty set disables root CA pinning, which can be unsafe. -Each hash is specified as ":", where the only currently supported type is -"sha256". This is a hex-encoded SHA-256 hash of the Subject Public Key Info (SPKI) -object in DER-encoded ASN.1. These hashes can be calculated using, for example, OpenSSL.

unsafeSkipCAVerification
bool
- `unsafeSkipCAVerification` allows token-based discovery without CA verification -via `caCertHashes`. This can weaken the security of kubeadm since other nodes can -impersonate the control-plane.
## `ControlPlaneComponent` {#kubeadm-k8s-io-v1beta3-ControlPlaneComponent} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta3-ClusterConfiguration) + - [APIServer](#kubeadm-k8s-io-v1beta3-APIServer) -ControlPlaneComponent holds settings common to control plane component of the cluster +

ControlPlaneComponent holds settings common to control plane component of the cluster

+ - +without leading dash(es).

+ - - +

extraVolumes is an extra set of host volumes, mounted to the control plane component.

+ - -
FieldDescription
extraArgs
map[string]string
- `extraArgs` is an extra set of flags to pass to the control plane component. +

extraArgs is an extra set of flags to pass to the control plane component. A key in this map is the flag name as it appears on the command line except -without leading dash(es).

extraVolumes
[]HostPathMount
- `extraVolumes` is an extra set of host volumes, mounted to the control plane component.
## `DNS` {#kubeadm-k8s-io-v1beta3-DNS} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta3-ClusterConfiguration) -DNS defines the DNS addon that should be used in the cluster +

DNS defines the DNS addon that should be used in the cluster

+ - +

imageMeta allows to customize the image used for the DNS component.

+ - -
FieldDescription
ImageMeta [Required]
ImageMeta
(Members of ImageMeta are embedded into this type.) - `imageMeta` allows to customize the image used for the DNS component.
## `Discovery` {#kubeadm-k8s-io-v1beta3-Discovery} - - **Appears in:** + - [JoinConfiguration](#kubeadm-k8s-io-v1beta3-JoinConfiguration) -Discovery specifies the options for the kubelet to use during the TLS Bootstrap process. +

Discovery specifies the options for the kubelet to use during the TLS Bootstrap process.

+ - +

bootstrapToken is used to set the options for bootstrap token based discovery. +bootstrapToken and file are mutually exclusive.

+ - - +bootstrapToken and file are mutually exclusive.

+ - - +

tlsBootstrapToken is a token used for TLS bootstrapping. +If bootstrapToken is set, this field is defaulted to .bootstrapToken.token, but +can be overridden. If file is set, this field must be set in case the KubeConfigFile +does not contain any other authentication information

+ - - +

timeout modifies the discovery timeout.

+ - -
FieldDescription
bootstrapToken
BootstrapTokenDiscovery
- `bootstrapToken` is used to set the options for bootstrap token based discovery. -`bootstrapToken` and `file` are mutually exclusive.
file
FileDiscovery
- `file` is used to specify a file or URL to a kubeconfig file from which to load +

file is used to specify a file or URL to a kubeconfig file from which to load cluster information. -`bootstrapToken` and `file` are mutually exclusive.

tlsBootstrapToken
string
- `tlsBootstrapToken` is a token used for TLS bootstrapping. -If `bootstrapToken` is set, this field is defaulted to `.bootstrapToken.token`, but -can be overridden. If `file` is set, this field ∗∗must be set∗∗ in case the KubeConfigFile -does not contain any other authentication information
timeout
-meta/v1.Duration +meta/v1.Duration
- `timeout` modifies the discovery timeout.
## `Etcd` {#kubeadm-k8s-io-v1beta3-Etcd} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta3-ClusterConfiguration) -Etcd contains elements describing Etcd configuration. +

Etcd contains elements describing Etcd configuration.

+ - +

local provides configuration knobs for configuring the local etcd instance. +local and external are mutually exclusive.

+ - - +

external describes how to connect to an external etcd cluster. +local and external are mutually exclusive.

+ - -
FieldDescription
local
LocalEtcd
- `local` provides configuration knobs for configuring the local etcd instance. -`local` and `external` are mutually exclusive.
external
ExternalEtcd
- `external` describes how to connect to an external etcd cluster. -`local` and `external` are mutually exclusive.
## `ExternalEtcd` {#kubeadm-k8s-io-v1beta3-ExternalEtcd} - - **Appears in:** + - [Etcd](#kubeadm-k8s-io-v1beta3-Etcd) -ExternalEtcd describes an external etcd cluster. -Kubeadm has no knowledge of where certificate files live and they must be supplied. +

ExternalEtcd describes an external etcd cluster. +Kubeadm has no knowledge of where certificate files live and they must be supplied.

+ - +

endpoints contains the list of etcd members.

+ - - +

caFile is an SSL Certificate Authority (CA) file used to secure etcd communication. +Required if using a TLS connection.

+ - - +

certFile is an SSL certification file used to secure etcd communication. +Required if using a TLS connection.

+ - - +

keyFile is an SSL key file used to secure etcd communication. +Required if using a TLS connection.

+ - -
FieldDescription
endpoints [Required]
[]string
- `endpoints` contains the list of etcd members.
caFile [Required]
string
- `caFile` is an SSL Certificate Authority (CA) file used to secure etcd communication. -Required if using a TLS connection.
certFile [Required]
string
- `certFile` is an SSL certification file used to secure etcd communication. -Required if using a TLS connection.
keyFile [Required]
string
- `keyFile` is an SSL key file used to secure etcd communication. -Required if using a TLS connection.
## `FileDiscovery` {#kubeadm-k8s-io-v1beta3-FileDiscovery} - - **Appears in:** + - [Discovery](#kubeadm-k8s-io-v1beta3-Discovery) -FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load -cluster information. +

FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load +cluster information.

+ - +

kubeConfigPath is used to specify the actual file path or URL to the kubeconfig +file from which to load cluster information.

+ - -
FieldDescription
kubeConfigPath [Required]
string
- `kubeConfigPath` is used to specify the actual file path or URL to the kubeconfig -file from which to load cluster information.
## `HostPathMount` {#kubeadm-k8s-io-v1beta3-HostPathMount} - - **Appears in:** + - [ControlPlaneComponent](#kubeadm-k8s-io-v1beta3-ControlPlaneComponent) -HostPathMount contains elements describing volumes that are mounted from the host. +

HostPathMount contains elements describing volumes that are mounted from the host.

+ - +

name is the name of the volume inside the Pod template.

+ - - +

hostPath is the path in the host that will be mounted inside the Pod.

+ - - +

mountPath is the path inside the Pod where hostPath will be mounted.

+ - - +

readOnly controls write access to the volume.

+ - - +

pathType is the type of the hostPath.

+ - -
FieldDescription
name [Required]
string
- `name` is the name of the volume inside the Pod template.
hostPath [Required]
string
- `hostPath` is the path in the host that will be mounted inside the Pod.
mountPath [Required]
string
- `mountPath` is the path inside the Pod where `hostPath` will be mounted.
readOnly
bool
- `readOnly` controls write access to the volume.
pathType
core/v1.HostPathType
- `pathType` is the type of the `hostPath`.
## `ImageMeta` {#kubeadm-k8s-io-v1beta3-ImageMeta} - - **Appears in:** + - [DNS](#kubeadm-k8s-io-v1beta3-DNS) + - [LocalEtcd](#kubeadm-k8s-io-v1beta3-LocalEtcd) -ImageMeta allows to customize the image used for components that are not -originated from the Kubernetes/Kubernetes release process +

ImageMeta allows to customize the image used for components that are not +originated from the Kubernetes/Kubernetes release process

+ - +

imageRepository sets the container registry to pull images from. +If not set, the imageRepository defined in ClusterConfiguration will be used instead.

+ - - +the above components during upgrades.

+ - -
FieldDescription
imageRepository
string
- `imageRepository` sets the container registry to pull images from. -If not set, the `imageRepository` defined in ClusterConfiguration will be used instead.
imageTag
string
- `imageTag` allows to specify a tag for the image. +

imageTag allows to specify a tag for the image. In case this value is set, kubeadm does not change automatically the version of -the above components during upgrades.

## `JoinControlPlane` {#kubeadm-k8s-io-v1beta3-JoinControlPlane} - - **Appears in:** + - [JoinConfiguration](#kubeadm-k8s-io-v1beta3-JoinConfiguration) -JoinControlPlane contains elements describing an additional control plane instance -to be deployed on the joining node. +

JoinControlPlane contains elements describing an additional control plane instance +to be deployed on the joining node.

+ - +

localAPIEndpoint represents the endpoint of the API server instance to be +deployed on this node.

+ - - +The corresponding encryption key is in the InitConfiguration.

+ - -
FieldDescription
localAPIEndpoint
APIEndpoint
- `localAPIEndpoint` represents the endpoint of the API server instance to be -deployed on this node.
certificateKey
string
- `certificateKey` is the key that is used for decryption of certificates after +

certificateKey is the key that is used for decryption of certificates after they are downloaded from the secret upon joining a new control plane node. -The corresponding encryption key is in the InitConfiguration.

## `LocalEtcd` {#kubeadm-k8s-io-v1beta3-LocalEtcd} - - **Appears in:** + - [Etcd](#kubeadm-k8s-io-v1beta3-Etcd) -LocalEtcd describes that kubeadm should run an etcd cluster locally +

LocalEtcd describes that kubeadm should run an etcd cluster locally

+ - +

ImageMeta allows to customize the container used for etcd.

+ - - +

dataDir is the directory etcd will place its data. +Defaults to "/var/lib/etcd".

+ - - +command line except without leading dash(es).

+ - - +

serverCertSANs sets extra Subject Alternative Names (SANs) for the etcd +server signing certificate.

+ - - +

peerCertSANs sets extra Subject Alternative Names (SANs) for the etcd peer +signing certificate.

+ - -
FieldDescription
ImageMeta [Required]
ImageMeta
(Members of ImageMeta are embedded into this type.) - ImageMeta allows to customize the container used for etcd.
dataDir [Required]
string
- `dataDir` is the directory etcd will place its data. -Defaults to "/var/lib/etcd".
extraArgs
map[string]string
- `extraArgs` are extra arguments provided to the etcd binary when run +

extraArgs are extra arguments provided to the etcd binary when run inside a static Pod. A key in this map is the flag name as it appears on the -command line except without leading dash(es).

serverCertSANs
[]string
- `serverCertSANs` sets extra Subject Alternative Names (SANs) for the etcd -server signing certificate.
peerCertSANs
[]string
- `peerCertSANs` sets extra Subject Alternative Names (SANs) for the etcd peer -signing certificate.
## `Networking` {#kubeadm-k8s-io-v1beta3-Networking} - - **Appears in:** + - [ClusterConfiguration](#kubeadm-k8s-io-v1beta3-ClusterConfiguration) -Networking contains elements describing cluster's networking configuration +

Networking contains elements describing cluster's networking configuration

+ - +

serviceSubnet is the subnet used by Kubernetes Services. Defaults to "10.96.0.0/12".

+ - - +

podSubnet is the subnet used by Pods.

+ - - +

dnsDomain is the DNS domain used by Kubernetes Services. Defaults to "cluster.local".

+ - -
FieldDescription
serviceSubnet
string
- `serviceSubnet` is the subnet used by Kubernetes Services. Defaults to "10.96.0.0/12".
podSubnet
string
- `podSubnet` is the subnet used by Pods.
dnsDomain
string
- `dnsDomain` is the DNS domain used by Kubernetes Services. Defaults to "cluster.local".
## `NodeRegistrationOptions` {#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions} - - **Appears in:** + +- [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration) + - [JoinConfiguration](#kubeadm-k8s-io-v1beta3-JoinConfiguration) -NodeRegistrationOptions holds fields that relate to registering a new control-plane or -node to the cluster, either via "kubeadm init" or "kubeadm join" +

NodeRegistrationOptions holds fields that relate to registering a new control-plane or +node to the cluster, either via "kubeadm init" or "kubeadm join"

+ - +Defaults to the hostname of the node if not provided.

+ - - +

criSocket is used to retrieve container runtime info. +This information will be annotated to the Node API object, for later re-use

+ - - +i.e. taints: [] in the YAML file. This field is solely used for Node registration.

+ - - +command line except without leading dash(es).

+ - - +

ignorePreflightErrors provides a list of pre-flight errors to be ignored when +the current node is registered.

+ - - +

imagePullPolicy specifies the policy for image pulling during kubeadm "init" and +"join" operations. +The value of this field must be one of "Always", "IfNotPresent" or "Never". +If this field is unset kubeadm will default it to "IfNotPresent", or pull the required +images if not present on the host.

+ - -
FieldDescription
name
string
- `name` is the `.metadata.name` field of the Node API object that will be created in this -`kubeadm init` or `kubeadm join` operation. -This field is also used in the `CommonName` field of the kubelet's client certificate to +

name is the .metadata.name field of the Node API object that will be created in this +kubeadm init or kubeadm join operation. +This field is also used in the CommonName field of the kubelet's client certificate to the API server. -Defaults to the hostname of the node if not provided.

criSocket
string
- `criSocket` is used to retrieve container runtime info. -This information will be annotated to the Node API object, for later re-use
taints [Required]
[]core/v1.Taint
- `tains` specifies the taints the Node API object should be registered with. -If this field is unset, i.e. nil, in the `kubeadm init` process it will be defaulted to -`taints: ["node-role.kubernetes.io/master:""]`. +

tains specifies the taints the Node API object should be registered with. +If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted to +taints: ["node-role.kubernetes.io/master:""]. If you don't want to taint your control-plane node, set this field to an empty slice, -i.e. `taints: []` in the YAML file. This field is solely used for Node registration.

kubeletExtraArgs
map[string]string
- `kubeletExtraArgs` passes through extra arguments to the kubelet. +

kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the 'kubelet-config-1.X' ConfigMap. Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on. A key in this map is the flag name as it appears on the -command line except without leading dash(es).

ignorePreflightErrors
[]string
- `ignorePreflightErrors` provides a list of pre-flight errors to be ignored when -the current node is registered.
imagePullPolicy
core/v1.PullPolicy
- `imagePullPolicy` specifies the policy for image pulling during kubeadm "init" and -"join" operations. -The value of this field must be one of "Always", "IfNotPresent" or "Never". -If this field is unset kubeadm will default it to "IfNotPresent", or pull the required -images if not present on the host.
## `Patches` {#kubeadm-k8s-io-v1beta3-Patches} - - **Appears in:** + +- [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration) + - [JoinConfiguration](#kubeadm-k8s-io-v1beta3-JoinConfiguration) -Patches contains options related to applying patches to components deployed by kubeadm. +

Patches contains options related to applying patches to components deployed by kubeadm.

+ - +The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". +"suffix" is an optional string that can be used to determine which patches are applied +first alpha-numerically.

+ - -
FieldDescription
directory
string
- `directory` is a path to a directory that contains files named -"target[suffix][+patchtype].extension". -For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of -"kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can -be one of "strategic" "merge" or "json" and they match the patch formats supported by +

directory is a path to a directory that contains files named +"target[suffix][+patchtype].extension". +For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of +"kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can +be one of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. -The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". -"suffix" is an optional string that can be used to determine which patches are applied -first alpha-numerically.

@@ -1278,113 +1243,100 @@ first alpha-numerically. ## `BootstrapToken` {#BootstrapToken} - - **Appears in:** +- [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration) + + +

BootstrapToken describes one bootstrap token, stored as a Secret in the cluster

-BootstrapToken describes one bootstrap token, stored as a Secret in the cluster - +

token is used for establishing bidirectional trust between nodes and control-planes. +Used for joining nodes in the cluster.

+ - - +

description sets a human-friendly message why this token exists and what it's used +for, so other administrators can know its purpose.

+ - - +

ttl defines the time to live for this token. Defaults to 24h. +expires and ttl are mutually exclusive.

+ - - +

expires specifies the timestamp when this token expires. Defaults to being set +dynamically at runtime based on the ttl. expires and ttl are mutually exclusive.

+ - - +

usages describes the ways in which this token can be used. Can by default be used +for establishing bidirectional trust, but that can be changed here.

+ - - +

groups specifies the extra groups that this token will authenticate as when/if +used for authentication

+ - -
FieldDescription
token [Required]
BootstrapTokenString
- `token` is used for establishing bidirectional trust between nodes and control-planes. -Used for joining nodes in the cluster.
description
string
- `description` sets a human-friendly message why this token exists and what it's used -for, so other administrators can know its purpose.
ttl
-meta/v1.Duration +meta/v1.Duration
- `ttl` defines the time to live for this token. Defaults to `24h`. -`expires` and `ttl` are mutually exclusive.
expires
meta/v1.Time
- `expires` specifies the timestamp when this token expires. Defaults to being set -dynamically at runtime based on the `ttl`. `expires` and `ttl` are mutually exclusive.
usages
[]string
- `usages` describes the ways in which this token can be used. Can by default be used -for establishing bidirectional trust, but that can be changed here.
groups
[]string
- `groups` specifies the extra groups that this token will authenticate as when/if -used for authentication
## `BootstrapTokenString` {#BootstrapTokenString} - - **Appears in:** + - [BootstrapToken](#BootstrapToken) -BootstrapTokenString is a token of the format `abcdef.abcdef0123456789` that is used +

BootstrapTokenString is a token of the format abcdef.abcdef0123456789 that is used for both validation of the practically of the API server from a joining node's point of view and as an authentication method for the node in the bootstrap phase of -"kubeadm join". This token is and should be short-lived. +"kubeadm join". This token is and should be short-lived.

+ - + No description provided. - - + No description provided. - -
FieldDescription
- [Required]
string
- No description provided. -
- [Required]
string
- No description provided. -
diff --git a/content/en/docs/reference/config-api/kubelet-config.v1alpha1.md b/content/en/docs/reference/config-api/kubelet-config.v1alpha1.md index ffb3d85ac2..ccdec28e8d 100644 --- a/content/en/docs/reference/config-api/kubelet-config.v1alpha1.md +++ b/content/en/docs/reference/config-api/kubelet-config.v1alpha1.md @@ -13,102 +13,14 @@ auto_generated: true -## `FormatOptions` {#FormatOptions} - - - - -**Appears in:** - -- [LoggingConfiguration](#LoggingConfiguration) - - -FormatOptions contains options for the different logging formats. - - - - - - - - - - - - - -
FieldDescription
json [Required]
-JSONOptions -
- [Experimental] JSON contains options for logging format "json".
- -## `JSONOptions` {#JSONOptions} - - - - -**Appears in:** - -- [FormatOptions](#FormatOptions) - - -JSONOptions contains options for logging format "json". - - - - - - - - - - - - - - - - - - -
FieldDescription
splitStream [Required]
-bool -
- [Experimental] SplitStream redirects error messages to stderr while -info messages go to stdout, with buffering. The default is to write -both to stdout, without buffering.
infoBufferSize [Required]
-k8s.io/apimachinery/pkg/api/resource.QuantityValue -
- [Experimental] InfoBufferSize sets the size of the info stream when -using split streams. The default is zero, which disables buffering.
- -## `VModuleConfiguration` {#VModuleConfiguration} - -(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) - - -**Appears in:** - -- [LoggingConfiguration](#LoggingConfiguration) - - -VModuleConfiguration is a collection of individual file names or patterns -and the corresponding verbosity threshold. - - - - - - ## `CredentialProviderConfig` {#kubelet-config-k8s-io-v1alpha1-CredentialProviderConfig} - - -CredentialProviderConfig is the configuration containing information about +

CredentialProviderConfig is the configuration containing information about each exec credential provider. Kubelet reads this configuration from disk and enables -each provider as specified by the CredentialProvider type. +each provider as specified by the CredentialProvider type.

+ @@ -117,165 +29,221 @@ each provider as specified by the CredentialProvider type. - - +auth keys, the value from the provider earlier in this list is used.

+ - -
FieldDescription
apiVersion
string
kubelet.config.k8s.io/v1alpha1
kind
string
CredentialProviderConfig
providers [Required]
[]CredentialProvider
- providers is a list of credential provider plugins that will be enabled by the kubelet. +

providers is a list of credential provider plugins that will be enabled by the kubelet. Multiple providers may match against a single image, in which case credentials from all providers will be returned to the kubelet. If multiple providers are called for a single image, the results are combined. If providers return overlapping -auth keys, the value from the provider earlier in this list is used.

- - ## `CredentialProvider` {#kubelet-config-k8s-io-v1alpha1-CredentialProvider} - - **Appears in:** - [CredentialProviderConfig](#kubelet-config-k8s-io-v1alpha1-CredentialProviderConfig) -CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only -invoked when an image being pulled matches the images handled by the plugin (see matchImages). +

CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only +invoked when an image being pulled matches the images handled by the plugin (see matchImages).

+ - +bin directory (set by the --image-credential-provider-bin-dir flag).

+ - - +as subdomains like '.k8s.io' or 'k8s..io', and top-level-domains such as 'k8s.'. +Matching partial subdomains like 'app.k8s.io' is also supported. Each glob can only match +a single subdomain segment, so *.io does not match *.k8s.io.

+

A match exists between an image and a matchImage when all of the below are true:

+ +

Example values of matchImages:

+ + - - +

defaultCacheDuration is the default duration the plugin will cache credentials in-memory +if a cache duration is not provided in the plugin response. This field is required.

+ - - +

Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse +MUST use the same encoding version as the input. Current supported values are:

+ + - - +

Arguments to pass to the command when executing it.

+ - - +to pass argument to the plugin.

+ - -
FieldDescription
name [Required]
string
- name is the required name of the credential provider. It must match the name of the +

name is the required name of the credential provider. It must match the name of the provider executable as seen by the kubelet. The executable must be in the kubelet's -bin directory (set by the --image-credential-provider-bin-dir flag).

matchImages [Required]
[]string
- matchImages is a required list of strings used to match against images in order to +

matchImages is a required list of strings used to match against images in order to determine if this provider should be invoked. If one of the strings matches the requested image from the kubelet, the plugin will be invoked and given a chance to provide credentials. Images are expected to contain the registry domain -and URL path. - -Each entry in matchImages is a pattern which can optionally contain a port and a path. +and URL path.

+

Each entry in matchImages is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported -as subdomains like '∗.k8s.io' or 'k8s.∗.io', and top-level-domains such as 'k8s.∗'. -Matching partial subdomains like 'app∗.k8s.io' is also supported. Each glob can only match -a single subdomain segment, so ∗.io does not match ∗.k8s.io. - -A match exists between an image and a matchImage when all of the below are true: -- Both contain the same number of domain parts and each part matches. -- The URL path of an imageMatch must be a prefix of the target image URL path. -- If the imageMatch contains a port, then the port must match in the image as well. - -Example values of matchImages: - - 123456789.dkr.ecr.us-east-1.amazonaws.com - - ∗.azurecr.io - - gcr.io - - ∗.∗.registry.io - - registry.io:8080/path

defaultCacheDuration [Required]
-meta/v1.Duration +meta/v1.Duration
- defaultCacheDuration is the default duration the plugin will cache credentials in-memory -if a cache duration is not provided in the plugin response. This field is required.
apiVersion [Required]
string
- Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse -MUST use the same encoding version as the input. Current supported values are: -- credentialprovider.kubelet.k8s.io/v1alpha1
args
[]string
- Arguments to pass to the command when executing it.
env
[]ExecEnvVar
- Env defines additional environment variables to expose to the process. These +

Env defines additional environment variables to expose to the process. These are unioned with the host's environment, as well as variables client-go uses -to pass argument to the plugin.

- - ## `ExecEnvVar` {#kubelet-config-k8s-io-v1alpha1-ExecEnvVar} - - **Appears in:** - [CredentialProvider](#kubelet-config-k8s-io-v1alpha1-CredentialProvider) -ExecEnvVar is used for setting environment variables when executing an exec-based -credential plugin. +

ExecEnvVar is used for setting environment variables when executing an exec-based +credential plugin.

+ - + No description provided. - - + No description provided. - -
FieldDescription
name [Required]
string
- No description provided. -
value [Required]
string
- No description provided. -
+ + + + +## `FormatOptions` {#FormatOptions} + + +**Appears in:** + + + +

FormatOptions contains options for the different logging formats.

+ + + + + + + + + +
FieldDescription
json [Required]
+JSONOptions +
+

[Experimental] JSON contains options for logging format "json".

+
+ +## `JSONOptions` {#JSONOptions} + + +**Appears in:** + +- [FormatOptions](#FormatOptions) + + +

JSONOptions contains options for logging format "json".

+ + + + + + + + + + + + + + +
FieldDescription
splitStream [Required]
+bool +
+

[Experimental] SplitStream redirects error messages to stderr while +info messages go to stdout, with buffering. The default is to write +both to stdout, without buffering.

+
infoBufferSize [Required]
+k8s.io/apimachinery/pkg/api/resource.QuantityValue +
+

[Experimental] InfoBufferSize sets the size of the info stream when +using split streams. The default is zero, which disables buffering.

+
+ +## `VModuleConfiguration` {#VModuleConfiguration} + +(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) + +**Appears in:** + + + +

VModuleConfiguration is a collection of individual file names or patterns +and the corresponding verbosity threshold.

+ + + diff --git a/content/en/docs/reference/config-api/kubelet-config.v1beta1.md b/content/en/docs/reference/config-api/kubelet-config.v1beta1.md index c299c56470..9fc2bbfde0 100644 --- a/content/en/docs/reference/config-api/kubelet-config.v1beta1.md +++ b/content/en/docs/reference/config-api/kubelet-config.v1beta1.md @@ -14,175 +14,13 @@ auto_generated: true -## `FormatOptions` {#FormatOptions} - - - - -**Appears in:** -- [LoggingConfiguration](#LoggingConfiguration) - - -FormatOptions contains options for the different logging formats. - - - - - - - - - - - - - -
FieldDescription
json [Required]
-JSONOptions -
- [Experimental] JSON contains options for logging format "json".
- -## `JSONOptions` {#JSONOptions} - - - - -**Appears in:** -- [FormatOptions](#FormatOptions) - - -JSONOptions contains options for logging format "json". - - - - - - - - - - - - - - - - - - -
FieldDescription
splitStream [Required]
-bool -
- [Experimental] SplitStream redirects error messages to stderr while -info messages go to stdout, with buffering. The default is to write -both to stdout, without buffering.
infoBufferSize [Required]
-k8s.io/apimachinery/pkg/api/resource.QuantityValue -
- [Experimental] InfoBufferSize sets the size of the info stream when -using split streams. The default is zero, which disables buffering.
- -## `LoggingConfiguration` {#LoggingConfiguration} - - - - -**Appears in:** -- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) - - -LoggingConfiguration contains logging options -Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldDescription
format [Required]
-string -
- Format Flag specifies the structure of log messages. -default value of format is `text`
flushFrequency [Required]
-time.Duration -
- Maximum number of seconds between log flushes. Ignored if the -selected logging backend writes log messages without buffering.
verbosity [Required]
-uint32 -
- Verbosity is the threshold that determines which log messages are -logged. Default is zero which logs only the most important -messages. Higher values enable additional messages. Error messages -are always logged.
vmodule [Required]
-VModuleConfiguration -
- VModule overrides the verbosity threshold for individual files. -Only supported for "text" log format.
sanitization [Required]
-bool -
- [Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). -Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)
options [Required]
-FormatOptions -
- [Experimental] Options holds additional parameters that are specific -to the different logging formats. Only the options for the selected -format get used, but all of them get validated.
- -## `VModuleConfiguration` {#VModuleConfiguration} - -(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) - - -**Appears in:** -- [LoggingConfiguration](#LoggingConfiguration) - - -VModuleConfiguration is a collection of individual file names or patterns -and the corresponding verbosity threshold. - - - - - ## `KubeletConfiguration` {#kubelet-config-k8s-io-v1beta1-KubeletConfiguration} +

KubeletConfiguration contains the configuration for the Kubelet

-KubeletConfiguration contains the configuration for the Kubelet - @@ -190,149 +28,137 @@ KubeletConfiguration contains the configuration for the Kubelet - - +Default: true

+ - - +Default: ""

+ - - +Default: "1m"

+ - - +Default: "20s"

+ - - +Default: "20s"

+ - - +Default: ""

+ - - +Default: nil

+ - - +Default: "0.0.0.0"

+ - - +Default: 10250

+ - - +Default: 0 (disabled)

+ - - +Default: ""

+ - - +Default: ""

+ - - +Default: nil

+ - - +Default: ""

+ - - +Default: false

+ - - +Default: false

+ - - +anonymous: +enabled: false +webhook: +enabled: true +cacheTTL: "2m"

+ - - +mode: Webhook +webhook: +cacheAuthorizedTTL: "5m" +cacheUnauthorizedTTL: "30s"

+ - - +Default: 5

+ - - +Default: 10

+ - - +Default: 5

+ - - +Default: 10

+ - - +Default: true

+ - - +Default: false

+ - - +Default: 10248

+ - - +Default: "127.0.0.1"

+ - - +Default: -999

+ - - +Default: ""

+ - - +Default: nil

+ - - +Default: "4h"

+ - - +Default: "10s"

+ - - +Default: "5m"

+ - - +Default: 40

+ - - +Default: "2m"

+ - - +Default: 85

+ - - +Default: 80

+ - - +Default: "1m"

+ - - +Default: ""

+ - - +Default: ""

+ - - +Default: ""

+ - - +Default: true

+ - - +Default: "cgroupfs"

+ - - +Default: "None"

+ - - +Default: nil

+ - - +Default: "10s"

+ - - +Default: "none"

+ - - +Default: "none"

+ - - +

topologyManagerScope represents the scope of topology hint generation +that topology manager requests and hint providers generate. Valid values include:

+ +

"pod" scope requires the TopologyManager feature gate to be enabled. +Default: "container"

+ - - +Default: nil

+ - - +Default: "2m"

+ - - +Default: "promiscuous-bridge"

+ - - +Default: 110

+ - - +Default: ""

+ - - +Default: -1

+ - - +Default: "/etc/resolv.conf"

+ - - +Default: false

+ - - +Default: true

+ - - +Default: "100ms"

+ - - +Default: 50

+ - - +Default: 1000000

+ - - +Default: "application/vnd.kubernetes.protobuf"

+ - - +Default: 5

+ - - +Default: 10

+ - - +Default: true

+ - - +memory.available: "100Mi" +nodefs.available: "10%" +nodefs.inodesFree: "5%" +imagefs.available: "15%"

+ - - +Default: nil

+ - - +Default: nil

+ - - +Default: "5m"

+ - - +Default: 0

+ - - +Default: nil

+ - - +Default: 0

+ - - +Default: true

+ - - +Default: false

+ - - +Default: true

+ - - +Default: 14

+ - - +Default: 15

+ - - +Default: nil

+ - - +Default: true

+ - - +

memorySwap configures swap memory available to container workloads.

+ - - +Default: "10Mi"

+ - - +Default: 5

+ - - +

configMapAndSecretChangeDetectionStrategy is a mode in which ConfigMap and Secret +managers are running. Valid values include:

+ +

Default: "Watch"

+ - - +Default: nil

+ - - +Default: nil

+ - - +

The reservedSystemCPUs option specifies the CPU list reserved for the host +level system threads and kubernetes related threads. This provide a "static" +CPU list rather than the "dynamic" list by systemReserved and kubeReserved. +This option does not support systemReservedCgroup or kubeReservedCgroup.

+ - - +Default: ""

+ - - +Default: ""

+ - - +Default: ""

+ - - +Default: ["pods"]

+ - - +

A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in *). +Unsafe sysctl groups are kernel.shm*, kernel.msg*, kernel.sem, fs.mqueue.*, +and net.*. For example: "kernel.msg*,net.ipv4.route.min_pmtu" +Default: []

+ - - +Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"

+ - - +Default: ""

+ - - +Default: false

+ - - +Format: text

+ - - +

enableSystemLogHandler enables system logs via web interface host:port/logs/ +Default: true

+ - - +Default: "0s"

+ - - +Default: "0s"

+ - - +Default: nil

+ - - +Also, avoid specifying:

+
    +
  1. Duplicates, the same NUMA node, and memory type, but with a different value.
  2. +
  3. zero limits for any memory type.
  4. +
  5. NUMAs nodes IDs that do not exist under the machine.
  6. +
  7. memory types except for memory and hugepages-
  8. +
+

Default: nil

+ - - +

enableProfilingHandler enables profiling via web interface host:port/debug/pprof/ +Default: true

+ - - +

enableDebugFlagsHandler enables flags endpoint via web interface host:port/debug/flags/v +Default: true

+ - - +Default: false

+ - - +Default: 0.8

+ - - +Default: nil

+ - - +

registerNode enables automatic registration with the apiserver. +Default: true

+ - -
FieldDescription
apiVersion
string
kubelet.config.k8s.io/v1beta1
kind
string
KubeletConfiguration
enableServer [Required]
bool
- enableServer enables Kubelet's secured server. +

enableServer enables Kubelet's secured server. Note: Kubelet's insecure port is controlled by the readOnlyPort option. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: true

staticPodPath
string
- staticPodPath is the path to the directory containing local (static) pods to +

staticPodPath is the path to the directory containing local (static) pods to run, or the path to a single static pod file. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that the set of static pods specified at the new path may be different than the ones the Kubelet initially started with, and this may disrupt your node. -Default: ""

syncFrequency
-meta/v1.Duration +meta/v1.Duration
- syncFrequency is the max period between synchronizing running +

syncFrequency is the max period between synchronizing running containers and config. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening this duration may have a negative performance impact, especially as the number of Pods on the node increases. Alternatively, increasing this duration will result in longer refresh times for ConfigMaps and Secrets. -Default: "1m"

fileCheckFrequency
-meta/v1.Duration +meta/v1.Duration
- fileCheckFrequency is the duration between checking config files for +

fileCheckFrequency is the duration between checking config files for new data. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the duration will cause the Kubelet to reload local Static Pod configurations more frequently, which may have a negative performance impact. -Default: "20s"

httpCheckFrequency
-meta/v1.Duration +meta/v1.Duration
- httpCheckFrequency is the duration between checking http for new data. +

httpCheckFrequency is the duration between checking http for new data. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the duration will cause the Kubelet to poll staticPodURL more frequently, which may have a negative performance impact. -Default: "20s"

staticPodURL
string
- staticPodURL is the URL for accessing static pods to run. +

staticPodURL is the URL for accessing static pods to run. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that the set of static pods specified at the new URL may be different than the ones the Kubelet initially started with, and this may disrupt your node. -Default: ""

staticPodURLHeader
map[string][]string
- staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL. +

staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt the ability to read the latest set of static pods from StaticPodURL. -Default: nil

address
string
- address is the IP address for the Kubelet to serve on (set to 0.0.0.0 +

address is the IP address for the Kubelet to serve on (set to 0.0.0.0 for all interfaces). If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: "0.0.0.0"

port
int32
- port is the port for the Kubelet to serve on. +

port is the port for the Kubelet to serve on. The port number must be between 1 and 65535, inclusive. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: 10250

readOnlyPort
int32
- readOnlyPort is the read-only port for the Kubelet to serve on with +

readOnlyPort is the read-only port for the Kubelet to serve on with no authentication/authorization. The port number must be between 1 and 65535, inclusive. Setting this field to 0 disables the read-only service. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: 0 (disabled)

tlsCertFile
string
- tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, +

tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert, if any, concatenated after server cert). If tlsCertFile and tlsPrivateKeyFile are not provided, a self-signed certificate and key are generated for the public address and saved to the directory @@ -340,68 +166,63 @@ passed to the Kubelet's --cert-dir flag. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: ""

tlsPrivateKeyFile
string
- tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile. +

tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: ""

tlsCipherSuites
[]string
- tlsCipherSuites is the list of allowed cipher suites for the server. +

tlsCipherSuites is the list of allowed cipher suites for the server. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: nil

tlsMinVersion
string
- tlsMinVersion is the minimum TLS version supported. +

tlsMinVersion is the minimum TLS version supported. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: ""

rotateCertificates
bool
- rotateCertificates enables client certificate rotation. The Kubelet will request a +

rotateCertificates enables client certificate rotation. The Kubelet will request a new certificate from the certificates.k8s.io API. This requires an approver to approve the certificate signing requests. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it may disrupt the Kubelet's ability to authenticate with the API server after the current certificate expires. -Default: false

serverTLSBootstrap
bool
- serverTLSBootstrap enables server certificate bootstrap. Instead of self +

serverTLSBootstrap enables server certificate bootstrap. Instead of self signing a serving certificate, the Kubelet will request a certificate from the 'certificates.k8s.io' API. This requires an approver to approve the certificate signing requests (CSR). The RotateKubeletServerCertificate feature @@ -411,63 +232,59 @@ dynamically updating this field, consider that disabling it will stop the renewal of Kubelet server certificates, which can disrupt components that interact with the Kubelet server in the long term, due to certificate expiration. -Default: false

authentication
KubeletAuthentication
- authentication specifies how requests to the Kubelet's server are authenticated. +

authentication specifies how requests to the Kubelet's server are authenticated. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults: - anonymous: - enabled: false - webhook: - enabled: true - cacheTTL: "2m"

authorization
KubeletAuthorization
- authorization specifies how requests to the Kubelet's server are authorized. +

authorization specifies how requests to the Kubelet's server are authorized. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. Defaults: - mode: Webhook - webhook: - cacheAuthorizedTTL: "5m" - cacheUnauthorizedTTL: "30s"

registryPullQPS
int32
- registryPullQPS is the limit of registry pulls per second. +

registryPullQPS is the limit of registry pulls per second. The value must not be a negative number. Setting it to 0 means no limit. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. -Default: 5

registryBurst
int32
- registryBurst is the maximum size of bursty pulls, temporarily allows +

registryBurst is the maximum size of bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registryPullQPS. The value must not be a negative number. Only used if registryPullQPS is greater than 0. @@ -475,151 +292,140 @@ If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by image pulls. -Default: 10

eventRecordQPS
int32
- eventRecordQPS is the maximum event creations per second. If 0, there +

eventRecordQPS is the maximum event creations per second. If 0, there is no limit enforced. The value cannot be a negative number. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. -Default: 5

eventBurst
int32
- eventBurst is the maximum size of a burst of event creations, temporarily +

eventBurst is the maximum size of a burst of event creations, temporarily allows event creations to burst to this number, while still not exceeding eventRecordQPS. This field canot be a negative number and it is only used -when eventRecordQPS > 0. +when eventRecordQPS > 0. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic produced by event creations. -Default: 10

enableDebuggingHandlers
bool
- enableDebuggingHandlers enables server endpoints for log access +

enableDebuggingHandlers enables server endpoints for log access and local running of containers and commands, including the exec, attach, logs, and portforward features. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it may disrupt components that interact with the Kubelet server. -Default: true

enableContentionProfiling
bool
- enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. +

enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that enabling it may carry a performance impact. -Default: false

healthzPort
int32
- healthzPort is the port of the localhost healthz endpoint (set to 0 to disable). +

healthzPort is the port of the localhost healthz endpoint (set to 0 to disable). A valid number is between 1 and 65535. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. -Default: 10248

healthzBindAddress
string
- healthzBindAddress is the IP address for the healthz server to serve on. +

healthzBindAddress is the IP address for the healthz server to serve on. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that monitor Kubelet health. -Default: "127.0.0.1"

oomScoreAdj
int32
- oomScoreAdj is The oom-score-adj value for kubelet process. Values +

oomScoreAdj is The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the stability of nodes under memory pressure. -Default: -999

clusterDomain
string
- clusterDomain is the DNS domain for this cluster. If set, kubelet will +

clusterDomain is the DNS domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains. Dynamic Kubelet Config (deprecated): Dynamically updating this field is not recommended, as it should be kept in sync with the rest of the cluster. -Default: ""

clusterDNS
[]string
- clusterDNS is a list of IP addresses for the cluster DNS server. If set, +

clusterDNS is a list of IP addresses for the cluster DNS server. If set, kubelet will configure all containers to use this for DNS resolution instead of the host's DNS servers. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. -Default: nil

streamingConnectionIdleTimeout
-meta/v1.Duration +meta/v1.Duration
- streamingConnectionIdleTimeout is the maximum time a streaming connection +

streamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact components that rely on infrequent updates over streaming connections to the Kubelet server. -Default: "4h"

nodeStatusUpdateFrequency
-meta/v1.Duration +meta/v1.Duration
- nodeStatusUpdateFrequency is the frequency that kubelet computes node +

nodeStatusUpdateFrequency is the frequency that kubelet computes node status. If node lease feature is not enabled, it is also the frequency that kubelet posts node status to master. Note: When node lease feature is not enabled, be cautious when changing the @@ -627,33 +433,31 @@ constant, it must work with nodeMonitorGracePeriod in nodecontroller. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact node scalability, and also that the node controller's -nodeMonitorGracePeriod must be set to N∗NodeStatusUpdateFrequency, +nodeMonitorGracePeriod must be set to N*NodeStatusUpdateFrequency, where N is the number of retries before the node controller marks the node unhealthy. -Default: "10s"

nodeStatusReportFrequency
-meta/v1.Duration +meta/v1.Duration
- nodeStatusReportFrequency is the frequency that kubelet posts node +

nodeStatusReportFrequency is the frequency that kubelet posts node status to master if node status does not change. Kubelet will ignore this frequency and post node status immediately if any change is detected. It is only used when node lease feature is enabled. nodeStatusReportFrequency's default value is 5m. But if nodeStatusUpdateFrequency is set explicitly, nodeStatusReportFrequency's default value will be set to nodeStatusUpdateFrequency for backward compatibility. -Default: "5m"

nodeLeaseDurationSeconds
int32
- nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease. +

nodeLeaseDurationSeconds is the duration the Kubelet will set on its corresponding Lease. NodeLease provides an indicator of node health by having the Kubelet create and periodically renew a lease, named after the node, in the kube-node-lease namespace. If the lease expires, the node can be considered unhealthy. @@ -664,27 +468,25 @@ If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that decreasing the duration may reduce tolerance for issues that temporarily prevent the Kubelet from renewing the lease (e.g. a short-lived network issue). -Default: 40

imageMinimumGCAge
-meta/v1.Duration +meta/v1.Duration
- imageMinimumGCAge is the minimum age for an unused image before it is +

imageMinimumGCAge is the minimum age for an unused image before it is garbage collected. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. -Default: "2m"

imageGCHighThresholdPercent
int32
- imageGCHighThresholdPercent is the percent of disk usage after which +

imageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run. The percent is calculated by dividing this field value by 100, so this field must be between 0 and 100, inclusive. When specified, the value must be greater than @@ -693,15 +495,14 @@ If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. -Default: 85

imageGCLowThresholdPercent
int32
- imageGCLowThresholdPercent is the percent of disk usage before which +

imageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. The percent is calculated by dividing this field value by 100, so the field value must be between 0 and 100, inclusive. When specified, the @@ -710,227 +511,211 @@ If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay garbage collection, and may change the image overhead on the node. -Default: 80

volumeStatsAggPeriod
-meta/v1.Duration +meta/v1.Duration
- volumeStatsAggPeriod is the frequency for calculating and caching volume +

volumeStatsAggPeriod is the frequency for calculating and caching volume disk usage for all pods. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the period may carry a performance impact. -Default: "1m"

kubeletCgroups
string
- kubeletCgroups is the absolute name of cgroups to isolate the kubelet in +

kubeletCgroups is the absolute name of cgroups to isolate the kubelet in Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: ""

systemCgroups
string
- systemCgroups is absolute name of cgroups in which to place +

systemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. The cgroupRoot must be specified if this field is not empty. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: ""

cgroupRoot
string
- cgroupRoot is the root cgroup to use for pods. This is handled by the +

cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: ""

cgroupsPerQOS
bool
- cgroupsPerQOS enable QoS based CGroup hierarchy: top level CGroups for QoS classes +

cgroupsPerQOS enable QoS based CGroup hierarchy: top level CGroups for QoS classes and all Burstable and BestEffort Pods are brought up under their specific top level QoS CGroup. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: true

cgroupDriver
string
- cgroupDriver is the driver kubelet uses to manipulate CGroups on the host (cgroupfs +

cgroupDriver is the driver kubelet uses to manipulate CGroups on the host (cgroupfs or systemd). Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: "cgroupfs"

cpuManagerPolicy
string
- cpuManagerPolicy is the name of the policy to use. +

cpuManagerPolicy is the name of the policy to use. Requires the CPUManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: "None"

cpuManagerPolicyOptions
map[string]string
- cpuManagerPolicyOptions is a set of key=value which allows to set extra options +

cpuManagerPolicyOptions is a set of key=value which allows to set extra options to fine tune the behaviour of the cpu manager policies. -Requires both the "CPUManager" and "CPUManagerPolicyOptions" feature gates to be enabled. +Requires both the "CPUManager" and "CPUManagerPolicyOptions" feature gates to be enabled. Dynamic Kubelet Config (beta): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: nil

cpuManagerReconcilePeriod
-meta/v1.Duration +meta/v1.Duration
- cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. +

cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. Requires the CPUManager feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that shortening the period may carry a performance impact. -Default: "10s"

memoryManagerPolicy
string
- memoryManagerPolicy is the name of the policy to use by memory manager. +

memoryManagerPolicy is the name of the policy to use by memory manager. Requires the MemoryManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: "none"

topologyManagerPolicy
string
- topologyManagerPolicy is the name of the topology manager policy to use. -Valid values include: - -- `restricted`: kubelet only allows pods with optimal NUMA node alignment for - requested resources; -- `best-effort`: kubelet will favor pods with NUMA alignment of CPU and device - resources; -- `none`: kubelet has no knowledge of NUMA alignment of a pod's CPU and device resources. -- `single-numa-node`: kubelet only allows pods with a single NUMA alignment - of CPU and device resources. - -Policies other than "none" require the TopologyManager feature gate to be enabled. +

topologyManagerPolicy is the name of the topology manager policy to use. +Valid values include:

+
    +
  • restricted: kubelet only allows pods with optimal NUMA node alignment for +requested resources;
  • +
  • best-effort: kubelet will favor pods with NUMA alignment of CPU and device +resources;
  • +
  • none: kubelet has no knowledge of NUMA alignment of a pod's CPU and device resources.
  • +
  • single-numa-node: kubelet only allows pods with a single NUMA alignment +of CPU and device resources.
  • +
+

Policies other than "none" require the TopologyManager feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: "none"

topologyManagerScope
string
- topologyManagerScope represents the scope of topology hint generation -that topology manager requests and hint providers generate. Valid values include: - -- `container`: topology policy is applied on a per-container basis. -- `pod`: topology policy is applied on a per-pod basis. - -"pod" scope requires the TopologyManager feature gate to be enabled. -Default: "container"
qosReserved
map[string]string
- qosReserved is a set of resource name to percentage pairs that specify +

qosReserved is a set of resource name to percentage pairs that specify the minimum percentage of a resource reserved for exclusive use by the guaranteed QoS tier. -Currently supported resources: "memory" +Currently supported resources: "memory" Requires the QOSReserved feature gate to be enabled. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: nil

runtimeRequestTimeout
-meta/v1.Duration +meta/v1.Duration
- runtimeRequestTimeout is the timeout for all runtime requests except long running +

runtimeRequestTimeout is the timeout for all runtime requests except long running requests - pull, logs, exec and attach. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may disrupt components that interact with the Kubelet server. -Default: "2m"

hairpinMode
string
- hairpinMode specifies how the Kubelet should configure the container +

hairpinMode specifies how the Kubelet should configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to -themselves if they should try to access their own Service. Values: - -- "promiscuous-bridge": make the container bridge promiscuous. -- "hairpin-veth": set the hairpin flag on container veth interfaces. -- "none": do nothing. - -Generally, one must set `--hairpin-mode=hairpin-veth to` achieve hairpin NAT, +themselves if they should try to access their own Service. Values:

+
    +
  • "promiscuous-bridge": make the container bridge promiscuous.
  • +
  • "hairpin-veth": set the hairpin flag on container veth interfaces.
  • +
  • "none": do nothing.
  • +
+

Generally, one must set --hairpin-mode=hairpin-veth to achieve hairpin NAT, because promiscuous-bridge assumes the existence of a container bridge named cbr0. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may require a node reboot, depending on the network plugin. -Default: "promiscuous-bridge"

maxPods
int32
- maxPods is the maximum number of Pods that can run on this Kubelet. +

maxPods is the maximum number of Pods that can run on this Kubelet. The value must be a non-negative integer. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that @@ -938,233 +723,216 @@ changes may cause Pods to fail admission on Kubelet restart, and may change the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. -Default: 110

podCIDR
string
- podCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. +

podCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the control plane. Dynamic Kubelet Config (deprecated): This field should always be set to the empty default. It should only set for standalone Kubelets, which cannot use Dynamic Kubelet Config. -Default: ""

podPidsLimit
int64
- podPidsLimit is the maximum number of PIDs in any pod. +

podPidsLimit is the maximum number of PIDs in any pod. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may prevent container processes from forking after the change. -Default: -1

resolvConf
string
- resolvConf is the resolver configuration file used as the basis +

resolvConf is the resolver configuration file used as the basis for the container DNS resolution configuration. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes will only take effect on Pods created after the update. Draining the node is recommended before changing this field. If set to the empty string, will override the default and effectively disable DNS lookups. -Default: "/etc/resolv.conf"

runOnce
bool
- runOnce causes the Kubelet to check the API server once for pods, +

runOnce causes the Kubelet to check the API server once for pods, run those in addition to the pods specified by static pod files, and exit. -Default: false

cpuCFSQuota
bool
- cpuCFSQuota enables CPU CFS quota enforcement for containers that +

cpuCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it may reduce node stability. -Default: true

cpuCFSQuotaPeriod
-meta/v1.Duration +meta/v1.Duration
- cpuCFSQuotaPeriod is the CPU CFS quota period value, `cpu.cfs_period_us`. +

cpuCFSQuotaPeriod is the CPU CFS quota period value, cpu.cfs_period_us. The value must be between 1 us and 1 second, inclusive. Requires the CustomCPUCFSQuotaPeriod feature gate to be enabled. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that limits set for containers will result in different cpu.cfs_quota settings. This will trigger container restarts on the node being reconfigured. -Default: "100ms"

nodeStatusMaxImages
int32
- nodeStatusMaxImages caps the number of images reported in Node.status.images. +

nodeStatusMaxImages caps the number of images reported in Node.status.images. The value must be greater than -2. Note: If -1 is specified, no cap will be applied. If 0 is specified, no image is returned. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that different values can be reported on node status. -Default: 50

maxOpenFiles
int64
- maxOpenFiles is Number of files that can be opened by Kubelet process. +

maxOpenFiles is Number of files that can be opened by Kubelet process. The value must be a non-negative number. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the ability of the Kubelet to interact with the node's filesystem. -Default: 1000000

contentType
string
- contentType is contentType of requests sent to apiserver. +

contentType is contentType of requests sent to apiserver. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the ability for the Kubelet to communicate with the API server. If the Kubelet loses contact with the API server due to a change to this field, the change cannot be reverted via dynamic Kubelet config. -Default: "application/vnd.kubernetes.protobuf"

kubeAPIQPS
int32
- kubeAPIQPS is the QPS to use while talking with kubernetes apiserver. +

kubeAPIQPS is the QPS to use while talking with kubernetes apiserver. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. -Default: 5

kubeAPIBurst
int32
- kubeAPIBurst is the burst to allow while talking with kubernetes API server. +

kubeAPIBurst is the burst to allow while talking with kubernetes API server. This field cannot be a negative number. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact scalability by changing the amount of traffic the Kubelet sends to the API server. -Default: 10

serializeImagePulls
bool
- serializeImagePulls when enabled, tells the Kubelet to pull images one -at a time. We recommend ∗not∗ changing the default value on nodes that -run docker daemon with version < 1.9 or an Aufs storage backend. +

serializeImagePulls when enabled, tells the Kubelet to pull images one +at a time. We recommend not changing the default value on nodes that +run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the performance of image pulls. -Default: true

evictionHard
map[string]string
- evictionHard is a map of signal names to quantities that defines hard eviction -thresholds. For example: `{"memory.available": "300Mi"}`. +

evictionHard is a map of signal names to quantities that defines hard eviction +thresholds. For example: {"memory.available": "300Mi"}. To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay Pod evictions. Default: - memory.available: "100Mi" - nodefs.available: "10%" - nodefs.inodesFree: "5%" - imagefs.available: "15%"

evictionSoft
map[string]string
- evictionSoft is a map of signal names to quantities that defines soft eviction thresholds. -For example: `{"memory.available": "300Mi"}`. +

evictionSoft is a map of signal names to quantities that defines soft eviction thresholds. +For example: {"memory.available": "300Mi"}. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay Pod evictions, and may change the allocatable reported by the node. -Default: nil

evictionSoftGracePeriod
map[string]string
- evictionSoftGracePeriod is a map of signal names to quantities that defines grace -periods for each soft eviction signal. For example: `{"memory.available": "30s"}`. +

evictionSoftGracePeriod is a map of signal names to quantities that defines grace +periods for each soft eviction signal. For example: {"memory.available": "30s"}. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger or delay Pod evictions. -Default: nil

evictionPressureTransitionPeriod
-meta/v1.Duration +meta/v1.Duration
- evictionPressureTransitionPeriod is the duration for which the kubelet has to wait +

evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may decrease the stability of the node when the node is overcommitted. -Default: "5m"

evictionMaxPodGracePeriod
int32
- evictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use +

evictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. This value effectively caps the Pod's terminationGracePeriodSeconds value during soft evictions. Note: Due to issue #64530, the behavior has a bug where this value currently just @@ -1174,47 +942,44 @@ If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it decreases the amount of time Pods will have to gracefully clean up before being killed during a soft eviction. -Default: 0

evictionMinimumReclaim
map[string]string
- evictionMinimumReclaim is a map of signal names to quantities that defines minimum reclaims, +

evictionMinimumReclaim is a map of signal names to quantities that defines minimum reclaims, which describe the minimum amount of a given resource the kubelet will reclaim when performing a pod eviction while that resource is under pressure. -For example: `{"imagefs.available": "2Gi"}`. +For example: {"imagefs.available": "2Gi"}. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may change how well eviction can manage resource pressure. -Default: nil

podsPerCore
int32
- podsPerCore is the maximum number of pods per core. Cannot exceed maxPods. +

podsPerCore is the maximum number of pods per core. Cannot exceed maxPods. The value must be a non-negative integer. If 0, there is no limit on the number of Pods. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changes may cause Pods to fail admission on Kubelet restart, and may change -the value reported in `Node.status.capacity.pods`, thus affecting +the value reported in Node.status.capacity.pods, thus affecting future scheduling decisions. Increasing this value may also decrease performance, as more Pods can be packed into a single node. -Default: 0

enableControllerAttachDetach
bool
- enableControllerAttachDetach enables the Attach/Detach controller to +

enableControllerAttachDetach enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations. If DynamicKubeletConfig (deprecated; default off) is on, when @@ -1224,45 +989,42 @@ may result in volumes refusing to detach if the node is not drained prior to the update, and if Pods are scheduled to the node before the volumes.kubernetes.io/controller-managed-attach-detach annotation is updated by the Kubelet. In general, it is safest to leave this value set the same as local config. -Default: true

protectKernelDefaults
bool
- protectKernelDefaults, if true, causes the Kubelet to error if kernel +

protectKernelDefaults, if true, causes the Kubelet to error if kernel flags are not as it expects. Otherwise the Kubelet will attempt to modify kernel flags to match its expectation. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that enabling it may cause the Kubelet to crash-loop if the Kernel is not configured as Kubelet expects. -Default: false

makeIPTablesUtilChains
bool
- makeIPTablesUtilChains, if true, causes the Kubelet ensures a set of iptables rules +

makeIPTablesUtilChains, if true, causes the Kubelet ensures a set of iptables rules are present on host. These rules will serve as utility rules for various components, e.g. kube-proxy. The rules will be created based on iptablesMasqueradeBit and iptablesDropBit. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that disabling it will prevent the Kubelet from healing locally misconfigured iptables rules. -Default: true

iptablesMasqueradeBit
int32
- iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT. +

iptablesMasqueradeBit is the bit of the iptables fwmark space to mark for SNAT. Values must be within the range [0, 31]. Must be different from other mark bits. Warning: Please match the value of the corresponding parameter in kube-proxy. TODO: clean up IPTablesMasqueradeBit in kube-proxy. @@ -1270,107 +1032,99 @@ If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. -Default: 14

iptablesDropBit
int32
- iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. +

iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. Values must be within the range [0, 31]. Must be different from other mark bits. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it needs to be coordinated with other components, like kube-proxy, and the update will only be effective if MakeIPTablesUtilChains is enabled. -Default: 15

featureGates
map[string]bool
- featureGates is a map of feature names to bools that enable or disable experimental +

featureGates is a map of feature names to bools that enable or disable experimental features. This field modifies piecemeal the built-in default values from -"k8s.io/kubernetes/pkg/features/kube_features.go". +"k8s.io/kubernetes/pkg/features/kube_features.go". If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider the documentation for the features you are enabling or disabling. While we encourage feature developers to make it possible to dynamically enable and disable features, some changes may require node reboots, and some features may require careful coordination to retroactively disable. -Default: nil

failSwapOn
bool
- failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. +

failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that setting it to true will cause the Kubelet to crash-loop if swap is enabled. -Default: true

memorySwap
MemorySwapConfiguration
- memorySwap configures swap memory available to container workloads.
containerLogMaxSize
string
- containerLogMaxSize is a quantity defining the maximum size of the container log -file before it is rotated. For example: "5Mi" or "256Ki". +

containerLogMaxSize is a quantity defining the maximum size of the container log +file before it is rotated. For example: "5Mi" or "256Ki". If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may trigger log rotation. -Default: "10Mi"

containerLogMaxFiles
int32
- containerLogMaxFiles specifies the maximum number of container log files that can +

containerLogMaxFiles specifies the maximum number of container log files that can be present for a container. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that lowering it may cause log files to be deleted. -Default: 5

configMapAndSecretChangeDetectionStrategy
ResourceChangeDetectionStrategy
- configMapAndSecretChangeDetectionStrategy is a mode in which ConfigMap and Secret -managers are running. Valid values include: - -- `Get`: kubelet fetches necessary objects directly from the API server; -- `Cache`: kubelet uses TTL cache for object fetched from the API server; -- `Watch`: kubelet uses watches to observe changes to objects that are in its interest. - -Default: "Watch"
systemReserved
map[string]string
- systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) +

systemReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. @@ -1379,15 +1133,14 @@ dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. -Default: nil

kubeReserved
map[string]string
- kubeReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs +

kubeReserved is a set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local storage for root file system are supported. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ @@ -1397,76 +1150,71 @@ dynamically updating this field, consider that it may not be possible to increase the reserved resources, because this requires resizing cgroups. Always look for a NodeAllocatableEnforced event after updating this field to ensure that the update was successful. -Default: nil

reservedSystemCPUs [Required]
string
- The reservedSystemCPUs option specifies the CPU list reserved for the host -level system threads and kubernetes related threads. This provide a "static" -CPU list rather than the "dynamic" list by systemReserved and kubeReserved. -This option does not support systemReservedCgroup or kubeReservedCgroup.
showHiddenMetricsForVersion
string
- showHiddenMetricsForVersion is the previous version for which you want to show +

showHiddenMetricsForVersion is the previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. -The format is `.`, e.g.: `1.16`. +The format is <major>.<minor>, e.g.: 1.16. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that. -Default: ""

systemReservedCgroup
string
- systemReservedCgroup helps the kubelet identify absolute name of top level CGroup used -to enforce `systemReserved` compute resource reservation for OS system daemons. -Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) +

systemReservedCgroup helps the kubelet identify absolute name of top level CGroup used +to enforce systemReserved compute resource reservation for OS system daemons. +Refer to Node Allocatable doc for more information. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: ""

kubeReservedCgroup
string
- kubeReservedCgroup helps the kubelet identify absolute name of top level CGroup used -to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons. -Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) +

kubeReservedCgroup helps the kubelet identify absolute name of top level CGroup used +to enforce KubeReserved compute resource reservation for Kubernetes node system daemons. +Refer to Node Allocatable doc for more information. Dynamic Kubelet Config (deprecated): This field should not be updated without a full node reboot. It is safest to keep this value the same as the local config. -Default: ""

enforceNodeAllocatable
[]string
- This flag specifies the various Node Allocatable enforcements that Kubelet needs to perform. -This flag accepts a list of options. Acceptable options are `none`, `pods`, -`system-reserved` and `kube-reserved`. -If `none` is specified, no other options may be specified. -When `system-reserved` is in the list, systemReservedCgroup must be specified. -When `kube-reserved` is in the list, kubeReservedCgroup must be specified. -This field is supported only when `cgroupsPerQOS` is set to true. -Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) +

This flag specifies the various Node Allocatable enforcements that Kubelet needs to perform. +This flag accepts a list of options. Acceptable options are none, pods, +system-reserved and kube-reserved. +If none is specified, no other options may be specified. +When system-reserved is in the list, systemReservedCgroup must be specified. +When kube-reserved is in the list, kubeReservedCgroup must be specified. +This field is supported only when cgroupsPerQOS is set to true. +Refer to Node Allocatable for more information. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that @@ -1475,111 +1223,102 @@ enforcements may reduce the stability of components which were using more than the reserved amount of resources; for example, enforcing kube-reserved may cause Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved may cause system daemons to OOM if they use more than the reserved resources. -Default: ["pods"]

allowedUnsafeSysctls
[]string
- A comma separated whitelist of unsafe sysctls or sysctl patterns (ending in `∗`). -Unsafe sysctl groups are `kernel.shm∗`, `kernel.msg∗`, `kernel.sem`, `fs.mqueue.∗`, -and `net.∗`. For example: "`kernel.msg∗,net.ipv4.route.min_pmtu`" -Default: []
volumePluginDir
string
- volumePluginDir is the full path of the directory in which to search +

volumePluginDir is the full path of the directory in which to search for additional third party volume plugins. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that changing the volumePluginDir may disrupt workloads relying on third party volume plugins. -Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"

providerID
string
- providerID, if set, sets the unique ID of the instance that an external +

providerID, if set, sets the unique ID of the instance that an external provider (i.e. cloudprovider) can use to identify a specific node. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the ability of the Kubelet to interact with cloud providers. -Default: ""

kernelMemcgNotification
bool
- kernelMemcgNotification, if set, instructs the the kubelet to integrate with the +

kernelMemcgNotification, if set, instructs the the kubelet to integrate with the kernel memcg notification for determining if memory eviction thresholds are exceeded rather than polling. If DynamicKubeletConfig (deprecated; default off) is on, when dynamically updating this field, consider that it may impact the way Kubelet interacts with the kernel. -Default: false

logging [Required]
LoggingConfiguration
- logging specifies the options of logging. -Refer to [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) +

logging specifies the options of logging. +Refer to Logs Options for more information. Default: - Format: text

enableSystemLogHandler
bool
- enableSystemLogHandler enables system logs via web interface host:port/logs/ -Default: true
shutdownGracePeriod
-meta/v1.Duration +meta/v1.Duration
- shutdownGracePeriod specifies the total duration that the node should delay the +

shutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown. -Default: "0s"

shutdownGracePeriodCriticalPods
-meta/v1.Duration +meta/v1.Duration
- shutdownGracePeriodCriticalPods specifies the duration used to terminate critical +

shutdownGracePeriodCriticalPods specifies the duration used to terminate critical pods during a node shutdown. This should be less than shutdownGracePeriod. For example, if shutdownGracePeriod=30s, and shutdownGracePeriodCriticalPods=10s, during a node shutdown the first 20 seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating critical pods. -Default: "0s"

shutdownGracePeriodByPodPriority
[]ShutdownGracePeriodByPodPriority
- shutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based +

shutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value. When a shutdown request is received, the Kubelet will initiate shutdown on all pods running on the node with a grace period that depends on the priority of the pod, @@ -1587,32 +1326,31 @@ and then wait for all pods to exit. Each entry in the array represents the graceful shutdown time a pod with a priority class value that lies in the range of that value and the next higher entry in the list when the node is shutting down. -For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to -shutdown, and all remaining pods 30s to shutdown. - -shutdownGracePeriodByPodPriority: - - priority: 2000000000 - shutdownGracePeriodSeconds: 10 - - priority: 10000 - shutdownGracePeriodSeconds: 20 - - priority: 0 - shutdownGracePeriodSeconds: 30 - -The time the Kubelet will wait before exiting will at most be the maximum of all +For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to +shutdown, and all remaining pods 30s to shutdown.

+

shutdownGracePeriodByPodPriority:

+
    +
  • priority: 2000000000 +shutdownGracePeriodSeconds: 10
  • +
  • priority: 10000 +shutdownGracePeriodSeconds: 20
  • +
  • priority: 0 +shutdownGracePeriodSeconds: 30
  • +
+

The time the Kubelet will wait before exiting will at most be the maximum of all shutdownGracePeriodSeconds for each priority class range represented on the node. When all pods have exited or reached their grace periods, the Kubelet will release the shutdown inhibit lock. Requires the GracefulNodeShutdown feature gate to be enabled. This configuration must be empty if either ShutdownGracePeriod or ShutdownGracePeriodCriticalPods is set. -Default: nil

reservedMemory
[]MemoryReservation
- reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes. +

reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes. The parameter makes sense only in the context of the memory manager feature. The memory manager will not allocate reserved memory for container workloads. For example, if you have a NUMA0 with 10Gi of memory and the reservedMemory was @@ -1621,81 +1359,74 @@ only 9Gi is available for allocation. You can specify a different amount of NUMA node and memory types. You can omit this parameter at all, but you should be aware that the amount of reserved memory from all NUMA nodes should be equal to the amount of memory specified -by the [node allocatable](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable). +by the node allocatable. If at least one node allocatable parameter has a non-zero value, you will need to specify at least one NUMA node. -Also, avoid specifying: - -1. Duplicates, the same NUMA node, and memory type, but with a different value. -2. zero limits for any memory type. -3. NUMAs nodes IDs that do not exist under the machine. -4. memory types except for memory and hugepages- - -Default: nil

enableProfilingHandler
bool
- enableProfilingHandler enables profiling via web interface host:port/debug/pprof/ -Default: true
enableDebugFlagsHandler
bool
- enableDebugFlagsHandler enables flags endpoint via web interface host:port/debug/flags/v -Default: true
seccompDefault
bool
- SeccompDefault enables the use of `RuntimeDefault` as the default seccomp profile for all workloads. +

SeccompDefault enables the use of RuntimeDefault as the default seccomp profile for all workloads. This requires the corresponding SeccompDefault feature gate to be enabled as well. -Default: false

memoryThrottlingFactor
float64
- MemoryThrottlingFactor specifies the factor multiplied by the memory limit or node allocatable memory +

MemoryThrottlingFactor specifies the factor multiplied by the memory limit or node allocatable memory when setting the cgroupv2 memory.high value to enforce MemoryQoS. Decreasing this factor will set lower high limit for container cgroups and put heavier reclaim pressure while increasing will put less reclaim pressure. See http://kep.k8s.io/2570 for more details. -Default: 0.8

registerWithTaints
[]core/v1.Taint
- registerWithTaints are an array of taints to add to a node object when +

registerWithTaints are an array of taints to add to a node object when the kubelet registers itself. This only takes effect when registerNode is true and upon the initial registration of the node. -Default: nil

registerNode
bool
- registerNode enables automatic registration with the apiserver. -Default: true
@@ -1703,11 +1434,10 @@ Default: true - - -SerializedNodeConfigSource allows us to serialize v1.NodeConfigSource. +

SerializedNodeConfigSource allows us to serialize v1.NodeConfigSource. This type is used internally by the Kubelet for tracking checkpointed dynamic configs. -It exists in the kubeletconfig API group because it is classified as a versioned input to the Kubelet. +It exists in the kubeletconfig API group because it is classified as a versioned input to the Kubelet.

+ @@ -1716,28 +1446,23 @@ It exists in the kubeletconfig API group because it is classified as a versioned - - +

source is the source that we are serializing.

+ - -
FieldDescription
apiVersion
string
kubelet.config.k8s.io/v1beta1
kind
string
SerializedNodeConfigSource
source
core/v1.NodeConfigSource
- source is the source that we are serializing.
## `KubeletAnonymousAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletAnonymousAuthentication} - - **Appears in:** -- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication) +- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication) @@ -1745,31 +1470,27 @@ It exists in the kubeletconfig API group because it is classified as a versioned FieldDescription - enabled
bool - enabled allows anonymous requests to the kubelet server. +

enabled allows anonymous requests to the kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. -Anonymous requests have a username of `system:anonymous`, and a group name of -`system:unauthenticated`. +Anonymous requests have a username of system:anonymous, and a group name of +system:unauthenticated.

+ - - ## `KubeletAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletAuthentication} - - **Appears in:** -- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) +- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) @@ -1777,43 +1498,37 @@ Anonymous requests have a username of `system:anonymous`, and a group name of FieldDescription - x509
KubeletX509Authentication - x509 contains settings related to x509 client certificate authentication. +

x509 contains settings related to x509 client certificate authentication.

+ - - webhook
KubeletWebhookAuthentication - webhook contains settings related to webhook bearer token authentication. +

webhook contains settings related to webhook bearer token authentication.

+ - - anonymous
KubeletAnonymousAuthentication - anonymous contains settings related to anonymous authentication. +

anonymous contains settings related to anonymous authentication.

+ - - ## `KubeletAuthorization` {#kubelet-config-k8s-io-v1beta1-KubeletAuthorization} - - **Appears in:** -- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) +- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) @@ -1821,26 +1536,23 @@ Anonymous requests have a username of `system:anonymous`, and a group name of FieldDescription - mode
KubeletAuthorizationMode - mode is the authorization mode to apply to requests to the kubelet server. -Valid values are `AlwaysAllow` and `Webhook`. -Webhook mode uses the SubjectAccessReview API to determine authorization. +

mode is the authorization mode to apply to requests to the kubelet server. +Valid values are AlwaysAllow and Webhook. +Webhook mode uses the SubjectAccessReview API to determine authorization.

+ - - webhook
KubeletWebhookAuthorization - webhook contains settings related to Webhook authorization. +

webhook contains settings related to Webhook authorization.

+ - - @@ -1848,10 +1560,9 @@ Webhook mode uses the SubjectAccessReview API to determine authorization. (Alias of `string`) - **Appears in:** -- [KubeletAuthorization](#kubelet-config-k8s-io-v1beta1-KubeletAuthorization) +- [KubeletAuthorization](#kubelet-config-k8s-io-v1beta1-KubeletAuthorization) @@ -1860,11 +1571,9 @@ Webhook mode uses the SubjectAccessReview API to determine authorization. ## `KubeletWebhookAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletWebhookAuthentication} - - **Appears in:** -- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication) +- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication) @@ -1872,36 +1581,31 @@ Webhook mode uses the SubjectAccessReview API to determine authorization. FieldDescription - enabled
bool - enabled allows bearer token authentication backed by the -tokenreviews.authentication.k8s.io API. +

enabled allows bearer token authentication backed by the +tokenreviews.authentication.k8s.io API.

+ - - cacheTTL
-meta/v1.Duration +meta/v1.Duration - cacheTTL enables caching of authentication results +

cacheTTL enables caching of authentication results

+ - - ## `KubeletWebhookAuthorization` {#kubelet-config-k8s-io-v1beta1-KubeletWebhookAuthorization} - - **Appears in:** -- [KubeletAuthorization](#kubelet-config-k8s-io-v1beta1-KubeletAuthorization) +- [KubeletAuthorization](#kubelet-config-k8s-io-v1beta1-KubeletAuthorization) @@ -1909,37 +1613,32 @@ tokenreviews.authentication.k8s.io API. FieldDescription - cacheAuthorizedTTL
-meta/v1.Duration +meta/v1.Duration - cacheAuthorizedTTL is the duration to cache 'authorized' responses from the -webhook authorizer. +

cacheAuthorizedTTL is the duration to cache 'authorized' responses from the +webhook authorizer.

+ - - cacheUnauthorizedTTL
-meta/v1.Duration +meta/v1.Duration - cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from -the webhook authorizer. +

cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from +the webhook authorizer.

+ - - ## `KubeletX509Authentication` {#kubelet-config-k8s-io-v1beta1-KubeletX509Authentication} - - **Appears in:** -- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication) +- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication) @@ -1947,68 +1646,57 @@ the webhook authorizer. FieldDescription - clientCAFile
string - clientCAFile is the path to a PEM-encoded certificate bundle. If set, any request +

clientCAFile is the path to a PEM-encoded certificate bundle. If set, any request presenting a client certificate signed by one of the authorities in the bundle is authenticated with a username corresponding to the CommonName, -and groups corresponding to the Organization in the client certificate. +and groups corresponding to the Organization in the client certificate.

+ - - ## `MemoryReservation` {#kubelet-config-k8s-io-v1beta1-MemoryReservation} - - **Appears in:** + - [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) -MemoryReservation specifies the memory reservation of different types for each NUMA node +

MemoryReservation specifies the memory reservation of different types for each NUMA node

+ - + No description provided. - - + No description provided. - -
FieldDescription
numaNode [Required]
int32
- No description provided. -
limits [Required]
core/v1.ResourceList
- No description provided. -
## `MemorySwapConfiguration` {#kubelet-config-k8s-io-v1beta1-MemorySwapConfiguration} - - **Appears in:** -- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) +- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) @@ -2016,18 +1704,16 @@ MemoryReservation specifies the memory reservation of different types for each N FieldDescription - swapBehavior
string - swapBehavior configures swap memory available to container workloads. May be one of -"", "LimitedSwap": workload combined memory and swap usage cannot exceed pod memory limit -"UnlimitedSwap": workloads can use unlimited swap, up to the allocatable limit. +

swapBehavior configures swap memory available to container workloads. May be one of +"", "LimitedSwap": workload combined memory and swap usage cannot exceed pod memory limit +"UnlimitedSwap": workloads can use unlimited swap, up to the allocatable limit.

+ - - @@ -2035,49 +1721,197 @@ MemoryReservation specifies the memory reservation of different types for each N (Alias of `string`) - **Appears in:** + - [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) -ResourceChangeDetectionStrategy denotes a mode in which internal -managers (secret, configmap) are discovering object changes. +

ResourceChangeDetectionStrategy denotes a mode in which internal +managers (secret, configmap) are discovering object changes.

+ ## `ShutdownGracePeriodByPodPriority` {#kubelet-config-k8s-io-v1beta1-ShutdownGracePeriodByPodPriority} - - **Appears in:** + - [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) -ShutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value +

ShutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods based on their associated priority class value

+ - +

priority is the priority value associated with the shutdown grace period

+ - - +

shutdownGracePeriodSeconds is the shutdown grace period in seconds

+ - -
FieldDescription
priority [Required]
int32
- priority is the priority value associated with the shutdown grace period
shutdownGracePeriodSeconds [Required]
int64
- shutdownGracePeriodSeconds is the shutdown grace period in seconds
+ + + +## `FormatOptions` {#FormatOptions} + + +**Appears in:** + +- [LoggingConfiguration](#LoggingConfiguration) + + +

FormatOptions contains options for the different logging formats.

+ + + + + + + + + + + +
FieldDescription
json [Required]
+JSONOptions +
+

[Experimental] JSON contains options for logging format "json".

+
+ +## `JSONOptions` {#JSONOptions} + + +**Appears in:** + +- [FormatOptions](#FormatOptions) + + +

JSONOptions contains options for logging format "json".

+ + + + + + + + + + + + + + +
FieldDescription
splitStream [Required]
+bool +
+

[Experimental] SplitStream redirects error messages to stderr while +info messages go to stdout, with buffering. The default is to write +both to stdout, without buffering.

+
infoBufferSize [Required]
+k8s.io/apimachinery/pkg/api/resource.QuantityValue +
+

[Experimental] InfoBufferSize sets the size of the info stream when +using split streams. The default is zero, which disables buffering.

+
+ +## `LoggingConfiguration` {#LoggingConfiguration} + + +**Appears in:** + +- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) + + +

LoggingConfiguration contains logging options +Refer Logs Options for more information.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
format [Required]
+string +
+

Format Flag specifies the structure of log messages. +default value of format is text

+
flushFrequency [Required]
+time.Duration +
+

Maximum number of seconds between log flushes. Ignored if the +selected logging backend writes log messages without buffering.

+
verbosity [Required]
+uint32 +
+

Verbosity is the threshold that determines which log messages are +logged. Default is zero which logs only the most important +messages. Higher values enable additional messages. Error messages +are always logged.

+
vmodule [Required]
+VModuleConfiguration +
+

VModule overrides the verbosity threshold for individual files. +Only supported for "text" log format.

+
sanitization [Required]
+bool +
+

[Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). +Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`)

+
options [Required]
+FormatOptions +
+

[Experimental] Options holds additional parameters that are specific +to the different logging formats. Only the options for the selected +format get used, but all of them get validated.

+
+ +## `VModuleConfiguration` {#VModuleConfiguration} + +(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`) + +**Appears in:** + +- [LoggingConfiguration](#LoggingConfiguration) + + +

VModuleConfiguration is a collection of individual file names or patterns +and the corresponding verbosity threshold.

+ + + diff --git a/content/en/docs/reference/config-api/kubelet-credentialprovider.v1alpha1.md b/content/en/docs/reference/config-api/kubelet-credentialprovider.v1alpha1.md new file mode 100644 index 0000000000..070fe96d09 --- /dev/null +++ b/content/en/docs/reference/config-api/kubelet-credentialprovider.v1alpha1.md @@ -0,0 +1,192 @@ +--- +title: Kubelet CredentialProvider (v1alpha1) +content_type: tool-reference +package: credentialprovider.kubelet.k8s.io/v1alpha1 +auto_generated: true +--- + + +## Resource Types + + +- [CredentialProviderRequest](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderRequest) +- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse) + + + + +## `CredentialProviderRequest` {#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderRequest} + + + + + +CredentialProviderRequest includes the image that the kubelet requires authentication for. +Kubelet will pass this request object to the plugin via stdin. In general, plugins should +prefer responding with the same apiVersion they were sent. + + + + + + + + + + + + + + + + + +
FieldDescription
apiVersion
string
credentialprovider.kubelet.k8s.io/v1alpha1
kind
string
CredentialProviderRequest
image [Required]
+string +
+ image is the container image that is being pulled as part of the +credential provider plugin request. Plugins may optionally parse the image +to extract any information required to fetch credentials.
+ + + +## `CredentialProviderResponse` {#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse} + + + + + +CredentialProviderResponse holds credentials that the kubelet should use for the specified +image provided in the original request. Kubelet will read the response from the plugin via stdout. +This response should be set to the same apiVersion as CredentialProviderRequest. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
apiVersion
string
credentialprovider.kubelet.k8s.io/v1alpha1
kind
string
CredentialProviderResponse
cacheKeyType [Required]
+PluginCacheKeyType +
+ cacheKeyType indiciates the type of caching key to use based on the image provided +in the request. There are three valid values for the cache key type: Image, Registry, and +Global. If an invalid value is specified, the response will NOT be used by the kubelet.
cacheDuration
+meta/v1.Duration +
+ cacheDuration indicates the duration the provided credentials should be cached for. +The kubelet will use this field to set the in-memory cache duration for credentials +in the AuthConfig. If null, the kubelet will use defaultCacheDuration provided in +CredentialProviderConfig. If set to 0, the kubelet will not cache the provided AuthConfig.
auth
+map[string]k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1.AuthConfig +
+ auth is a map containing authentication information passed into the kubelet. +Each key is a match image string (more on this below). The corresponding authConfig value +should be valid for all images that match against this key. A plugin should set +this field to null if no valid credentials can be returned for the requested image. + +Each key in the map is a pattern which can optionally contain a port and a path. +Globs can be used in the domain, but not in the port or the path. Globs are supported +as subdomains like '∗.k8s.io' or 'k8s.∗.io', and top-level-domains such as 'k8s.∗'. +Matching partial subdomains like 'app∗.k8s.io' is also supported. Each glob can only match +a single subdomain segment, so ∗.io does not match ∗.k8s.io. + +The kubelet will match images against the key when all of the below are true: +- Both contain the same number of domain parts and each part matches. +- The URL path of an imageMatch must be a prefix of the target image URL path. +- If the imageMatch contains a port, then the port must match in the image as well. + +When multiple keys are returned, the kubelet will traverse all keys in reverse order so that: +- longer keys come before shorter keys with the same prefix +- non-wildcard keys come before wildcard keys with the same prefix. + +For any given match, the kubelet will attempt an image pull with the provided credentials, +stopping after the first successfully authenticated pull. + +Example keys: + - 123456789.dkr.ecr.us-east-1.amazonaws.com + - ∗.azurecr.io + - gcr.io + - ∗.∗.registry.io + - registry.io:8080/path
+ + + +## `AuthConfig` {#credentialprovider-kubelet-k8s-io-v1alpha1-AuthConfig} + + + + +**Appears in:** + +- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse) + + +AuthConfig contains authentication information for a container registry. +Only username/password based authentication is supported today, but more authentication +mechanisms may be added in the future. + + + + + + + + + + + + + + + + + + +
FieldDescription
username [Required]
+string +
+ username is the username used for authenticating to the container registry +An empty username is valid.
password [Required]
+string +
+ password is the password used for authenticating to the container registry +An empty password is valid.
+ + + +## `PluginCacheKeyType` {#credentialprovider-kubelet-k8s-io-v1alpha1-PluginCacheKeyType} + +(Alias of `string`) + + +**Appears in:** + +- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse) + + + + + + + diff --git a/content/en/docs/reference/kubectl/cheatsheet.md b/content/en/docs/reference/kubectl/cheatsheet.md index 8a0eb04eb5..25ba4077e7 100644 --- a/content/en/docs/reference/kubectl/cheatsheet.md +++ b/content/en/docs/reference/kubectl/cheatsheet.md @@ -73,6 +73,10 @@ kubectl config set-context gce --user=cluster-admin --namespace=foo \ && kubectl config use-context gce kubectl config unset users.foo # delete user foo + +# short alias to set/show context/namespace (only works for bash and bash-compatible shells, current context to be set before using kn to set namespace) +alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f' +alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f' ``` ## Kubectl apply @@ -212,10 +216,10 @@ kubectl diff -f ./my-manifest.yaml # Produce a period-delimited tree of all keys returned for nodes # Helpful when locating a key within a complex nested JSON structure -kubectl get nodes -o json | jq -c 'path(..)|[.[]|tostring]|join(".")' +kubectl get nodes -o json | jq -c 'paths|join(".")' # Produce a period-delimited tree of all keys returned for pods, etc -kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")' +kubectl get pods -o json | jq -c 'paths|join(".")' # Produce ENV for all pods, assuming you have a default container for the pods, default namespace and the `env` command is supported. # Helpful when running any supported command across all pods, not just `env` diff --git a/content/en/docs/reference/labels-annotations-taints.md b/content/en/docs/reference/labels-annotations-taints.md index cb99bdf592..7b91f36d8e 100644 --- a/content/en/docs/reference/labels-annotations-taints.md +++ b/content/en/docs/reference/labels-annotations-taints.md @@ -80,6 +80,14 @@ Used on: All Objects This annotation is used for describing specific behaviour of given object. +### kubernetes.io/enforce-mountable-secrets {#enforce-mountable-secrets} + +Example: `kubernetes.io/enforce-mountable-secrets: "true"` + +Used on: ServiceAccount + +The value for this annotation must be **true** to take effect. This annotation indicates that pods running as this service account may only reference Secret API objects specified in the service account's `secrets` field. + ### controller.kubernetes.io/pod-deletion-cost {#pod-deletion-cost} Example: `controller.kubernetes.io/pod-deletion-cost=10` diff --git a/content/en/docs/reference/using-api/api-concepts.md b/content/en/docs/reference/using-api/api-concepts.md index 7b04d04e7c..2e4fb85df2 100644 --- a/content/en/docs/reference/using-api/api-concepts.md +++ b/content/en/docs/reference/using-api/api-concepts.md @@ -183,7 +183,7 @@ and starting the **watch** from the `resourceVersion` that was returned. For subscribing to collections, Kubernetes client libraries typically offer some form of standard tool for this **list**-then-**watch** logic. (In the Go client library, -this is called a `Reflector` and is located in the `k8s.io/client-go/cache` package.) +this is called a `Reflector` and is located in the `k8s.io/client-go/tools/cache` package.) ### Watch bookmarks diff --git a/content/en/docs/setup/best-practices/enforcing-pod-security-standards.md b/content/en/docs/setup/best-practices/enforcing-pod-security-standards.md index 9ddb8b4108..59b19c01f5 100644 --- a/content/en/docs/setup/best-practices/enforcing-pod-security-standards.md +++ b/content/en/docs/setup/best-practices/enforcing-pod-security-standards.md @@ -70,6 +70,8 @@ few different ways: Other alternatives for enforcing security profiles are being developed in the Kubernetes ecosystem: +- [Kubewarden](https://github.com/kubewarden). +- [Kyverno](https://kyverno.io/policies/). - [OPA Gatekeeper](https://github.com/open-policy-agent/gatekeeper). The decision to go with a _built-in_ solution (e.g. PodSecurity admission controller) versus a diff --git a/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md b/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md index c004d6f705..32f918ad2e 100644 --- a/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md +++ b/content/en/docs/setup/production-environment/tools/kubeadm/install-kubeadm.md @@ -225,6 +225,10 @@ sudo systemctl enable --now kubelet - You can leave SELinux enabled if you know how to configure it but it may require settings that are not supported by kubeadm. + - If the `baseurl` fails because your Red Hat-based distribution cannot interpret `basearch`, replace `\$basearch` with your computer's architecture. + Type `uname -m` to see that value. + For example, the `baseurl` URL for `x86_64` could be: `https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64`. + {{% /tab %}} {{% tab name="Without a package manager" %}} Install CNI plugins (required for most pod network): diff --git a/content/en/docs/tasks/access-application-cluster/access-cluster.md b/content/en/docs/tasks/access-application-cluster/access-cluster.md index aad72d9dae..c70fde47e6 100644 --- a/content/en/docs/tasks/access-application-cluster/access-cluster.md +++ b/content/en/docs/tasks/access-application-cluster/access-cluster.md @@ -86,12 +86,36 @@ The output is similar to this: ### Without kubectl proxy -Use `kubectl describe secret...` to get the token for the default service account with grep/cut: +Use `kubectl apply` and `kubectl describe secret...` to create a token for the default service account with grep/cut: + +First, create the Secret, requesting a token for the default ServiceAccount: + +```shell +kubectl apply -f - </dev/null; do + echo "waiting for token..." >&2 + sleep 1 +done +``` + +Capture and use the generated token: ```shell APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -d ":" | tr -d " ") -SECRET_NAME=$(kubectl get secrets | grep ^default | cut -f1 -d ' ') -TOKEN=$(kubectl describe secret $SECRET_NAME | grep -E '^token' | cut -f2 -d':' | tr -d " ") +TOKEN=$(kubectl describe secret default-token | grep -E '^token' | cut -f2 -d':' | tr -d " ") curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure ``` @@ -117,8 +141,7 @@ Using `jsonpath`: ```shell APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}') -SECRET_NAME=$(kubectl get serviceaccount default -o jsonpath='{.secrets[0].name}') -TOKEN=$(kubectl get secret $SECRET_NAME -o jsonpath='{.data.token}' | base64 --decode) +TOKEN=$(kubectl get secret default-token -o jsonpath='{.data.token}' | base64 --decode) curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure ``` diff --git a/content/en/docs/tasks/administer-cluster/access-cluster-api.md b/content/en/docs/tasks/administer-cluster/access-cluster-api.md index 827cb50f7c..e8c37aa613 100644 --- a/content/en/docs/tasks/administer-cluster/access-cluster-api.md +++ b/content/en/docs/tasks/administer-cluster/access-cluster-api.md @@ -95,8 +95,25 @@ export CLUSTER_NAME="some_server_name" # Point to the API server referring the cluster name APISERVER=$(kubectl config view -o jsonpath="{.clusters[?(@.name==\"$CLUSTER_NAME\")].cluster.server}") -# Gets the token value -TOKEN=$(kubectl get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='default')].data.token}"|base64 --decode) +# Create a secret to hold a token for the default service account +kubectl apply -f - </dev/null; do + echo "waiting for token..." >&2 + sleep 1 +done + +# Get the token value +TOKEN=$(kubectl get secret default-token -o jsonpath='{.data.token}' | base64 --decode) # Explore the API with TOKEN curl -X GET $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure @@ -119,26 +136,6 @@ The output is similar to this: } ``` -Using `jsonpath` approach: - -```shell -APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}') -TOKEN=$(kubectl get secret $(kubectl get serviceaccount default -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 --decode ) -curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure -{ - "kind": "APIVersions", - "versions": [ - "v1" - ], - "serverAddressByClientCIDRs": [ - { - "clientCIDR": "0.0.0.0/0", - "serverAddress": "10.0.1.149:443" - } - ] -} -``` - The above example uses the `--insecure` flag. This leaves it subject to MITM attacks. When kubectl accesses the cluster it uses a stored root certificate and client certificates to access the server. (These are installed in the diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md index e1693a9ba2..bf5ddd8f5f 100644 --- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md +++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md @@ -361,3 +361,12 @@ We also recommend restarting any components (e.g. `kube-scheduler`, stale data. Note that in practice, the restore takes a bit of time. During the restoration, critical components will lose leader lock and restart themselves. {{< /note >}} + +## Upgrading etcd clusters + + +For more details on etcd upgrade, please refer to the [etcd upgrades](https://etcd.io/docs/latest/upgrades/) documentation. + +{{< note >}} +Before you start an upgrade, please back up your etcd cluster first. +{{< /note >}} diff --git a/content/en/docs/tasks/administer-cluster/cpu-management-policies.md b/content/en/docs/tasks/administer-cluster/cpu-management-policies.md index 076cbe6149..0a9183f276 100644 --- a/content/en/docs/tasks/administer-cluster/cpu-management-policies.md +++ b/content/en/docs/tasks/administer-cluster/cpu-management-policies.md @@ -46,7 +46,8 @@ management policies to determine some placement preferences on the node. ### Configuration The CPU Manager policy is set with the `--cpu-manager-policy` kubelet -option. There are two supported policies: +flag or the `cpuManagerPolicy` field in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/). +There are two supported policies: * [`none`](#none-policy): the default policy. * [`static`](#static-policy): allows pods with certain resource characteristics to be @@ -68,6 +69,27 @@ and `CPUManagerPolicyBetaOptions` feature gates. Diverging from the Kubernetes s feature gates guard groups of options, because it would have been too cumbersome to add a feature gate for each individual option. +### Changing the CPU Manager Policy + +Since the CPU manger policy can only be applied when kubelet spawns new pods, simply changing from +"none" to "static" won't apply to existing pods. So in order to properly change the CPU manager +policy on a node, perform the following steps: + +1. [Drain](/docs/tasks/administer-cluster/safely-drain-node) the node. +2. Stop kubelet. +3. Remove the old CPU manager state file. The path to this file is +`/var/lib/kubelet/cpu_manager_state` by default. This clears the state maintained by the +CPUManager so that the cpu-sets set up by the new policy won’t conflict with it. +4. Edit the kubelet configuration to change the CPU manager policy to the desired value. +5. Start kubelet. + +Repeat this process for every node that needs its CPU manager policy changed. Skipping this +process will result in kubelet crashlooping with the following error: + +``` +could not restore state from checkpoint: configured policy "static" differs from state checkpoint policy "none", please drain this node and delete the CPU manager checkpoint file "/var/lib/kubelet/cpu_manager_state" before restarting Kubelet +``` + ### None policy The `none` policy explicitly enables the existing default CPU diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md index bb472ed647..6c52dea6e1 100644 --- a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md +++ b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md @@ -170,7 +170,7 @@ kubectl apply -f https://k8s.io/examples/admin/resource/cpu-constraints-pod-3.ya ``` The output shows that the Pod does not get created, because it defines an unacceptable container. -That container is not acceptable because it specifies a CPU limit that is lower than the +That container is not acceptable because it specifies a CPU request that is lower than the enforced minimum: ``` diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md index c19bd465af..025277127d 100644 --- a/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md +++ b/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md @@ -177,7 +177,7 @@ Here are two of the restrictions that a resource quota imposes on a namespace: * For every Pod that runs in the namespace, the Pod and each of its containers must have a memory limit. (If you specify a memory limit for every container in a Pod, Kubernetes can infer the Pod-level memory limit by adding up the limits for its containers). -* CPU limits apply a resource reservation on the node where the Pod in question is scheduled. +* Memory limits apply a resource reservation on the node where the Pod in question is scheduled. The total amount of memory reserved for all Pods in the namespace must not exceed a specified limit. * The total amount of memory actually used by all Pods in the namespace must also not exceed a specified limit. diff --git a/content/en/docs/tasks/configmap-secret/managing-secret-using-kubectl.md b/content/en/docs/tasks/configmap-secret/managing-secret-using-kubectl.md index dad86e36df..7e607b9b79 100644 --- a/content/en/docs/tasks/configmap-secret/managing-secret-using-kubectl.md +++ b/content/en/docs/tasks/configmap-secret/managing-secret-using-kubectl.md @@ -130,6 +130,12 @@ The output is similar to: Now you can decode the `password` data: ```shell +# This is an example for documentation purposes. +# If you did things this way, the data 'MWYyZDFlMmU2N2Rm' could be stored in +# your shell history. +# Someone with access to you computer could find that remembered command +# and base-64 decode the secret, perhaps without your knowledge. +# It's usually better to combine the steps, as shown later in the page. echo 'MWYyZDFlMmU2N2Rm' | base64 --decode ``` @@ -139,6 +145,15 @@ The output is similar to: 1f2d1e2e67df ``` +In order to avoid storing a secret encoded value in your shell history, you can +run the following command: + +```shell +kubectl get secret db-user-pass -o jsonpath='{.data.password}' | base64 --decode +``` + +The output shall be similar as above. + ## Clean Up Delete the Secret you created: diff --git a/content/en/docs/tasks/configure-pod-container/configure-gmsa.md b/content/en/docs/tasks/configure-pod-container/configure-gmsa.md index 1bd542ab73..e191de41ef 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-gmsa.md +++ b/content/en/docs/tasks/configure-pod-container/configure-gmsa.md @@ -199,7 +199,7 @@ As Pod specs with GMSA fields populated (as described above) are applied in a cl 1. The container runtime configures each Windows container with the specified GMSA credential spec so that the container can assume the identity of the GMSA in Active Directory and access services in the domain using that identity. -## Authenticating to network shares usinig hostname of FQDN +## Authenticating to network shares using hostname or FQDN If you are experiencing issues connecting to SMB shares from Pods using hostname or FQDN, but are able to access the shares via their IPv4 address then make sure the following registry key is set on the Windows nodes. @@ -225,7 +225,7 @@ kubectl exec -it iis-auth-7776966999-n5nzr powershell.exe `nltest.exe /parentdomain` results in the following error: -```PowerShell +```output Getting parent domain failed: Status = 1722 0x6ba RPC_S_SERVER_UNAVAILABLE ``` @@ -245,7 +245,7 @@ nltest.exe /query Results in the following output: -```PowerShell +```output I_NetLogonControl failed: Status = 1722 0x6ba RPC_S_SERVER_UNAVAILABLE ``` @@ -257,7 +257,7 @@ nltest /sc_reset:domain.example If the command is successful you will see and output similar to this: -```PowerShell +```output Flags: 30 HAS_IP HAS_TIMESERV Trusted DC Name \\dc10.domain.example Trusted DC Connection Status Status = 0 0x0 NERR_Success diff --git a/content/en/docs/tasks/configure-pod-container/configure-service-account.md b/content/en/docs/tasks/configure-pod-container/configure-service-account.md index 408f0bc956..ffb863a19f 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-service-account.md +++ b/content/en/docs/tasks/configure-pod-container/configure-service-account.md @@ -291,7 +291,7 @@ command line arguments to `kube-apiserver`: * `--service-account-issuer` - It can be used as the Identifier of the service account token issuer. You can specify the `--service-account-issuer` argument multiple times, this can be useful to enable a non-disruptive change of the issuer. When this flag is specified multiple times, the first is used to generate tokens and all are used to determine which issuers are accepted. You must be running running Kubernetes v1.22 or later to be able to specify `--service-account-issuer` multiple times. + It can be used as the Identifier of the service account token issuer. You can specify the `--service-account-issuer` argument multiple times, this can be useful to enable a non-disruptive change of the issuer. When this flag is specified multiple times, the first is used to generate tokens and all are used to determine which issuers are accepted. You must be running Kubernetes v1.22 or later to be able to specify `--service-account-issuer` multiple times. * `--service-account-key-file` File containing PEM-encoded x509 RSA or ECDSA private or public keys, used to verify ServiceAccount tokens. The specified file can contain multiple keys, and the flag can be specified multiple times with different files. If specified multiple times, tokens signed by any of the specified keys are considered valid by the Kubernetes API server. diff --git a/content/en/docs/tasks/configure-pod-container/migrate-from-psp.md b/content/en/docs/tasks/configure-pod-container/migrate-from-psp.md index adc8225e23..d8251158b2 100644 --- a/content/en/docs/tasks/configure-pod-container/migrate-from-psp.md +++ b/content/en/docs/tasks/configure-pod-container/migrate-from-psp.md @@ -19,30 +19,323 @@ admission controller. This can be done effectively using a combination of dry-ru - Ensure the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) is enabled. +This page assumes you are already familiar with the basic [Pod Security Admission](/docs/concepts/security/pod-security-admission/) +concepts. + -## Steps +## Overall approach -- **Eliminate mutating PodSecurityPolicies, if your cluster has any set up.** - - Clone all mutating PSPs into a non-mutating version. - - Update all ClusterRoles authorizing use of those mutating PSPs to also authorize use of the - non-mutating variant. - - Watch for Pods using the mutating PSPs and work with code owners to migrate to valid, - non-mutating resources. - - Delete mutating PSPs. -- **Select a compatible policy level for each namespace.** Analyze existing resources in the - namespace to drive this decision. - - Review the requirements of the different [Pod Security Standards](/docs/concepts/security/pod-security-standards). - - Evaluate the difference in privileges that would come from disabling the PSP controller. - - In the event that a PodSecurityPolicy falls between two levels, consider: - - Selecting a _less_ permissive PodSecurity level prioritizes security, and may require adjusting - workloads to fit within the stricter policy. - - Selecting a _more_ permissive PodSecurity level prioritizes avoiding disrupting or - changing workloads, but may allow workload authors in the namespace greater permissions - than desired. -- **Apply the selected profiles in `warn` and `audit` mode.** This will give you an idea of how - your Pods will respond to the new policies, without breaking existing workloads. Iterate on your - [Pods' configuration](/docs/concepts/security/pod-security-admission#configuring-pods) until - they are in compliance with the selected profiles. -- Apply the profiles in `enforce` mode. -- Stop including `PodSecurityPolicy` in the `--enable-admission-plugins` flag. \ No newline at end of file +There are multiple strategies you can take for migrating from PodSecurityPolicy to Pod Security +Admission. The following steps are one possible migration path, with a goal of minimizing both the +risks of a production outage and of a security gap. + + +0. Decide whether Pod Security Admission is the right fit for your use case. +1. Review namespace permissions +2. Simplify & standardize PodSecurityPolicies +3. Update namespaces + 1. Identify an appropriate Pod Security level + 2. Verify the Pod Security level + 3. Enforce the Pod Security level + 4. Bypass PodSecurityPolicy +4. Review namespace creation processes +5. Disable PodSecurityPolicy + +## 0. Decide whether Pod Security Admission is right for you {#is-psa-right-for-you} + +Pod Security Admission was designed to meet the most common security needs out of the box, and to +provide a standard set of security levels across clusters. However, it is less flexible than +PodSecurityPolicy. Notably, the following features are supported by PodSecurityPolicy but not Pod +Security Admission: + +- **Setting default security constraints** - Pod Security Admission is a non-mutating admission + controller, meaning it won't modify pods before validating them. If you were relying on this + aspect of PSP, you will need to either modify your workloads to meet the Pod Security constraints, + or use a [Mutating Admission Webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) + to make those changes. See [Simplify & Standardize PodSecurityPolicies](#simplify-psps) below for more detail. +- **Fine-grained control over policy definition** - Pod Security Admission only supports + [3 standard levels](/docs/concepts/security/pod-security-standards/). + If you require more control over specific constraints, then you will need to use a + [Validating Admission Webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) + to enforce those policies. +- **Sub-namespace policy granularity** - PodSecurityPolicy lets you bind different policies to + different Service Accounts or users, even within a single namespace. This approach has many + pitfalls and is not recommended, but if you require this feature anyway you will + need to use a 3rd party webhook instead. The exception to this is if you only need to completely exempt + specific users or [RuntimeClasses](/docs/concepts/containers/runtime-class/), in which case Pod + Security Admission does expose some + [static configuration for exemptions](/docs/concepts/security/pod-security-admission/#exemptions). + +Even if Pod Security Admission does not meet all of your needs it was designed to be _complementary_ +to other policy enforcement mechanisms, and can provide a useful fallback running alongside other +admission webhooks. + + +## 1. Review namespace permissions {#review-namespace-permissions} + +Pod Security Admission is controlled by [labels on +namespaces](/docs/concepts/security/pod-security-admission/#pod-security-admission-labels-for-namespaces). +This means that anyone who can update (or patch or create) a namespace can also modify the Pod +Security level for that namespace, which could be used to bypass a more restrictive policy. Before +proceeding, ensure that only trusted, privileged users have these namespace permissions. It is not +recommended to grant these powerful permissions to users that shouldn't have elevated permissions, +but if you must you will need to use an +[admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) +to place additional restrictions on setting Pod Security labels on Namespace objects. + +## 2. Simplify & standardize PodSecurityPolicies {#simplify-psps} + +In this section, you will reduce mutating PodSecurityPolicies and remove options that are outside +the scope of the Pod Security Standards. You should make the changes recommended here to an offline +copy of the original PodSecurityPolicy being modified. The cloned PSP should have a different +name that is alphabetically before the original (for example, prepend a `0` to it). Do not create the +new policies in Kubernetes yet - that will be covered in the [Rollout the updated +policies](#psp-update-rollout) section below. + +### 2.a. Eliminate purely mutating fields {#eliminate-mutating-fields} + +If a PodSecurityPolicy is mutating pods, then you could end up with pods that don't meet the Pod +Security level requirements when you finally turn PodSecurityPolicy off. In order to avoid this, you +should eliminate all PSP mutation prior to switching over. Unfortunately PSP does not cleanly +separate mutating & validating fields, so this is not a straightforward migration. + +You can start by eliminating the fields that are purely mutating, and don't have any bearing on the +validating policy. These fields (also listed in the +[Mapping PodSecurityPolicies to Pod Security Standards](/docs/reference/access-authn-authz/psp-to-pod-security-standards/) +reference) are: + +- `.spec.defaultAllowPrivilegeEscalation` +- `.spec.runtimeClass.defaultRuntimeClassName` +- `.metadata.annotations['seccomp.security.alpha.kubernetes.io/defaultProfileName']` +- `.metadata.annotations['apparmor.security.beta.kubernetes.io/defaultProfileName']` +- `.spec.defaultAddCapabilities` - Although technically a mutating & validating field, these should + be merged into `.spec.allowedCapabilities` which performs the same validation without mutation. + +{{< caution >}} +Removing these could result in workloads missing required configuration, and cause problems. See +[Rollout the updated policies](#psp-update-rollout) below for advice on how to roll these changes +out safely. +{{< /caution >}} + +### 2.b. Eliminate options not covered by the Pod Security Standards {#eliminate-non-standard-options} + +There are several fields in PodSecurityPolicy that are not covered by the Pod Security Standards. If +you must enforce these options, you will need to supplement Pod Security Admission with an +[admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/), +which is outside the scope of this guide. + +First, you can remove the purely validating fields that the Pod Security Standards do not cover. +These fields (also listed in the +[Mapping PodSecurityPolicies to Pod Security Standards](/docs/reference/access-authn-authz/psp-to-pod-security-standards/) +reference with "no opinion") are: + +- `.spec.allowedHostPaths` +- `.spec.allowedFlexVolumes` +- `.spec.allowedCSIDrivers` +- `.spec.forbiddenSysctls` +- `.spec.runtimeClass` + +You can also remove the following fields, that are related to POSIX / UNIX group controls. + +{{< caution >}} +If any of these use the `MustRunAs` strategy they may be mutating! Removing these could result in +workloads not setting the required groups, and cause problems. See +[Rollout the updated policies](#psp-update-rollout) below for advice on how to roll these changes +out safely. +{{< /caution >}} + +- `.spec.runAsGroup` +- `.spec.supplementalGroups` +- `.spec.fsGroup` + +The remaining mutating fields are required to properly support the Pod Security Standards, and will +need to be handled on a case-by-case basis later: + +- `.spec.requiredDropCapabilities` - Required to drop `ALL` for the Restricted profile. +- `.spec.seLinux` - (Only mutating with the `MustRunAs` rule) required to enforce the SELinux + requirements of the Baseline & Restricted profiles. +- `.spec.runAsUser` - (Non-mutating with the `RunAsAny` rule) required to enforce `RunAsNonRoot` for + the Restricted profile. +- `.spec.allowPrivilegeEscalation` - (Only mutating if set to `false`) required for the Restricted + profile. + +### 2.c. Rollout the updated PSPs {#psp-update-rollout} + +Next, you can rollout the updated policies to your cluster. You should proceed with caution, as +removing the mutating options may result in workloads missing required configuration. + +For each updated PodSecurityPolicy: + +1. Identify pods running under the original PSP. This can be done using the `kubernetes.io/psp` + annotation. For example, using kubectl: + ```sh + PSP_NAME="original" # Set the name of the PSP you're checking for + kubectl get pods --all-namespaces -o jsonpath="{range .items[?(@.metadata.annotations.kubernetes\.io\/psp=='$PSP_NAME')]}{.metadata.namespace} {.metadata.name}{'\n'}{end}" + ``` +2. Compare these running pods against the original pod spec to determine whether PodSecurityPolicy + has modified the pod. For pods created by a [workload resource](/docs/concepts/workloads/controllers/) + you can compare the pod with the PodTemplate in the controller resource. If any changes are + identified, the original Pod or PodTemplate should be updated with the desired configuration. + The fields to review are: + - `.metadata.annotations['container.apparmor.security.beta.kubernetes.io/*']` (replace * with each container name) + - `.spec.runtimeClassName` + - `.spec.securityContext.fsGroup` + - `.spec.securityContext.seccompProfile` + - `.spec.securityContext.seLinuxOptions` + - `.spec.securityContext.supplementalGroups` + - On containers, under `.spec.containers[*]` and `.spec.initContainers[*]`: + - `.securityContext.allowPrivilegeEscalation` + - `.securityContext.capabilities.add` + - `.securityContext.capabilities.drop` + - `.securityContext.readOnlyRootFilesystem` + - `.securityContext.runAsGroup` + - `.securityContext.runAsNonRoot` + - `.securityContext.runAsUser` + - `.securityContext.seccompProfile` + - `.securityContext.seLinuxOptions` +3. Create the new PodSecurityPolicies. If any Roles or ClusterRoles are granting `use` on all PSPs + this could cause the new PSPs to be used instead of their mutating counter-parts. +4. Update your authorization to grant access to the new PSPs. In RBAC this means updating any Roles + or ClusterRoles that grant the `use` permision on the original PSP to also grant it to the + updated PSP. +5. Verify: after some soak time, rerun the command from step 1 to see if any pods are still using + the original PSPs. Note that pods need to be recreated after the new policies have been rolled + out before they can be fully verified. +6. (optional) Once you have verified that the original PSPs are no longer in use, you can delete + them. + +## 3. Update Namespaces {#update-namespaces} + +The following steps will need to be performed on every namespace in the cluster. Commands referenced +in these steps use the `$NAMESPACE` variable to refer to the namespace being updated. + +### 3.a. Identify an appropriate Pod Security level {#identify-appropriate-level} + +Start reviewing the [Pod Security Standards](/docs/concepts/security/pod-security-standards/) and +familiarizing yourself with the 3 different levels. + +There are several ways to choose a Pod Security level for your namespace: + +1. **By security requirements for the namespace** - If you are familiar with the expected access + level for the namespace, you can choose an appropriate level based on those requirements, similar + to how one might approach this on a new cluster. +2. **By existing PodSecurityPolicies** - Using the + [Mapping PodSecurityPolicies to Pod Security Standards](/docs/reference/access-authn-authz/psp-to-pod-security-standards/) + reference you can map each + PSP to a Pod Security Standard level. If your PSPs aren't based on the Pod Security Standards, you + may need to decide between choosing a level that is at least as permissive as the PSP, and a + level that is at least as restrictive. You can see which PSPs are in use for pods in a given + namespace with this command: + ```sh + kubectl get pods -n $NAMESPACE -o jsonpath="{.items[*].metadata.annotations.kubernetes\.io\/psp}" | tr " " "\n" | sort -u + ``` +3. **By existing pods** - Using the strategies under [Verify the Pod Security level](#verify-pss-level), + you can test out both the Baseline and Restricted levels to see + whether they are sufficiently permissive for existing workloads, and chose the least-privileged + valid level. + +{{< caution >}} +Options 2 & 3 above are based on _existing_ pods, and may miss workloads that aren't currently +running, such as CronJobs, scale-to-zero workloads, or other workloads that haven't rolled out. +{{< /caution >}} + +### 3.b. Verify the Pod Security level {#verify-pss-level} + +Once you have selected a Pod Security level for the namespace (or if you're trying several), it's a +good idea to test it out first (you can skip this step if using the Privileged level). Pod Security +includes several tools to help test and safely roll out profiles. + +First, you can dry-run the policy, which will evaluate pods currently running in the namespace +against the applied policy, without making the new policy take effect: +```sh +# $LEVEL is the level to dry-run, either "baseline" or "restricted". +kubectl label --dry-run=server --overwrite ns $NAMESPACE pod-security.kubernetes.io/enforce=$LEVEL +``` +This command will return a warning for any _existing_ pods that are not valid under the proposed +level. + +The second option is better for catching workloads that are not currently running: audit mode. When +running under audit-mode (as opposed to enforcing), pods that violate the policy level are recorded +in the audit logs, which can be reviewed later after some soak time, but are not forbidden. Warning +mode works similarly, but returns the warning to the user immediately. You can set the audit level +on a namespace with this command: +```sh +kubectl label --overwrite ns $NAMESPACE pod-security.kubernetes.io/audit=$LEVEL +``` + +If either of these approaches yield unexpected violations, you will need to either update the +violating workloads to meet the policy requirements, or relax the namespace Pod Security level. + +### 3.c. Enforce the Pod Security level {#enforce-pod-security-level} + +When you are satisfied that the chosen level can safely be enforced on the namespace, you can update +the namespace to enforce the desired level: + +```sh +kubectl label --overwrite ns $NAMESPACE pod-security.kubernetes.io/enforce=$LEVEL +``` + +### 3.d. Bypass PodSecurityPolicy {#bypass-psp} + +Finally, you can effectively bypass PodSecurityPolicy at the namespace level by binding the fully +{{< example file="policy/privileged-psp.yaml" >}}privileged PSP{{< /example >}} to all service +accounts in the namespace. + +```sh +# The following cluster-scoped commands are only needed once. +kubectl apply -f privileged-psp.yaml +kubectl create clusterrole privileged-psp --verb use --resource podsecuritypolicies.policy --resource-name privileged + +# Per-namespace disable +kubectl create -n $NAMESPACE rolebinding disable-psp --clusterrole privileged-psp --group system:serviceaccounts:$NAMESPACE +``` + +Since the privileged PSP is non-mutating, and the PSP admission controller always +prefers non-mutating PSPs, this will ensure that pods in this namespace are no longer being modified +or restricted by PodSecurityPolicy. + +The advantage to disabling PodSecurityPolicy on a per-namespace basis like this is if a problem +arises you can easily roll the change back by deleting the RoleBinding. Just make sure the +pre-existing PodSecurityPolicies are still in place! + +```sh +# Undo PodSecurityPolicy disablement. +kubectl delete -n $NAMESPACE rolebinding disable-psp +``` + +## 4. Review namespace creation processes {#review-namespace-creation-process} + +Now that existing namespaces have been updated to enforce Pod Security Admission, you should ensure +that your processes and/or policies for creating new namespaces are updated to ensure that an +appropriate Pod Security profile is applied to new namespaces. + +You can also statically configure the Pod Security admission controller to set a default enforce, +audit, and/or warn level for unlabeled namespaces. See +[Configure the Admission Controller](docs/tasks/configure-pod-container/enforce-standards-admission-controller/#configure-the-admission-controller) +for more information. + +## 5. Disable PodSecurityPolicy {#disable-psp} + +Finally, you're ready to disable PodSecurityPolicy. To do so, you will need to modify the admission +configuration of the API server: +[How do I turn off an admission controller?](/docs/reference/access-authn-authz/admission-controllers/#how-do-i-turn-off-an-admission-controller). + +To verify that the PodSecurityPolicy admission controller is no longer enabled, you can manually run +a test by impersonating a user without access to any PodSecurityPolicies (see the +[PodSecurityPolicy example](/docs/concepts/policy/pod-security-policy/#example)), or by verifying in +the API server logs. At startup, the API server outputs log lines listing the loaded admission +controller plugins: + +``` +I0218 00:59:44.903329 13 plugins.go:158] Loaded 16 mutating admission controller(s) successfully in the following order: NamespaceLifecycle,LimitRanger,ServiceAccount,NodeRestriction,TaintNodesByCondition,Priority,DefaultTolerationSeconds,ExtendedResourceToleration,PersistentVolumeLabel,DefaultStorageClass,StorageObjectInUseProtection,RuntimeClass,DefaultIngressClass,MutatingAdmissionWebhook. +I0218 00:59:44.903350 13 plugins.go:161] Loaded 14 validating admission controller(s) successfully in the following order: LimitRanger,ServiceAccount,PodSecurity,Priority,PersistentVolumeClaimResize,RuntimeClass,CertificateApproval,CertificateSigning,CertificateSubjectRestriction,DenyServiceExternalIPs,ValidatingAdmissionWebhook,ResourceQuota. +``` + +You should see `PodSecurity` (in the validating admission controllers), and neither list should +contain `PodSecurityPolicy`. + +Once you are certain the PSP admission controller is disabled (and after sufficient soak time to be +confident you won't need to roll back), you are free to delete your PodSecurityPolicies and any +associated Roles, ClusterRoles, RoleBindings and ClusterRoleBindings (just make sure they don't +grant any other unrelated permissions). diff --git a/content/en/docs/tasks/debug-application-cluster/debug-application-introspection.md b/content/en/docs/tasks/debug-application-cluster/debug-application-introspection.md index 03ba9d2c02..c7720ad1f6 100644 --- a/content/en/docs/tasks/debug-application-cluster/debug-application-introspection.md +++ b/content/en/docs/tasks/debug-application-cluster/debug-application-introspection.md @@ -40,70 +40,77 @@ kubectl get pods ``` ```none -NAME READY STATUS RESTARTS AGE -nginx-deployment-1006230814-6winp 1/1 Running 0 11s -nginx-deployment-1006230814-fmgu3 1/1 Running 0 11s +NAME READY STATUS RESTARTS AGE +nginx-deployment-67d4bdd6f5-cx2nz 1/1 Running 0 13s +nginx-deployment-67d4bdd6f5-w6kd7 1/1 Running 0 13s ``` We can retrieve a lot more information about each of these pods using `kubectl describe pod`. For example: ```shell -kubectl describe pod nginx-deployment-1006230814-6winp +kubectl describe pod nginx-deployment-67d4bdd6f5-w6kd7 ``` ```none -Name: nginx-deployment-1006230814-6winp -Namespace: default -Node: kubernetes-node-wul5/10.240.0.9 -Start Time: Thu, 24 Mar 2016 01:39:49 +0000 -Labels: app=nginx,pod-template-hash=1006230814 -Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"nginx-deployment-1956810328","uid":"14e607e7-8ba1-11e7-b5cb-fa16" ... -Status: Running -IP: 10.244.0.6 -Controllers: ReplicaSet/nginx-deployment-1006230814 +Name: nginx-deployment-67d4bdd6f5-w6kd7 +Namespace: default +Priority: 0 +Node: kube-worker-1/192.168.0.113 +Start Time: Thu, 17 Feb 2022 16:51:01 -0500 +Labels: app=nginx + pod-template-hash=67d4bdd6f5 +Annotations: +Status: Running +IP: 10.88.0.3 +IPs: + IP: 10.88.0.3 + IP: 2001:db8::1 +Controlled By: ReplicaSet/nginx-deployment-67d4bdd6f5 Containers: nginx: - Container ID: docker://90315cc9f513c724e9957a4788d3e625a078de84750f244a40f97ae355eb1149 - Image: nginx - Image ID: docker://6f62f48c4e55d700cf3eb1b5e33fa051802986b77b874cc351cce539e5163707 - Port: 80/TCP - QoS Tier: - cpu: Guaranteed - memory: Guaranteed + Container ID: containerd://5403af59a2b46ee5a23fb0ae4b1e077f7ca5c5fb7af16e1ab21c00e0e616462a + Image: nginx + Image ID: docker.io/library/nginx@sha256:2834dc507516af02784808c5f48b7cbe38b8ed5d0f4837f16e78d00deb7e7767 + Port: 80/TCP + Host Port: 0/TCP + State: Running + Started: Thu, 17 Feb 2022 16:51:05 -0500 + Ready: True + Restart Count: 0 Limits: - cpu: 500m - memory: 128Mi + cpu: 500m + memory: 128Mi Requests: - memory: 128Mi - cpu: 500m - State: Running - Started: Thu, 24 Mar 2016 01:39:51 +0000 - Ready: True - Restart Count: 0 - Environment: + cpu: 500m + memory: 128Mi + Environment: Mounts: - /var/run/secrets/kubernetes.io/serviceaccount from default-token-5kdvl (ro) + /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-bgsgp (ro) Conditions: - Type Status - Initialized True - Ready True - PodScheduled True + Type Status + Initialized True + Ready True + ContainersReady True + PodScheduled True Volumes: - default-token-4bcbi: - Type: Secret (a volume populated by a Secret) - SecretName: default-token-4bcbi - Optional: false -QoS Class: Guaranteed -Node-Selectors: -Tolerations: + kube-api-access-bgsgp: + Type: Projected (a volume that contains injected data from multiple sources) + TokenExpirationSeconds: 3607 + ConfigMapName: kube-root-ca.crt + ConfigMapOptional: + DownwardAPI: true +QoS Class: Guaranteed +Node-Selectors: +Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s + node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: - FirstSeen LastSeen Count From SubobjectPath Type Reason Message - --------- -------- ----- ---- ------------- -------- ------ ------- - 54s 54s 1 {default-scheduler } Normal Scheduled Successfully assigned nginx-deployment-1006230814-6winp to kubernetes-node-wul5 - 54s 54s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Pulling pulling image "nginx" - 53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Pulled Successfully pulled image "nginx" - 53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Created Created container with docker id 90315cc9f513 - 53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Started Started container with docker id 90315cc9f513 + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal Scheduled 34s default-scheduler Successfully assigned default/nginx-deployment-67d4bdd6f5-w6kd7 to kube-worker-1 + Normal Pulling 31s kubelet Pulling image "nginx" + Normal Pulled 30s kubelet Successfully pulled image "nginx" in 1.146417389s + Normal Created 30s kubelet Created container nginx + Normal Started 30s kubelet Started container nginx ``` Here you can see configuration information about the container(s) and Pod (labels, resource requirements, etc.), as well as status information about the container(s) and Pod (state, readiness, restart count, events, etc.). @@ -203,18 +210,22 @@ kubectl get pod nginx-deployment-1006230814-6winp -o yaml apiVersion: v1 kind: Pod metadata: - annotations: - kubernetes.io/created-by: | - {"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"nginx-deployment-1006230814","uid":"4c84c175-f161-11e5-9a78-42010af00005","apiVersion":"extensions","resourceVersion":"133434"}} - creationTimestamp: 2016-03-24T01:39:50Z - generateName: nginx-deployment-1006230814- + creationTimestamp: "2022-02-17T21:51:01Z" + generateName: nginx-deployment-67d4bdd6f5- labels: app: nginx - pod-template-hash: "1006230814" - name: nginx-deployment-1006230814-6winp + pod-template-hash: 67d4bdd6f5 + name: nginx-deployment-67d4bdd6f5-w6kd7 namespace: default - resourceVersion: "133447" - uid: 4c879808-f161-11e5-9a78-42010af00005 + ownerReferences: + - apiVersion: apps/v1 + blockOwnerDeletion: true + controller: true + kind: ReplicaSet + name: nginx-deployment-67d4bdd6f5 + uid: 7d41dfd4-84c0-4be4-88ab-cedbe626ad82 + resourceVersion: "1364" + uid: a6501da1-0447-4262-98eb-c03d4002222e spec: containers: - image: nginx @@ -231,42 +242,88 @@ spec: cpu: 500m memory: 128Mi terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - name: default-token-4bcbi + name: kube-api-access-bgsgp readOnly: true dnsPolicy: ClusterFirst - nodeName: kubernetes-node-wul5 + enableServiceLinks: true + nodeName: kube-worker-1 + preemptionPolicy: PreemptLowerPriority + priority: 0 restartPolicy: Always + schedulerName: default-scheduler securityContext: {} serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + tolerations: + - effect: NoExecute + key: node.kubernetes.io/not-ready + operator: Exists + tolerationSeconds: 300 + - effect: NoExecute + key: node.kubernetes.io/unreachable + operator: Exists + tolerationSeconds: 300 volumes: - - name: default-token-4bcbi - secret: - secretName: default-token-4bcbi + - name: kube-api-access-bgsgp + projected: + defaultMode: 420 + sources: + - serviceAccountToken: + expirationSeconds: 3607 + path: token + - configMap: + items: + - key: ca.crt + path: ca.crt + name: kube-root-ca.crt + - downwardAPI: + items: + - fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + path: namespace status: conditions: - lastProbeTime: null - lastTransitionTime: 2016-03-24T01:39:51Z + lastTransitionTime: "2022-02-17T21:51:01Z" + status: "True" + type: Initialized + - lastProbeTime: null + lastTransitionTime: "2022-02-17T21:51:06Z" status: "True" type: Ready + - lastProbeTime: null + lastTransitionTime: "2022-02-17T21:51:06Z" + status: "True" + type: ContainersReady + - lastProbeTime: null + lastTransitionTime: "2022-02-17T21:51:01Z" + status: "True" + type: PodScheduled containerStatuses: - - containerID: docker://90315cc9f513c724e9957a4788d3e625a078de84750f244a40f97ae355eb1149 - image: nginx - imageID: docker://6f62f48c4e55d700cf3eb1b5e33fa051802986b77b874cc351cce539e5163707 + - containerID: containerd://5403af59a2b46ee5a23fb0ae4b1e077f7ca5c5fb7af16e1ab21c00e0e616462a + image: docker.io/library/nginx:latest + imageID: docker.io/library/nginx@sha256:2834dc507516af02784808c5f48b7cbe38b8ed5d0f4837f16e78d00deb7e7767 lastState: {} name: nginx ready: true restartCount: 0 + started: true state: running: - startedAt: 2016-03-24T01:39:51Z - hostIP: 10.240.0.9 + startedAt: "2022-02-17T21:51:05Z" + hostIP: 192.168.0.113 phase: Running - podIP: 10.244.0.6 - startTime: 2016-03-24T01:39:49Z + podIP: 10.88.0.3 + podIPs: + - ip: 10.88.0.3 + - ip: 2001:db8::1 + qosClass: Guaranteed + startTime: "2022-02-17T21:51:01Z" ``` ## Example: debugging a down/unreachable node @@ -279,116 +336,177 @@ kubectl get nodes ```none NAME STATUS ROLES AGE VERSION -kubernetes-node-861h NotReady 1h v1.13.0 -kubernetes-node-bols Ready 1h v1.13.0 -kubernetes-node-st6x Ready 1h v1.13.0 -kubernetes-node-unaj Ready 1h v1.13.0 +kube-worker-1 NotReady 1h v1.23.3 +kubernetes-node-bols Ready 1h v1.23.3 +kubernetes-node-st6x Ready 1h v1.23.3 +kubernetes-node-unaj Ready 1h v1.23.3 ``` ```shell -kubectl describe node kubernetes-node-861h +kubectl describe node kube-worker-1 ``` ```none -Name: kubernetes-node-861h -Role -Labels: kubernetes.io/arch=amd64 - kubernetes.io/os=linux - kubernetes.io/hostname=kubernetes-node-861h -Annotations: node.alpha.kubernetes.io/ttl=0 - volumes.kubernetes.io/controller-managed-attach-detach=true -Taints: -CreationTimestamp: Mon, 04 Sep 2017 17:13:23 +0800 -Phase: +Name: kube-worker-1 +Roles: +Labels: beta.kubernetes.io/arch=amd64 + beta.kubernetes.io/os=linux + kubernetes.io/arch=amd64 + kubernetes.io/hostname=kube-worker-1 + kubernetes.io/os=linux +Annotations: kubeadm.alpha.kubernetes.io/cri-socket: /run/containerd/containerd.sock + node.alpha.kubernetes.io/ttl: 0 + volumes.kubernetes.io/controller-managed-attach-detach: true +CreationTimestamp: Thu, 17 Feb 2022 16:46:30 -0500 +Taints: node.kubernetes.io/unreachable:NoExecute + node.kubernetes.io/unreachable:NoSchedule +Unschedulable: false +Lease: + HolderIdentity: kube-worker-1 + AcquireTime: + RenewTime: Thu, 17 Feb 2022 17:13:09 -0500 Conditions: - Type Status LastHeartbeatTime LastTransitionTime Reason Message - ---- ------ ----------------- ------------------ ------ ------- - OutOfDisk Unknown Fri, 08 Sep 2017 16:04:28 +0800 Fri, 08 Sep 2017 16:20:58 +0800 NodeStatusUnknown Kubelet stopped posting node status. - MemoryPressure Unknown Fri, 08 Sep 2017 16:04:28 +0800 Fri, 08 Sep 2017 16:20:58 +0800 NodeStatusUnknown Kubelet stopped posting node status. - DiskPressure Unknown Fri, 08 Sep 2017 16:04:28 +0800 Fri, 08 Sep 2017 16:20:58 +0800 NodeStatusUnknown Kubelet stopped posting node status. - Ready Unknown Fri, 08 Sep 2017 16:04:28 +0800 Fri, 08 Sep 2017 16:20:58 +0800 NodeStatusUnknown Kubelet stopped posting node status. -Addresses: 10.240.115.55,104.197.0.26 + Type Status LastHeartbeatTime LastTransitionTime Reason Message + ---- ------ ----------------- ------------------ ------ ------- + NetworkUnavailable False Thu, 17 Feb 2022 17:09:13 -0500 Thu, 17 Feb 2022 17:09:13 -0500 WeaveIsUp Weave pod has set this + MemoryPressure Unknown Thu, 17 Feb 2022 17:12:40 -0500 Thu, 17 Feb 2022 17:13:52 -0500 NodeStatusUnknown Kubelet stopped posting node status. + DiskPressure Unknown Thu, 17 Feb 2022 17:12:40 -0500 Thu, 17 Feb 2022 17:13:52 -0500 NodeStatusUnknown Kubelet stopped posting node status. + PIDPressure Unknown Thu, 17 Feb 2022 17:12:40 -0500 Thu, 17 Feb 2022 17:13:52 -0500 NodeStatusUnknown Kubelet stopped posting node status. + Ready Unknown Thu, 17 Feb 2022 17:12:40 -0500 Thu, 17 Feb 2022 17:13:52 -0500 NodeStatusUnknown Kubelet stopped posting node status. +Addresses: + InternalIP: 192.168.0.113 + Hostname: kube-worker-1 Capacity: - cpu: 2 - hugePages: 0 - memory: 4046788Ki - pods: 110 + cpu: 2 + ephemeral-storage: 15372232Ki + hugepages-2Mi: 0 + memory: 2025188Ki + pods: 110 Allocatable: - cpu: 1500m - hugePages: 0 - memory: 1479263Ki - pods: 110 + cpu: 2 + ephemeral-storage: 14167048988 + hugepages-2Mi: 0 + memory: 1922788Ki + pods: 110 System Info: - Machine ID: 8e025a21a4254e11b028584d9d8b12c4 - System UUID: 349075D1-D169-4F25-9F2A-E886850C47E3 - Boot ID: 5cd18b37-c5bd-4658-94e0-e436d3f110e0 - Kernel Version: 4.4.0-31-generic - OS Image: Debian GNU/Linux 8 (jessie) - Operating System: linux - Architecture: amd64 - Container Runtime Version: docker://1.12.5 - Kubelet Version: v1.6.9+a3d1dfa6f4335 - Kube-Proxy Version: v1.6.9+a3d1dfa6f4335 -ExternalID: 15233045891481496305 -Non-terminated Pods: (9 in total) - Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits - --------- ---- ------------ ---------- --------------- ------------- -...... + Machine ID: 9384e2927f544209b5d7b67474bbf92b + System UUID: aa829ca9-73d7-064d-9019-df07404ad448 + Boot ID: 5a295a03-aaca-4340-af20-1327fa5dab5c + Kernel Version: 5.13.0-28-generic + OS Image: Ubuntu 21.10 + Operating System: linux + Architecture: amd64 + Container Runtime Version: containerd://1.5.9 + Kubelet Version: v1.23.3 + Kube-Proxy Version: v1.23.3 +Non-terminated Pods: (4 in total) + Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits Age + --------- ---- ------------ ---------- --------------- ------------- --- + default nginx-deployment-67d4bdd6f5-cx2nz 500m (25%) 500m (25%) 128Mi (6%) 128Mi (6%) 23m + default nginx-deployment-67d4bdd6f5-w6kd7 500m (25%) 500m (25%) 128Mi (6%) 128Mi (6%) 23m + kube-system kube-proxy-dnxbz 0 (0%) 0 (0%) 0 (0%) 0 (0%) 28m + kube-system weave-net-gjxxp 100m (5%) 0 (0%) 200Mi (10%) 0 (0%) 28m Allocated resources: (Total limits may be over 100 percent, i.e., overcommitted.) - CPU Requests CPU Limits Memory Requests Memory Limits - ------------ ---------- --------------- ------------- - 900m (60%) 2200m (146%) 1009286400 (66%) 5681286400 (375%) -Events: + Resource Requests Limits + -------- -------- ------ + cpu 1100m (55%) 1 (50%) + memory 456Mi (24%) 256Mi (13%) + ephemeral-storage 0 (0%) 0 (0%) + hugepages-2Mi 0 (0%) 0 (0%) +Events: +... ``` ```shell -kubectl get node kubernetes-node-861h -o yaml +kubectl get node kube-worker-1 -o yaml ``` ```yaml apiVersion: v1 kind: Node metadata: - creationTimestamp: 2015-07-10T21:32:29Z + annotations: + kubeadm.alpha.kubernetes.io/cri-socket: /run/containerd/containerd.sock + node.alpha.kubernetes.io/ttl: "0" + volumes.kubernetes.io/controller-managed-attach-detach: "true" + creationTimestamp: "2022-02-17T21:46:30Z" labels: - kubernetes.io/hostname: kubernetes-node-861h - name: kubernetes-node-861h - resourceVersion: "757" - uid: 2a69374e-274b-11e5-a234-42010af0d969 -spec: - externalID: "15233045891481496305" - podCIDR: 10.244.0.0/24 - providerID: gce://striped-torus-760/us-central1-b/kubernetes-node-861h + beta.kubernetes.io/arch: amd64 + beta.kubernetes.io/os: linux + kubernetes.io/arch: amd64 + kubernetes.io/hostname: kube-worker-1 + kubernetes.io/os: linux + name: kube-worker-1 + resourceVersion: "4026" + uid: 98efe7cb-2978-4a0b-842a-1a7bf12c05f8 +spec: {} status: addresses: - - address: 10.240.115.55 + - address: 192.168.0.113 type: InternalIP - - address: 104.197.0.26 - type: ExternalIP + - address: kube-worker-1 + type: Hostname + allocatable: + cpu: "2" + ephemeral-storage: "14167048988" + hugepages-2Mi: "0" + memory: 1922788Ki + pods: "110" capacity: - cpu: "1" - memory: 3800808Ki - pods: "100" + cpu: "2" + ephemeral-storage: 15372232Ki + hugepages-2Mi: "0" + memory: 2025188Ki + pods: "110" conditions: - - lastHeartbeatTime: 2015-07-10T21:34:32Z - lastTransitionTime: 2015-07-10T21:35:15Z - reason: Kubelet stopped posting node status. - status: Unknown + - lastHeartbeatTime: "2022-02-17T22:20:32Z" + lastTransitionTime: "2022-02-17T22:20:32Z" + message: Weave pod has set this + reason: WeaveIsUp + status: "False" + type: NetworkUnavailable + - lastHeartbeatTime: "2022-02-17T22:20:15Z" + lastTransitionTime: "2022-02-17T22:13:25Z" + message: kubelet has sufficient memory available + reason: KubeletHasSufficientMemory + status: "False" + type: MemoryPressure + - lastHeartbeatTime: "2022-02-17T22:20:15Z" + lastTransitionTime: "2022-02-17T22:13:25Z" + message: kubelet has no disk pressure + reason: KubeletHasNoDiskPressure + status: "False" + type: DiskPressure + - lastHeartbeatTime: "2022-02-17T22:20:15Z" + lastTransitionTime: "2022-02-17T22:13:25Z" + message: kubelet has sufficient PID available + reason: KubeletHasSufficientPID + status: "False" + type: PIDPressure + - lastHeartbeatTime: "2022-02-17T22:20:15Z" + lastTransitionTime: "2022-02-17T22:15:15Z" + message: kubelet is posting ready status. AppArmor enabled + reason: KubeletReady + status: "True" type: Ready + daemonEndpoints: + kubeletEndpoint: + Port: 10250 nodeInfo: - bootID: 4e316776-b40d-4f78-a4ea-ab0d73390897 - containerRuntimeVersion: docker://Unknown - kernelVersion: 3.16.0-0.bpo.4-amd64 - kubeProxyVersion: v0.21.1-185-gffc5a86098dc01 - kubeletVersion: v0.21.1-185-gffc5a86098dc01 - machineID: "" - osImage: Debian GNU/Linux 7 (wheezy) - systemUUID: ABE5F6B4-D44B-108B-C46A-24CCE16C8B6E + architecture: amd64 + bootID: 22333234-7a6b-44d4-9ce1-67e31dc7e369 + containerRuntimeVersion: containerd://1.5.9 + kernelVersion: 5.13.0-28-generic + kubeProxyVersion: v1.23.3 + kubeletVersion: v1.23.3 + machineID: 9384e2927f544209b5d7b67474bbf92b + operatingSystem: linux + osImage: Ubuntu 21.10 + systemUUID: aa829ca9-73d7-064d-9019-df07404ad448 ``` - ## {{% heading "whatsnext" %}} diff --git a/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md b/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md index f1ddd96389..9a01b37e19 100644 --- a/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md +++ b/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md @@ -75,6 +75,12 @@ only the termination message: kubectl get pod termination-demo -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.message}}{{end}}" +If you are running a multi-container pod, you can use a Go template to include the container's name. By doing so, you can discover which of the containers is failing: + +```shell +kubectl get pod multi-container-pod -o go-template='{{range .status.containerStatuses}}{{printf "%s:\n%s\n\n" .name .lastState.terminated.message}}{{end}}' +``` + ## Customizing the termination message Kubernetes retrieves termination messages from the termination message file diff --git a/content/en/docs/tasks/debug-application-cluster/troubleshooting.md b/content/en/docs/tasks/debug-application-cluster/troubleshooting.md index 6c6641f382..4bfa053bd5 100644 --- a/content/en/docs/tasks/debug-application-cluster/troubleshooting.md +++ b/content/en/docs/tasks/debug-application-cluster/troubleshooting.md @@ -101,7 +101,7 @@ If filing a bug, please include detailed information about how to reproduce the problem, such as: * Kubernetes version: `kubectl version` -* Cloud provider, OS distro, network configuration, and Docker version +* Cloud provider, OS distro, network configuration, and container runtime version * Steps to reproduce the problem diff --git a/content/en/docs/tasks/kubelet-credential-provider/kubelet-credential-provider.md b/content/en/docs/tasks/kubelet-credential-provider/kubelet-credential-provider.md index b192579970..70e514b473 100644 --- a/content/en/docs/tasks/kubelet-credential-provider/kubelet-credential-provider.md +++ b/content/en/docs/tasks/kubelet-credential-provider/kubelet-credential-provider.md @@ -152,4 +152,5 @@ Some example values of `matchImages` patterns are: * Read the details about `CredentialProviderConfig` in the [kubelet configuration API (v1alpha1) reference](/docs/reference/config-api/kubelet-config.v1alpha1/). +* Read the [kubelet credential provider API reference (v1alpha1)](/docs/reference/config-api/kubelet-credentialprovider.v1alpha1/). diff --git a/content/en/docs/tasks/tools/install-kubectl-linux.md b/content/en/docs/tasks/tools/install-kubectl-linux.md index faf8dbf444..2788e50e19 100644 --- a/content/en/docs/tasks/tools/install-kubectl-linux.md +++ b/content/en/docs/tasks/tools/install-kubectl-linux.md @@ -95,6 +95,11 @@ For example, to download version {{< param "fullversion" >}} on Linux, type: ```bash kubectl version --client ``` + Or use this for detailed view of version: + + ```cmd + kubectl version --client --output=yaml + ``` ### Install using native package management diff --git a/content/en/docs/tasks/tools/install-kubectl-macos.md b/content/en/docs/tasks/tools/install-kubectl-macos.md index 2dc56e5235..fb5ec2a306 100644 --- a/content/en/docs/tasks/tools/install-kubectl-macos.md +++ b/content/en/docs/tasks/tools/install-kubectl-macos.md @@ -111,6 +111,11 @@ The following methods exist for installing kubectl on macOS: ```bash kubectl version --client ``` + Or use this for detailed view of version: + + ```cmd + kubectl version --client --output=yaml + ``` ### Install with Homebrew on macOS diff --git a/content/en/docs/tasks/tools/install-kubectl-windows.md b/content/en/docs/tasks/tools/install-kubectl-windows.md index 707217df2d..f5248ecfe4 100644 --- a/content/en/docs/tasks/tools/install-kubectl-windows.md +++ b/content/en/docs/tasks/tools/install-kubectl-windows.md @@ -66,6 +66,11 @@ The following methods exist for installing kubectl on Windows: ```cmd kubectl version --client ``` + Or use this for detailed view of version: + + ```cmd + kubectl version --client --output=yaml + ``` {{< note >}} [Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/#kubernetes) adds its own version of `kubectl` to `PATH`. diff --git a/content/en/docs/tutorials/stateful-application/zookeeper.md b/content/en/docs/tutorials/stateful-application/zookeeper.md index b235385217..cc2bd853f6 100644 --- a/content/en/docs/tutorials/stateful-application/zookeeper.md +++ b/content/en/docs/tutorials/stateful-application/zookeeper.md @@ -442,7 +442,7 @@ datadir-zk-2 Bound pvc-bee0817e-bcb1-11e6-994f-42010a800002 20Gi R The `volumeMounts` section of the `StatefulSet`'s container `template` mounts the PersistentVolumes in the ZooKeeper servers' data directories. -```shell +```yaml volumeMounts: - name: datadir mountPath: /var/lib/zookeeper @@ -661,6 +661,8 @@ Use the `kubectl rollout history` command to view a history or previous configur kubectl rollout history sts/zk ``` +The output is similar to this: + ``` statefulsets "zk" REVISION @@ -674,6 +676,8 @@ Use the `kubectl rollout undo` command to roll back the modification. kubectl rollout undo sts/zk ``` +The output is similar to this: + ``` statefulset.apps/zk rolled back ``` @@ -742,14 +746,14 @@ that your application's processes are unhealthy and it should restart them. The Pod `template` for the `zk` `StatefulSet` specifies a liveness probe. ```yaml - livenessProbe: - exec: - command: - - sh - - -c - - "zookeeper-ready 2181" - initialDelaySeconds: 15 - timeoutSeconds: 5 + livenessProbe: + exec: + command: + - sh + - -c + - "zookeeper-ready 2181" + initialDelaySeconds: 15 + timeoutSeconds: 5 ``` The probe calls a bash script that uses the ZooKeeper `ruok` four letter @@ -773,7 +777,7 @@ kubectl get pod -w -l app=zk In another window, using the following command to delete the `zookeeper-ready` script from the file system of Pod `zk-0`. ```shell -kubectl exec zk-0 -- rm /usr/bin/zookeeper-ready +kubectl exec zk-0 -- rm /opt/zookeeper/bin/zookeeper-ready ``` When the liveness probe for the ZooKeeper process fails, Kubernetes will @@ -860,16 +864,16 @@ kubernetes-node-2g2d This is because the Pods in the `zk` `StatefulSet` have a `PodAntiAffinity` specified. ```yaml - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: "app" - operator: In - values: - - zk - topologyKey: "kubernetes.io/hostname" +affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: "app" + operator: In + values: + - zk + topologyKey: "kubernetes.io/hostname" ``` The `requiredDuringSchedulingIgnoredDuringExecution` field tells the @@ -926,6 +930,8 @@ In another terminal, use this command to get the nodes that the Pods are current for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo ""; done ``` +The output is similar to this: + ``` kubernetes-node-pb41 kubernetes-node-ixsl @@ -939,6 +945,8 @@ drain the node on which the `zk-0` Pod is scheduled. kubectl drain $(kubectl get pod zk-0 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` +The output is similar to this: + ``` node "kubernetes-node-pb41" cordoned @@ -971,15 +979,19 @@ Keep watching the `StatefulSet`'s Pods in the first terminal and drain the node `zk-1` is scheduled. ```shell -kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data "kubernetes-node-ixsl" cordoned +kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` +The output is similar to this: + ``` +"kubernetes-node-ixsl" cordoned WARNING: Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet: fluentd-cloud-logging-kubernetes-node-ixsl, kube-proxy-kubernetes-node-ixsl; Ignoring DaemonSet-managed pods: node-problem-detector-v0.1-voc74 pod "zk-1" deleted node "kubernetes-node-ixsl" drained ``` + The `zk-1` Pod cannot be scheduled because the `zk` `StatefulSet` contains a `PodAntiAffinity` rule preventing co-location of the Pods, and as only two nodes are schedulable, the Pod will remain in a Pending state. @@ -987,6 +999,8 @@ co-location of the Pods, and as only two nodes are schedulable, the Pod will rem kubectl get pods -w -l app=zk ``` +The output is similar to this: + ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h @@ -1010,13 +1024,15 @@ zk-1 0/1 Pending 0 0s zk-1 0/1 Pending 0 0s ``` -Continue to watch the Pods of the stateful set, and drain the node on which +Continue to watch the Pods of the StatefulSet, and drain the node on which `zk-2` is scheduled. ```shell kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` +The output is similar to this: + ``` node "kubernetes-node-i4c4" cordoned @@ -1060,6 +1076,8 @@ Use [`kubectl uncordon`](/docs/reference/generated/kubectl/kubectl-commands/#unc kubectl uncordon kubernetes-node-pb41 ``` +The output is similar to this: + ``` node "kubernetes-node-pb41" uncordoned ``` @@ -1070,6 +1088,8 @@ node "kubernetes-node-pb41" uncordoned kubectl get pods -w -l app=zk ``` +The output is similar to this: + ``` NAME READY STATUS RESTARTS AGE zk-0 1/1 Running 2 1h @@ -1103,7 +1123,7 @@ Attempt to drain the node on which `zk-2` is scheduled. kubectl drain $(kubectl get pod zk-2 --template {{.spec.nodeName}}) --ignore-daemonsets --force --delete-emptydir-data ``` -The output: +The output is similar to this: ``` node "kubernetes-node-i4c4" already cordoned @@ -1121,6 +1141,8 @@ Uncordon the second node to allow `zk-2` to be rescheduled. kubectl uncordon kubernetes-node-ixsl ``` +The output is similar to this: + ``` node "kubernetes-node-ixsl" uncordoned ``` diff --git a/content/es/docs/tasks/tools/included/install-kubectl-linux.md b/content/es/docs/tasks/tools/included/install-kubectl-linux.md index de189f3ab3..67c802bfb2 100644 --- a/content/es/docs/tasks/tools/included/install-kubectl-linux.md +++ b/content/es/docs/tasks/tools/included/install-kubectl-linux.md @@ -51,7 +51,7 @@ Por ejemplo, para descargar la versión {{< param "fullversion" >}} en Linux, es Valide el binario kubectl con el archivo de comprobación: ```bash - echo "$( + +CRIは、クラスターコンポーネントを再コンパイルすることなく、kubeletがさまざまなコンテナランタイムを使用できるようにするプラグインインターフェイスです。 + +{{< glossary_tooltip text="kubelet" term_id="kubelet" >}}が{{< glossary_tooltip text="Pod" term_id="pod" >}}とそのコンテナを起動できるように、クラスター内の各ノードで動作する{{}}が必要です。 + +kubeletとContainerRuntime間の通信のメインプロトコルです。 + +Kubernetes Container Runtime Interface(CRI)は、[クラスターコンポーネント](/ja/docs/concepts/overview/components/#node-components){{< glossary_tooltip text="kubelet" term_id="kubelet" >}}と{{}}間の通信用のメイン[gRPC](/ja/docs/concepts/overview/components/#node-components)プロトコルを定義します。 + + + +## API {#api} + +{{< feature-state for_k8s_version="v1.23" state="stable" >}} + +kubeletは、gRPCを介してコンテナランタイムに接続するときにクライアントとして機能します。ランタイムおよびイメージサービスエンドポイントは、コンテナランタイムで使用可能である必要があります。コンテナランタイムは、`--image-service-endpoint`および`--container-runtime-endpoint`[コマンドラインフラグ](/ja/docs/reference/command-line-tools-reference/kubelet)を使用して、kubelet内で個別に設定できます。 + +Kubernetes v{{< skew currentVersion >}}の場合、kubeletはCRI `v1`の使用を優先します。 +コンテナランタイムがCRIの`v1`をサポートしていない場合、kubeletはサポートされている古いバージョンのネゴシエーションを試みます。 +kubelet v{{< skew currentVersion >}}はCRI `v1alpha2`をネゴシエートすることもできますが、このバージョンは非推奨と見なされます。 +kubeletがサポートされているCRIバージョンをネゴシエートできない場合、kubeletはあきらめて、ノードとして登録されません。 + +## アップグレード + +Kubernetesをアップグレードする場合、kubeletはコンポーネントの再起動時に最新のCRIバージョンを自動的に選択しようとします。 +それが失敗した場合、フォールバックは上記のように行われます。 +コンテナランタイムがアップグレードされたためにgRPCリダイヤルが必要な場合は、コンテナランタイムも最初に選択されたバージョンをサポートする必要があります。 +そうでない場合、リダイヤルは失敗することが予想されます。これには、kubeletの再起動が必要です。 + +## {{% heading "whatsnext" %}} + +- CRI[プロトコル定義](https://github.com/kubernetes/cri-api/blob/c75ef5b/pkg/apis/runtime/v1/api.proto)の詳細を学ぶ。 diff --git a/content/ja/docs/concepts/cluster-administration/manage-deployment.md b/content/ja/docs/concepts/cluster-administration/manage-deployment.md index d20709e133..d8919c2132 100644 --- a/content/ja/docs/concepts/cluster-administration/manage-deployment.md +++ b/content/ja/docs/concepts/cluster-administration/manage-deployment.md @@ -163,7 +163,7 @@ persistentvolumeclaim/my-pvc created これまで取り上げた例では、リソースに対して最大1つのラベルを適用してきました。リソースのセットを他のセットと区別するために、複数のラベルが必要な状況があります。 -例えば、異なるアプリケーション間では、異なる`app`ラベルを使用したり、[ゲストブックの例](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/)のようなマルチティアーのアプリケーションでは、各ティアーを区別する必要があります。frontendというティアーでは下記のラベルを持ちます。: +例えば、異なるアプリケーション間では、異なる`app`ラベルを使用したり、[ゲストブックの例](https://github.com/kubernetes/examples/tree/master/guestbook/)のようなマルチティアーのアプリケーションでは、各ティアーを区別する必要があります。frontendというティアーでは下記のラベルを持ちます。: ```yaml labels: diff --git a/content/ja/docs/concepts/configuration/overview.md b/content/ja/docs/concepts/configuration/overview.md index 33adb3627c..911d078b80 100644 --- a/content/ja/docs/concepts/configuration/overview.md +++ b/content/ja/docs/concepts/configuration/overview.md @@ -58,7 +58,7 @@ weight: 10 ## ラベルの使用 -- `{ app: myapp, tier: frontend, phase: test, deployment: v3 }`のように、アプリケーションまたはデプロイメントの __セマンティック属性__ を識別する[ラベル](/ja/docs/concepts/overview/working-with-objects/labels/)を定義して使いましょう。これらのラベルを使用して、他のリソースに適切なPodを選択できます。例えば、すべての`tier:frontend`を持つPodを選択するServiceや、`app:myapp`に属するすべての`phase:test`コンポーネント、などです。このアプローチの例を知るには、[ゲストブック](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/)アプリも合わせてご覧ください。 +- `{ app: myapp, tier: frontend, phase: test, deployment: v3 }`のように、アプリケーションまたはデプロイメントの __セマンティック属性__ を識別する[ラベル](/ja/docs/concepts/overview/working-with-objects/labels/)を定義して使いましょう。これらのラベルを使用して、他のリソースに適切なPodを選択できます。例えば、すべての`tier:frontend`を持つPodを選択するServiceや、`app:myapp`に属するすべての`phase:test`コンポーネント、などです。このアプローチの例を知るには、[ゲストブック](https://github.com/kubernetes/examples/tree/master/guestbook/)アプリも合わせてご覧ください。 セレクターからリリース固有のラベルを省略することで、Serviceを複数のDeploymentにまたがるように作成できます。 [Deployment](/ja/docs/concepts/workloads/controllers/deployment/)により、ダウンタイムなしで実行中のサービスを簡単に更新できます。 diff --git a/content/ja/docs/concepts/containers/container-environment.md b/content/ja/docs/concepts/containers/container-environment.md index 261f508ca2..9c40e3c054 100644 --- a/content/ja/docs/concepts/containers/container-environment.md +++ b/content/ja/docs/concepts/containers/container-environment.md @@ -43,7 +43,7 @@ FOO_SERVICE_HOST=<サービスが実行されているホスト> FOO_SERVICE_PORT=<サービスが実行されているポート> ``` -サービスは専用のIPアドレスを持ち、[DNSアドオン](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/)が有効の場合、DNSを介してコンテナで利用可能です。 +サービスは専用のIPアドレスを持ち、[DNSアドオン](http://releases.k8s.io/{{< param "fullversion" >}}/cluster/addons/dns/)が有効の場合、DNSを介してコンテナで利用可能です。 diff --git a/content/ja/docs/concepts/services-networking/connect-applications-service.md b/content/ja/docs/concepts/services-networking/connect-applications-service.md index ca2b422113..86d7cd1b21 100644 --- a/content/ja/docs/concepts/services-networking/connect-applications-service.md +++ b/content/ja/docs/concepts/services-networking/connect-applications-service.md @@ -139,7 +139,7 @@ Service IPは完全に仮想的なもので、ホスト側のネットワーク ## Serviceにアクセスする Kubernetesは、環境変数とDNSの2つの主要なService検索モードをサポートしています。 -前者はそのまま使用でき、後者は[CoreDNSクラスタアドオン](https://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/dns/coredns)を必要とします。 +前者はそのまま使用でき、後者は[CoreDNSクラスタアドオン](https://releases.k8s.io/{{< param "fullversion" >}}/cluster/addons/dns/coredns)を必要とします。 {{< note >}} サービス環境変数が望ましくない場合(予想されるプログラム変数と衝突する可能性がある、処理する変数が多すぎる、DNSのみを使用するなど)、[Pod仕様](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)で`enableServiceLinks`フラグを`false`に設定することでこのモードを無効にできます。 {{< /note >}} @@ -234,7 +234,7 @@ Address 1: 10.0.162.149 * 証明書を使用するように構成されたnginxサーバー * Podが証明書にアクセスできるようにする[Secret](/ja/docs/concepts/configuration/secret/) -これらはすべて[nginx httpsの例](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/staging/https-nginx/)から取得できます。 +これらはすべて[nginx httpsの例](https://github.com/kubernetes/examples/tree/master/staging/https-nginx/)から取得できます。 これにはツールをインストールする必要があります。 これらをインストールしたくない場合は、後で手動の手順に従ってください。つまり: @@ -309,7 +309,7 @@ nginxsecret kubernetes.io/tls 2 1m nginx-secure-appマニフェストに関する注目すべき点: - 同じファイルにDeploymentとServiceの両方が含まれています。 -- [nginxサーバー](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/staging/https-nginx/default.conf)はポート80のHTTPトラフィックと443のHTTPSトラフィックを処理し、nginx Serviceは両方のポートを公開します。 +- [nginxサーバー](https://github.com/kubernetes/examples/tree/master/staging/https-nginx/default.conf)はポート80のHTTPトラフィックと443のHTTPSトラフィックを処理し、nginx Serviceは両方のポートを公開します。 - 各コンテナは`/etc/nginx/ssl`にマウントされたボリュームを介してキーにアクセスできます。 これは、nginxサーバーが起動する*前に*セットアップされます。 diff --git a/content/ja/docs/concepts/services-networking/service.md b/content/ja/docs/concepts/services-networking/service.md index 8481f990aa..7506c3b4b6 100644 --- a/content/ja/docs/concepts/services-networking/service.md +++ b/content/ja/docs/concepts/services-networking/service.md @@ -280,7 +280,7 @@ Kubernetesは、Serviceオブジェクトを見つけ出すために2つの主 PodがNode上で稼働するとき、kubeletはアクティブな各Serviceに対して、環境変数のセットを追加します。 これは[Docker links互換性](https://docs.docker.com/userguide/dockerlinks/)のある変数( -[makeLinkVariables関数](https://releases.k8s.io/{{< param "githubbranch" >}}/pkg/kubelet/envvars/envvars.go#L72)を確認してください)や、より簡単な`{SVCNAME}_SERVICE_HOST`や、`{SVCNAME}_SERVICE_PORT`変数をサポートします。この変数名で使われるService名は大文字に変換され、`-`は`_`に変換されます。 +[makeLinkVariables関数](https://releases.k8s.io/{{< param "fullversion" >}}/pkg/kubelet/envvars/envvars.go#L72)を確認してください)や、より簡単な`{SVCNAME}_SERVICE_HOST`や、`{SVCNAME}_SERVICE_PORT`変数をサポートします。この変数名で使われるService名は大文字に変換され、`-`は`_`に変換されます。 例えば、TCPポート6379番を公開していて、さらにclusterIPが10.0.0.11に割り当てられている`redis-master`というServiceは、下記のような環境変数を生成します。 diff --git a/content/ja/docs/concepts/storage/projected-volumes.md b/content/ja/docs/concepts/storage/projected-volumes.md new file mode 100644 index 0000000000..5bb0a7be11 --- /dev/null +++ b/content/ja/docs/concepts/storage/projected-volumes.md @@ -0,0 +1,91 @@ +--- +title: 投影ボリューム +content_type: concept +weight: 21 # just after persistent volumes +--- + + + +このドキュメントでは、Kubernetesの*投影ボリューム*について説明します。[ボリューム](/docs/concepts/storage/volumes/)に精通していることをお勧めします。 + + + +## 概要 + +ボリュームは、いくつかの既存の`投影`ボリュームソースを同じディレクトリにマップします。 + +現在、次のタイプのボリュームソースを投影できます。 + +* [`secret`](/docs/concepts/storage/volumes/#secret) +* [`downwardAPI`](/docs/concepts/storage/volumes/#downwardapi) +* [`configMap`](/docs/concepts/storage/volumes/#configmap) +* `serviceAccountToken` + +すべてのソースは、Podと同じnamespaceにある必要があります。詳細は[all-in-one volume](https://github.com/kubernetes/design-proposals-archive/blob/main/node/all-in-one-volume.md)デザインドキュメントを参照してください。 + +### secret、downwardAPI、およびconfigMapを使用した構成例 {#example-configuration-secret-downwardapi-configmap} + +{{< codenew file="pods/storage/projected-secret-downwardapi-configmap.yaml" >}} + +### 構成例:デフォルト以外のアクセス許可モードが設定されたsecret {#example-configuration-secrets-nondefault-permission-mode} + +{{< codenew file="pods/storage/projected-secrets-nondefault-permission-mode.yaml" >}} + +各投影ボリュームソースは、specの`sources`にリストされています。パラメーターは、2つの例外を除いてほぼ同じです。 + +* secretについて、ConfigMapの命名と一致するように`secretName`フィールドが`name`に変更されました。 +* `defaultMode`はprojectedレベルでのみ指定でき、各ボリュームソースには指定できません。ただし上に示したように、個々の投影ごとに`mode`を明示的に設定できます。 + +`TokenRequestProjection`機能が有効になっている場合、現在の[サービスアカウントトークン](/ja/docs/reference/access-authn-authz/authentication/#service-account-token)を指定されたパスのPodに挿入できます。例えば: + +{{< codenew file="pods/storage/projected-service-account-token.yaml" >}} + +この例のPodには、挿入されたサービスアカウントトークンを含む投影ボリュームがあります。このトークンはPodのコンテナがKubernetes APIサーバーにアクセスするために使用できます。この`audience`フィールドにはトークンの受信対象者が含まれています。トークンの受信者は、トークンの`audience`フィールドで指定された識別子で自分自身であるかを識別します。そうでない場合はトークンを拒否します。このフィールドはオプションで、デフォルトではAPIサーバーの識別子が指定されます。 + +`expirationSeconds`はサービスアカウントトークンが有効であると予想される期間です。 +デフォルトは1時間で、最低でも10分(600秒)でなければなりません。 +管理者は、APIサーバーに`--service-account-max-token-expiration`オプションを指定することで、その最大値を制限することも可能です。 +`path`フィールドは、投影ボリュームのマウントポイントへの相対パスを指定します。 + + +{{< note >}} +投影ボリュームソースを[`subPath`](/docs/concepts/storage/volumes/#using-subpath)ボリュームマウントとして使用しているコンテナは、それらのボリュームソースの更新を受信しません。 +{{< /note >}} + +## SecurityContextの相互作用 + +サービスアカウントの投影ボリューム拡張でのファイル権限処理の[提案](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/2451-service-account-token-volumes#proposal)により、正しい所有者権限が設定された投影ファイルが導入されました。 + +### Linux + +投影ボリュームがあり、Podの[`SecurityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)に`RunAsUser`が設定されているLinux Podでは、投影されたファイルには、コンテナユーザーの所有権を含む正しい所有権が設定されます。 + +### Windows + +投影ボリュームを持ち、Podの`SecurityContext`で`RunAsUsername`を設定したWindows Podでは、Windowsのユーザーアカウント管理方法により所有権が強制されません。 +Windowsは、ローカルユーザーとグループアカウントをセキュリティアカウントマネージャー(SAM)と呼ばれるデータベースファイルに保存し、管理します。 +各コンテナはSAMデータベースの独自のインスタンスを維持し、コンテナの実行中はホストはそのインスタンスを見ることができません。 +Windowsコンテナは、OSのユーザーモード部分をホストから分離して実行するように設計されており、そのため仮想SAMデータベースを維持することになります。 +そのため、ホスト上で動作するkubeletには、仮想化されたコンテナアカウントのホストファイル所有権を動的に設定する機能がありません。 +ホストマシン上のファイルをコンテナと共有する場合は、`C:\`以外の独自のボリュームマウントに配置することをお勧めします。 + +デフォルトでは、投影ボリュームファイルの例に示されているように、投影されたファイルには次の所有権があります。 +```powershell +PS C:\> Get-Acl C:\var\run\secrets\kubernetes.io\serviceaccount\..2021_08_31_22_22_18.318230061\ca.crt | Format-List + +Path : Microsoft.PowerShell.Core\FileSystem::C:\var\run\secrets\kubernetes.io\serviceaccount\..2021_08_31_22_22_18.318230061\ca.crt +Owner : BUILTIN\Administrators +Group : NT AUTHORITY\SYSTEM +Access : NT AUTHORITY\SYSTEM Allow FullControl + BUILTIN\Administrators Allow FullControl + BUILTIN\Users Allow ReadAndExecute, Synchronize +Audit : +Sddl : O:BAG:SYD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;0x1200a9;;;BU) +``` +これは、`ContainerAdministrator`のようなすべての管理者ユーザーが読み取り、書き込み、および実行アクセス権を持ち、非管理者ユーザーが読み取りおよび実行アクセス権を持つことを意味します。 + +{{< note >}} +一般に、コンテナにホストへのアクセスを許可することは、潜在的なセキュリティの悪用への扉を開く可能性があるため、お勧めできません。 + +Windows Podの`SecurityContext`に`RunAsUser`を指定して作成すると、Podは`ContainerCreating`で永久に固まります。したがって、Windows PodでLinux専用の`RunAsUser`オプションを使用しないことをお勧めします。 +{{< /note >}} diff --git a/content/ja/docs/concepts/workloads/controllers/statefulset.md b/content/ja/docs/concepts/workloads/controllers/statefulset.md index 160f831969..b69e46af52 100644 --- a/content/ja/docs/concepts/workloads/controllers/statefulset.md +++ b/content/ja/docs/concepts/workloads/controllers/statefulset.md @@ -29,7 +29,7 @@ StatefulSetは下記の1つ以上の項目を要求するアプリケーショ ## 制限事項 -* 提供されたPodのストレージは、要求された`storage class`にもとづいて[PersistentVolume Provisioner](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/staging/persistent-volume-provisioning/README.md)によってプロビジョンされるか、管理者によって事前にプロビジョンされなくてはなりません。 +* 提供されたPodのストレージは、要求された`storage class`にもとづいて[PersistentVolume Provisioner](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md)によってプロビジョンされるか、管理者によって事前にプロビジョンされなくてはなりません。 * StatefulSetの削除もしくはスケールダウンをすることにより、StatefulSetに関連したボリュームは削除*されません* 。 これはデータ安全性のためで、関連するStatefulSetのリソース全てを自動的に削除するよりもたいてい有効です。 * StatefulSetは現在、Podのネットワークアイデンティティーに責務をもつために[Headless Service](/ja/docs/concepts/services-networking/service/#headless-service)を要求します。ユーザーはこのServiceを作成する責任があります。 * StatefulSetは、StatefulSetが削除されたときにPodの停止を行うことを保証していません。StatefulSetにおいて、規則的で安全なPodの停止を行う場合、削除のために事前にそのStatefulSetの数を0にスケールダウンさせることが可能です。 diff --git a/content/ja/docs/reference/access-authn-authz/authentication.md b/content/ja/docs/reference/access-authn-authz/authentication.md index 0aee169573..e2bd78316b 100644 --- a/content/ja/docs/reference/access-authn-authz/authentication.md +++ b/content/ja/docs/reference/access-authn-authz/authentication.md @@ -105,7 +105,7 @@ APIサーバーの`--enable-bootstrap-token-auth`フラグで、Bootstrap Token ブートストラップトークンの認証機能やコントローラーについての詳細な説明、`kubeadm`でこれらのトークンを管理する方法については、[ブートストラップトークン](/docs/reference/access-authn-authz/bootstrap-tokens/)を参照してください。 -### サービスアカウントトークン +### サービスアカウントトークン {#service-account-token} サービスアカウントは、自動的に有効化される認証機能で、署名されたBearerトークンを使ってリクエストを検証します。このプラグインは、オプションとして2つのフラグを取ります。 diff --git a/content/ja/docs/setup/best-practices/multiple-zones.md b/content/ja/docs/setup/best-practices/multiple-zones.md index 29370c78b6..4ba0583186 100644 --- a/content/ja/docs/setup/best-practices/multiple-zones.md +++ b/content/ja/docs/setup/best-practices/multiple-zones.md @@ -15,7 +15,7 @@ This page describes how to run a cluster in multiple zones. ## 始めに Kubernetes 1.2より、複数のゾーンにおいて単一のクラスターを運用するサポートが追加されました(GCEでは単純に"ゾーン",AWSは"アベイラビリティゾーン"と呼びますが、ここでは"ゾーン"とします)。 -これは、より範囲の広いCluster Federationの軽量バージョンです(以前は["Ubernetes"](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/design-proposals/multicluster/federation.md)の愛称で言及されていました)。 +これは、より範囲の広いCluster Federationの軽量バージョンです(以前は["Ubernetes"](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/multicluster/federation.md)の愛称で言及されていました)。 完全なCluster Federationでは、異なるリージョンやクラウドプロバイダー(あるいはオンプレミスデータセンター)内の独立したKubernetesクラスターをまとめることが可能になります。しかしながら、多くのユーザーは単に1つのクラウドプロバイダーの複数のゾーンでより可用性の高いKubernetesクラスターを運用したいと考えており、バージョン1.2におけるマルチゾーンサポート(以前は"Ubernetes Lite"の愛称で使用されていました)ではこれが可能になります。 マルチゾーンサポートは故意に限定されています: 1つのKubernetesクラスターは複数のゾーンで運用することができますが、同じリージョン(あるいはクラウドプロバイダー)のみです。現在はGCEとAWSのみが自動的にサポートされています(他のクラウドプロバイダーやベアメタル環境においても、単にノードやボリュームに追加する適切なラベルを用意して同様のサポートを追加することは容易ではありますが)。 diff --git a/content/ja/docs/setup/production-environment/turnkey/aws.md b/content/ja/docs/setup/production-environment/turnkey/aws.md index 03246c1b06..f7ec4bd012 100644 --- a/content/ja/docs/setup/production-environment/turnkey/aws.md +++ b/content/ja/docs/setup/production-environment/turnkey/aws.md @@ -53,9 +53,9 @@ export PATH=/platforms/linux/amd64:$PATH 新しいクラスターを試すには、[簡単なnginxの例](/ja/docs/tasks/run-application/run-stateless-application-deployment/)を参照してください。 -"Guestbook"アプリケーションは、Kubernetesを始めるもう一つのポピュラーな例です: [guestbookの例](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/) +"Guestbook"アプリケーションは、Kubernetesを始めるもう一つのポピュラーな例です: [guestbookの例](https://github.com/kubernetes/examples/tree/master/guestbook/) -より完全なアプリケーションについては、[examplesディレクトリ](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/)を参照してください。 +より完全なアプリケーションについては、[examplesディレクトリ](https://github.com/kubernetes/examples/tree/master/)を参照してください。 ## クラスターのスケーリング diff --git a/content/ja/docs/setup/production-environment/turnkey/gce.md b/content/ja/docs/setup/production-environment/turnkey/gce.md index dcd269446a..39e03efc94 100644 --- a/content/ja/docs/setup/production-environment/turnkey/gce.md +++ b/content/ja/docs/setup/production-environment/turnkey/gce.md @@ -146,7 +146,7 @@ Some of the pods may take a few seconds to start up (during this time they'll sh Then, see [a simple nginx example](/ja/docs/tasks/run-application/run-stateless-application-deployment/) to try out your new cluster. -For more complete applications, please look in the [examples directory](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/). The [guestbook example](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/) is a good "getting started" walkthrough. +For more complete applications, please look in the [examples directory](https://github.com/kubernetes/examples/tree/master/). The [guestbook example](https://github.com/kubernetes/examples/tree/master/guestbook/) is a good "getting started" walkthrough. ## クラスターの解体 diff --git a/content/ja/docs/tasks/administer-cluster/certificates.md b/content/ja/docs/tasks/administer-cluster/certificates.md new file mode 100644 index 0000000000..56a0d4349d --- /dev/null +++ b/content/ja/docs/tasks/administer-cluster/certificates.md @@ -0,0 +1,235 @@ +--- +title: 証明書 +content_type: task +weight: 20 +--- + + + + +クライアント証明書認証を使用する場合、`easyrsa`,`openssl`または`cfssl`を使って手動で証明書を生成することができます。 + + + +### easyrsa + +**easyrsa**はクラスターの証明書を手動で生成することができます。 + +1. パッチが適用されたバージョンのeasyrsa3をダウンロードし、解凍し、初期化します。 + + curl -LO https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz + tar xzf easy-rsa.tar.gz + cd easy-rsa-master/easyrsa3 + ./easyrsa init-pki +1. 新しい認証局(CA)を生成します。 + `req-cn`はCAの新しいルート証明書のコモンネーム(CN)を指定します。 + + ./easyrsa --batch "--req-cn=${MASTER_IP}@`date +%s`" build-ca nopass +1. サーバー証明書と鍵を生成します。 + 引数`--subject-alt-name`は、APIサーバーがアクセス可能なIPとDNS名を設定します。 + `MASTER_CLUSTER_IP`は通常、APIサーバーとコントローラーマネージャーコンポーネントの両方で`--service-cluster-ip-range`引数に指定したサービスCIDRの最初のIPとなります。 + 引数`--days`は、証明書の有効期限が切れるまでの日数を設定するために使用します。 + また、以下のサンプルでは、デフォルトのDNSドメイン名として`cluster.local`を使用することを想定しています。 + + ./easyrsa --subject-alt-name="IP:${MASTER_IP},"\ + "IP:${MASTER_CLUSTER_IP},"\ + "DNS:kubernetes,"\ + "DNS:kubernetes.default,"\ + "DNS:kubernetes.default.svc,"\ + "DNS:kubernetes.default.svc.cluster,"\ + "DNS:kubernetes.default.svc.cluster.local" \ + --days=10000 \ + build-server-full server nopass +1. `pki/ca.crt`,`pki/issued/server.crt`,`pki/private/server.key`を自分のディレクトリにコピーします。 +1. APIサーバーのスタートパラメーターに以下のパラメーターを記入し、追加します。 + + --client-ca-file=/yourdirectory/ca.crt + --tls-cert-file=/yourdirectory/server.crt + --tls-private-key-file=/yourdirectory/server.key + +### openssl + +**openssl**は、クラスター用の証明書を手動で生成することができます。 + +1. 2048bitのca.keyを生成します: + + openssl genrsa -out ca.key 2048 +1. ca.keyに従ってca.crtを生成します(-daysで証明書の有効期限を設定します)。 + + openssl req -x509 -new -nodes -key ca.key -subj "/CN=${MASTER_IP}" -days 10000 -out ca.crt +1. 2048bitでserver.keyを生成します: + + openssl genrsa -out server.key 2048 +1. 証明書署名要求(CSR)を生成するための設定ファイルを作成します。 + 角括弧で囲まれた値(例:``)は必ず実際の値に置き換えてから、ファイル(例:`csr.conf`)に保存してください。`MASTER_CLUSTER_IP`の値は、前のサブセクションで説明したように、APIサーバーのサービスクラスターのIPであることに注意してください。また、以下のサンプルでは、デフォルトのDNSドメイン名として`cluster.local`を使用することを想定しています。 + + [ req ] + default_bits = 2048 + prompt = no + default_md = sha256 + req_extensions = req_ext + distinguished_name = dn + + [ dn ] + C = + ST = + L = + O = + OU = + CN = + + [ req_ext ] + subjectAltName = @alt_names + + [ alt_names ] + DNS.1 = kubernetes + DNS.2 = kubernetes.default + DNS.3 = kubernetes.default.svc + DNS.4 = kubernetes.default.svc.cluster + DNS.5 = kubernetes.default.svc.cluster.local + IP.1 = + IP.2 = + + [ v3_ext ] + authorityKeyIdentifier=keyid,issuer:always + basicConstraints=CA:FALSE + keyUsage=keyEncipherment,dataEncipherment + extendedKeyUsage=serverAuth,clientAuth + subjectAltName=@alt_names +1. 設定ファイルに基づき、証明書署名要求を生成します: + + openssl req -new -key server.key -out server.csr -config csr.conf +1. ca.key、ca.crt、server.csrを使用して、サーバー証明書を生成します: + + openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key \ + -CAcreateserial -out server.crt -days 10000 \ + -extensions v3_ext -extfile csr.conf +1. 証明書署名要求を表示します: + + openssl req -noout -text -in ./server.csr +1. 証明書を表示します: + + openssl x509 -noout -text -in ./server.crt + +最後に、同じパラメーターをAPIサーバーのスタートパラメーターに追加します。 + +### cfssl + +**cfssl**も証明書生を成するためのツールです。 + +1. 以下のように、コマンドラインツールをダウンロードし、解凍して準備してください。 + なお、サンプルのコマンドは、お使いのハードウェア・アーキテクチャやCFSSLのバージョンに合わせる必要があるかもしれません。 + + curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64 -o cfssl + chmod +x cfssl + curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64 -o cfssljson + chmod +x cfssljson + curl -L https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl-certinfo_1.5.0_linux_amd64 -o cfssl-certinfo + chmod +x cfssl-certinfo +1. 成果物を格納するディレクトリを作成し、cfsslを初期化します: + + mkdir cert + cd cert + ../cfssl print-defaults config > config.json + ../cfssl print-defaults csr > csr.json +1. CAファイルを生成するためのJSON設定ファイル、例えば`ca-config.json`を作成します: + + { + "signing": { + "default": { + "expiry": "8760h" + }, + "profiles": { + "kubernetes": { + "usages": [ + "signing", + "key encipherment", + "server auth", + "client auth" + ], + "expiry": "8760h" + } + } + } + } +1. CA証明書署名要求(CSR)用のJSON設定ファイル(例:`ca-csr.json`)を作成します。 + 角括弧で囲まれた値は、必ず使用したい実際の値に置き換えてください。 + + { + "CN": "kubernetes", + "key": { + "algo": "rsa", + "size": 2048 + }, + "names":[{ + "C": "", + "ST": "", + "L": "", + "O": "", + "OU": "" + }] + } +1. CAキー(`ca-key.pem`)と証明書(`ca.pem`)を生成します: + + ../cfssl gencert -initca ca-csr.json | ../cfssljson -bare ca +1. APIサーバーの鍵と証明書を生成するためのJSON設定ファイル、例えば`server-csr.json`を作成します。 + 角括弧内の値は、必ず使用したい実際の値に置き換えてください。 + `MASTER_CLUSTER_IP`は、前のサブセクションで説明したように、APIサーバーのサービスクラスターのIPです。 + また、以下のサンプルでは、デフォルトのDNSドメイン名として`cluster.local`を使用することを想定しています。 + + { + "CN": "kubernetes", + "hosts": [ + "127.0.0.1", + "", + "", + "kubernetes", + "kubernetes.default", + "kubernetes.default.svc", + "kubernetes.default.svc.cluster", + "kubernetes.default.svc.cluster.local" + ], + "key": { + "algo": "rsa", + "size": 2048 + }, + "names": [{ + "C": "", + "ST": "", + "L": "", + "O": "", + "OU": "" + }] + } +1. APIサーバーの鍵と証明書を生成します。 + デフォルトでは、それぞれ`server-key.pem`と`server.pem`というファイルに保存されます: + + ../cfssl gencert -ca=ca.pem -ca-key=ca-key.pem \ + --config=ca-config.json -profile=kubernetes \ + server-csr.json | ../cfssljson -bare server + + +## 自己署名入りCA証明書を配布する + +クライアントノードが自己署名入りCA証明書を有効なものとして認識できない場合があります。 + +非プロダクション環境、または会社のファイアウォールの内側での開発環境であれば、自己署名入りCA証明書をすべてのクライアントに配布し、有効な証明書のローカルリストを更新することができます。 + +各クライアントで、次の操作を実行します: + +```bash +sudo cp ca.crt /usr/local/share/ca-certificates/kubernetes.crt +sudo update-ca-certificates +``` + +``` +Updating certificates in /etc/ssl/certs... +1 added, 0 removed; done. +Running hooks in /etc/ca-certificates/update.d.... +done. +``` + +## 証明書API + +認証に使用するx509証明書のプロビジョニングには`certificates.k8s.io` APIを使用することができます。[ここ](/docs/tasks/tls/managing-tls-in-a-cluster)に記述されています。 + diff --git a/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md index 68929ec5bb..08e48b9fa7 100644 --- a/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md +++ b/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md @@ -131,7 +131,7 @@ kubeletはコンテナが問題なく動いていると判断します。 200以上400未満のコードは成功とみなされ、その他のコードは失敗とみなされます。 -[server.go](https://github.com/kubernetes/kubernetes/blob/{{< param "githubbranch" >}}/test/images/agnhost/liveness/server.go) +[server.go](https://github.com/kubernetes/kubernetes/blob/master/test/images/agnhost/liveness/server.go) にてサーバーのソースコードを確認することができます。 コンテナが生きている初めの10秒間は、`/healthz`ハンドラーが200ステータスを返します。 diff --git a/content/ja/docs/tasks/configure-pod-container/configure-projected-volume-storage.md b/content/ja/docs/tasks/configure-pod-container/configure-projected-volume-storage.md index c67c826c4d..4c70662d42 100644 --- a/content/ja/docs/tasks/configure-pod-container/configure-projected-volume-storage.md +++ b/content/ja/docs/tasks/configure-pod-container/configure-projected-volume-storage.md @@ -79,5 +79,5 @@ kubectl delete secret user pass ## {{% heading "whatsnext" %}} * [`projected`](/docs/concepts/storage/volumes/#projected)ボリュームについてさらに学ぶ -* [all-in-oneボリューム](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/design-proposals/node/all-in-one-volume.md)のデザインドキュメントを読む +* [all-in-oneボリューム](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/all-in-one-volume.md)のデザインドキュメントを読む diff --git a/content/ja/docs/tutorials/stateful-application/basic-stateful-set.md b/content/ja/docs/tutorials/stateful-application/basic-stateful-set.md index 6b9d8da5a8..093962f2ce 100644 --- a/content/ja/docs/tutorials/stateful-application/basic-stateful-set.md +++ b/content/ja/docs/tutorials/stateful-application/basic-stateful-set.md @@ -15,7 +15,7 @@ weight: 10 * [Cluster DNS](/ja/docs/concepts/services-networking/dns-pod-service/) * [Headless Service](/ja/docs/concepts/services-networking/service/#headless-services) * [PersistentVolume](/ja/docs/concepts/storage/persistent-volumes/) -* [PersistentVolumeのプロビジョニング](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/staging/persistent-volume-provisioning/) +* [PersistentVolumeのプロビジョニング](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/) * [StatefulSet](/ja/docs/concepts/workloads/controllers/statefulset/) * [kubectl](/docs/reference/kubectl/kubectl/)コマンドラインツール diff --git a/content/ja/examples/application/job/cronjob.yaml b/content/ja/examples/application/job/cronjob.yaml index 34ab2a3f06..5691950410 100644 --- a/content/ja/examples/application/job/cronjob.yaml +++ b/content/ja/examples/application/job/cronjob.yaml @@ -3,7 +3,7 @@ kind: CronJob metadata: name: hello spec: - schedule: "*/1 * * * *" + schedule: "* * * * *" jobTemplate: spec: template: diff --git a/content/ja/examples/pods/storage/projected-secret-downwardapi-configmap.yaml b/content/ja/examples/pods/storage/projected-secret-downwardapi-configmap.yaml new file mode 100644 index 0000000000..270db99dcd --- /dev/null +++ b/content/ja/examples/pods/storage/projected-secret-downwardapi-configmap.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Pod +metadata: + name: volume-test +spec: + containers: + - name: container-test + image: busybox + volumeMounts: + - name: all-in-one + mountPath: "/projected-volume" + readOnly: true + volumes: + - name: all-in-one + projected: + sources: + - secret: + name: mysecret + items: + - key: username + path: my-group/my-username + - downwardAPI: + items: + - path: "labels" + fieldRef: + fieldPath: metadata.labels + - path: "cpu_limit" + resourceFieldRef: + containerName: container-test + resource: limits.cpu + - configMap: + name: myconfigmap + items: + - key: config + path: my-group/my-config diff --git a/content/ja/examples/pods/storage/projected-secrets-nondefault-permission-mode.yaml b/content/ja/examples/pods/storage/projected-secrets-nondefault-permission-mode.yaml new file mode 100644 index 0000000000..f69b43161e --- /dev/null +++ b/content/ja/examples/pods/storage/projected-secrets-nondefault-permission-mode.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Pod +metadata: + name: volume-test +spec: + containers: + - name: container-test + image: busybox + volumeMounts: + - name: all-in-one + mountPath: "/projected-volume" + readOnly: true + volumes: + - name: all-in-one + projected: + sources: + - secret: + name: mysecret + items: + - key: username + path: my-group/my-username + - secret: + name: mysecret2 + items: + - key: password + path: my-group/my-password + mode: 511 diff --git a/content/ja/examples/pods/storage/projected-service-account-token.yaml b/content/ja/examples/pods/storage/projected-service-account-token.yaml new file mode 100644 index 0000000000..3ad06b5dc7 --- /dev/null +++ b/content/ja/examples/pods/storage/projected-service-account-token.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Pod +metadata: + name: sa-token-test +spec: + containers: + - name: container-test + image: busybox + volumeMounts: + - name: token-vol + mountPath: "/service-account" + readOnly: true + serviceAccountName: default + volumes: + - name: token-vol + projected: + sources: + - serviceAccountToken: + audience: api + expirationSeconds: 3600 + path: token diff --git a/content/pt-br/docs/concepts/cluster-administration/system-metrics.md b/content/pt-br/docs/concepts/cluster-administration/system-metrics.md new file mode 100644 index 0000000000..701c157651 --- /dev/null +++ b/content/pt-br/docs/concepts/cluster-administration/system-metrics.md @@ -0,0 +1,169 @@ +--- +title: Métricas para componentes do sistema Kubernetes +content_type: concept +weight: 60 +--- + + + +Métricas dos componentes do sistema podem dar uma visão melhor do que acontece internamente. Métricas são particularmente úteis para construir _dashboards_ e alertas. + +Componentes do Kubernetes emitem métricas no [formato Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/). Esse formato é um texto simples estruturado, projetado para que pessoas e máquinas possam lê-lo. + + + +## Métricas no Kubernetes + +Na maioria dos casos, as métricas estão disponíveis no _endpoint_ `/metrics` do servidor HTTP. Para componentes que não expõem o _endpoint_ por padrão, ele pode ser ativado usando a _flag_ `--bind-address`. + +Exemplos desses componentes: + +- {{< glossary_tooltip term_id="kube-controller-manager" text="kube-controller-manager" >}} +- {{< glossary_tooltip term_id="kube-proxy" text="kube-proxy" >}} +- {{< glossary_tooltip term_id="kube-apiserver" text="kube-apiserver" >}} +- {{< glossary_tooltip term_id="kube-scheduler" text="kube-scheduler" >}} +- {{< glossary_tooltip term_id="kubelet" text="kubelet" >}} + +Em um ambiente de produção, você pode querer configurar o [Servidor Prometheus](https://prometheus.io/) ou algum outro coletor de métricas e disponibilizá-las em algum tipo de banco de dados temporais. + +Observe que o {{< glossary_tooltip term_id="kubelet" text="kubelet" >}} também expõe métricas nos _endpoints_ `/metrics/cadvisor`, `/metrics/resource` e `/metrics/probes`. Essas métricas não possuem o mesmo ciclo de vida. + +Se o seu _cluster_ usa {{< glossary_tooltip term_id="rbac" text="RBAC" >}}, ler as métricas requer autorização por meio de um usuário, grupo ou _ServiceAccount_ com um _ClusterRole_ que conceda o acesso ao `/metrics`. + +Por exemplo: + +```yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus +rules: + - nonResourceURLs: + - "/metrics" + verbs: + - get +``` + +## Ciclo de vida da métrica + +Métrica alfa → Métrica estável → Métrica ultrapassada → Métrica oculta → Métrica excluída + +A métrica alfa não tem garantias de estabilidade. Essas métricas podem ser modificadas ou deletadas a qualquer momento. + +Métricas estáveis possuem a garantia de que não serão alteradas. Isso significa: + +- Uma métrica estável sem uma assinatura ultrapassada não será deletada ou renomeada +- O tipo de uma métrica estável não será modificado + +As métricas ultrapassadas estão programadas para exclusão, mas ainda estão disponíveis para uso. +Essas métricas incluem uma anotação sobre a versão em que se tornarão ultrapassadas. + +Por exemplo: + +- Antes de se tornar ultrapassado + + ``` + # HELP some_counter isso conta coisas + # TYPE some_counter contador + some_counter 0 + ``` + +- Depois de se tornar ultrapassado + + ``` + # HELP some_counter (obsoleto desde 1.15.0) isso conta coisas + # TYPE some_counter contador + some_counter 0 + ``` + +Métricas ocultas não são mais publicadas para extração, mas ainda estão disponíveis para uso. Para usar uma métrica oculta, por favor consulte a seção [mostrar métricas ocultas](#mostrar-métricas-ocultas). + +Métricas excluídas não estão mais disponíveis e não podem mais ser usadas. + +## Mostrar métricas ocultas + +Como descrito anteriormente, administradores podem habilitar métricas ocultas por meio de uma _flag_ de linha de comando em um binário específico. Isso pode ser usado como uma saída de emergência para os administradores caso percam a migração das métricas ultrapassadas na última versão. + +A _flag_ `show-hidden-metrics-for-version` usa uma versão para a qual você deseja mostrar métricas ultrapassadas nessa versão. A versão é expressada como x.y, onde x é a versão principal e y a versão secundária. A versão de _patch_ não é necessária mesmo que uma métrica possa ser descontinuada em uma versão de _patch_, o motivo é que a política de descontinuação de métricas é executada na versão secundária. + +A _flag_ só pode usar a versão secundária anterior como seu valor. Todas as métricas ocultas no anterior serão emitidas se os administradores definirem a versão anterior como `show-hidden-metrics-for-version`. A versão muito antiga não é permitida porque viola a política de métricas ultrapassadas. + +Utilize a métrica `A` como exemplo, assumindo que `A` está obsoleto em 1.n. De acordo com a política de métricas ultrapassadas, podemos chegar à seguinte conclusão: + +- Na versão `1.n`, a métrica está ultrapassada, e pode ser emitida por padrão. +- Na versão `1.n+1`, a métrica está oculta por padrão e pode ser emitida via linha de comando `show-hidden-metrics-for-version=1.n`. +- Na versão `1.n+2`, a métrica deve ser removida do código fonte. Não há mais _escape hatch_. + +Se você está atualizando da versão `1.12` para `1.13`, mas ainda depende da métrica `A` ultrapassada em `1.12`, você deve definir métricas ocultas via linha de comando: `--show-hidden-metrics=1.12` e lembre-se de remover essa dependência de métrica antes de atualizar para `1.14`. + +## Desativar métricas do _accelerator_ + +O kubelet coleta métricas do _accelerator_ por meio do cAdvisor. Para coletar essas métricas, para _accelerator_ como as GPUs NVIDIA, o kubelet mantinha uma alça aberta no driver. Isso significava que, para realizar alterações na infraestrutura (por exemplo, atualizar o _driver_), um administrador do _cluster_ precisa interromper o agente kubelet. + +A responsabilidade de colear métricas do _accelerator_ agora pertence ao fornecedor, e não ao kubelet. Os fornecedores devem providenciar um contêiner que colete métricas e as exponha ao serviço de métricas (por exemplo, Prometheus). + +O [`DisableAcceleratorUsageMetrics` _feature gate_](/docs/reference/command-line-tools-reference/feature-gates/) desabilita as métricas coletadas pelo kubelet, com uma [_timeline_ para habilitar esse recurso por padrão](https://github.com/kubernetes/enhancements/tree/411e51027db842355bd489691af897afc1a41a5e/keps/sig-node/1867-disable-accelerator-usage-metrics#graduation-criteria). + +## Métricas de componentes + +### Métricas do _kube-controller-manager_ + +As métricas do _controller manager_ fornecem informações importantes sobre o desempenho e a integridade do _controller manager_. +Essas métricas incluem métricas comuns do agente de execução da linguagem Go, tais como a quantidade de _go_routine_ e métricas específicas do _controller_, como latência de requisições etcd ou latência da _API_ dos provedores de serviços de nuvem (AWS, GCE, OpenStack), que podem ser usadas para medir a integridade de um _cluster_. + +A partir do Kubernetes 1.7, métricas detalhadas de provedores de serviços de nuvem estão disponíveis para operações de armazenamento para o GCE, AWS, Vsphere e OpenStack. +Essas métricas podem ser usadas para monitorar a integridade das operações de volumes persistentes. + +Por exemplo, para o GCE as seguintes métricas são chamadas: + +``` +cloudprovider_gce_api_request_duration_seconds { request = "instance_list"} +cloudprovider_gce_api_request_duration_seconds { request = "disk_insert"} +cloudprovider_gce_api_request_duration_seconds { request = "disk_delete"} +cloudprovider_gce_api_request_duration_seconds { request = "attach_disk"} +cloudprovider_gce_api_request_duration_seconds { request = "detach_disk"} +cloudprovider_gce_api_request_duration_seconds { request = "list_disk"} +``` + +### Métricas do _kube-scheduler_ + +{{< feature-state for_k8s_version="v1.21" state="beta" >}} + +O _scheduler_ expõe métricas opcionais que relatam os recursos solicitados e os limites desejados de todos os _pods_ em execução. Essas métricas podem ser usadas para criar _dashboards_ de planejamento de capacidade, avaliar os limites de agendamentos atuais ou históricos, identificar rapidamente cargas de trabalho que não podem ser agendadas devido à falta de recursos e comparar o uso atual com a solicitação do _pod_. + +O _kube-scheduler_ identifica as requisições de [recursos e limites](/docs/concepts/configuration/manage-resources-containers/) configurado para cada _Pod_; quando uma requisição ou limite é diferente de zero o _kube-scheduler_ relata uma _timeseries_ de métricas. Essa _timeseries_ é etiquetada por: + +- _namespace_ +- nome do _pod_ +- o nó onde o _pod_ está programado ou uma _string_ vazia caso ainda não esteja programado +- prioridade +- o _scheduler_ atribuído para esse _pod_ +- o nome do recurso (por exemplo, `cpu`) +- a unidade do recurso, se conhecida (por exemplo, `cores`) + +Uma vez que o _pod_ alcança um estado de conclusão (sua `restartPolicy` está como `Never` ou `onFailure` e está na fase de `Succeeded` ou `Failed`, ou foi deletado e todos os contêineres tem um estado de terminado), a série não é mais relatada já que o _scheduler_ agora está livre para agendar a execução de outros _pods_. As duas métricas são chamadas de `kube_pod_resource_request` e `kube_pod_resource_limit`. + +As métricas são expostas no _endpoint_ HTTP `/metrics/resources` e requerem a mesma autorização que o _endpoint_ `/metrics` no _scheduler_. Você deve usar a _flag_ `--show-hidden-metrics-for-version=1.20` para expor essas métricas de estabilidade alfa. + +## Desativando métricas + +Você pode desativar explicitamente as métricas via linha de comando utilizando a _flag_ `--disabled-metrics`. Isso pode ser desejado se, por exemplo, uma métrica estiver causando um problema de desempenho. A entrada é uma lista de métricas desabilitadas (ou seja, `--disabled-metrics=metric1,metric2`). + +## Aplicação de cardinalidade de métrica + +As métricas com dimensões sem limites podem causar problemas de memória nos componentes que elas instrumentam. Para limitar a utilização de recursos você pode usar a opção de linha de comando `--allow-label-value` para dinamicamente configurar uma lista de permissões de valores de _label_ para uma métrica. + +No estágio alfa, a _flag_ pode receber apenas uma série de mapeamentos como lista de permissões de _labels_ para uma métrica. +Cada mapeamento tem o formato `,=` onde `` é uma lista separada por vírgulas de nomes aceitáveis para a _label_. + +O formato geral se parece com: +`--allow-label-value ,=', ...', ,=', ...', ...`. + +Por exemplo: +`--allow-label-value number_count_metric,odd_number='1,3,5', number_count_metric,even_number='2,4,6', date_gauge_metric,weekend='Saturday,Sunday'` + +## {{% heading "whatsnext" %}} + +- Leia sobre o [formato de texto do Prometheus](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) para métricas +- Veja a lista de [métricas estáveis ​​do Kubernetes](https://github.com/kubernetes/kubernetes/blob/master/test/instrumentation/testdata/stable-metrics-list.yaml) +- Leia sobre a [Política de suspensão de uso do Kubernetes](/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior) diff --git a/content/pt-br/examples/application/job/cronjob.yaml b/content/pt-br/examples/application/job/cronjob.yaml index da905a9048..9f06ca7bd6 100644 --- a/content/pt-br/examples/application/job/cronjob.yaml +++ b/content/pt-br/examples/application/job/cronjob.yaml @@ -3,7 +3,7 @@ kind: CronJob metadata: name: hello spec: - schedule: "*/1 * * * *" + schedule: "* * * * *" jobTemplate: spec: template: diff --git a/content/zh/docs/concepts/architecture/garbage-collection.md b/content/zh/docs/concepts/architecture/garbage-collection.md new file mode 100644 index 0000000000..a9b6942f52 --- /dev/null +++ b/content/zh/docs/concepts/architecture/garbage-collection.md @@ -0,0 +1,361 @@ +--- +title: 垃圾收集 +content_type: concept +weight: 50 +--- + + + + + + +{{}} +垃圾收集允许系统清理如下资源: + + +* [失败的 Pod](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-garbage-collection) +* [已完成的 Job](/zh/docs/concepts/workloads/controllers/ttlafterfinished/) +* [不再存在属主引用的对象](#owners-dependents) +* [未使用的容器和容器镜像](#containers-images) +* [动态制备的、StorageClass 回收策略为 Delete 的 PV 卷](/zh/docs/concepts/storage/persistent-volumes/#delete) +* [阻滞或者过期的 CertificateSigningRequest (CSRs)](/zh/docs/reference/access-authn-authz/certificate-signing-requests/#request-signing-process) +* 在以下情形中删除了的{{}}对象: + * 当集群使用[云控制器管理器](/zh/docs/concepts/architecture/cloud-controller/)运行于云端时; + * 当集群使用类似于云控制器管理器的插件运行在本地环境中时。 +* [节点租约对象](/zh/docs/concepts/architecture/nodes/#heartbeats) + + +## 属主与依赖 {#owners-dependents} + +Kubernetes 中很多对象通过[*属主引用*](/zh/docs/concepts/overview/working-with-objects/owners-dependents/) +链接到彼此。属主引用(Owner Reference)可以告诉控制面哪些对象依赖于其他对象。 +Kubernetes 使用属主引用来为控制面以及其他 API 客户端在删除某对象时提供一个 +清理关联资源的机会。在大多数场合,Kubernetes 都是自动管理属主引用的。 + + +属主关系与某些资源所使用的的[标签和选择算符](/zh/docs/concepts/overview/working-with-objects/labels/) +不同。例如,考虑一个创建 `EndpointSlice` 对象的 {{}} +对象。Service 对象使用*标签*来允许控制面确定哪些 `EndpointSlice` 对象被该 +Service 使用。除了标签,每个被 Service 托管的 `EndpointSlice` 对象还有一个属主引用属性。 +属主引用可以帮助 Kubernetes 中的不同组件避免干预并非由它们控制的对象。 + +{{< note >}} + +根据设计,系统不允许出现跨名字空间的属主引用。名字空间作用域的依赖对象可以指定集群作用域或者名字空间作用域的属主。 +名字空间作用域的属主**必须**存在于依赖对象所在的同一名字空间。 +如果属主位于不同名字空间,则属主引用被视为不存在,而当检查发现所有属主都已不存在时, +依赖对象会被删除。 + + +集群作用域的依赖对象只能指定集群作用域的属主。 +在 1.20 及更高版本中,如果一个集群作用域的依赖对象指定了某个名字空间作用域的类别作为其属主, +则该对象被视为拥有一个无法解析的属主引用,因而无法被垃圾收集处理。 + + +在 1.20 及更高版本中,如果垃圾收集器检测到非法的跨名字空间 `ownerReference`, +或者某集群作用域的依赖对象的 `ownerReference` 引用某名字空间作用域的类别, +系统会生成一个警告事件,其原因为 `OwnerRefInvalidNamespace`,`involvedObject` +设置为非法的依赖对象。你可以通过运行 +`kubectl get events -A --field-selector=reason=OwnerRefInvalidNamespace` +来检查是否存在这类事件。 +{{< /note >}} + + +## 级联删除 {#cascading-deletion} + +Kubernetes 会检查并删除那些不再拥有属主引用的对象,例如在你删除了 ReplicaSet +之后留下来的 Pod。当你删除某个对象时,你可以控制 Kubernetes 是否要通过一个称作 +级联删除(Cascading Deletion)的过程自动删除该对象的依赖对象。 +级联删除有两种类型,分别如下: + +* 前台级联删除 +* 后台级联删除 + + +你也可以使用 Kubernetes {{}} +来控制垃圾收集机制如何以及何时删除包含属主引用的资源。 + + +### 前台级联删除 {#foreground-deletion} + +在前台级联删除中,正在被你删除的对象首先进入 *deletion in progress* 状态。 +在这种状态下,针对属主对象会发生以下事情: + + +* Kubernetes API 服务器将对象的 `metadata.deletionTimestamp` + 字段设置为对象被标记为要删除的时间点。 +* Kubernetes API 服务器也会将 `metadata.finalizers` 字段设置为 `foregroundDeletion`。 +* 在删除过程完成之前,通过 Kubernetes API 仍然可以看到该对象。 + + +当属主对象进入删除过程中状态后,控制器删除其依赖对象。控制器在删除完所有依赖对象之后, +删除属主对象。这时,通过 Kubernetes API 就无法再看到该对象。 + +在前台级联删除过程中,唯一的可能阻止属主对象被删除的依赖对象是那些带有 +`ownerReference.blockOwnerDeletion=true` 字段的对象。 +参阅[使用前台级联删除](/zh/docs/tasks/administer-cluster/use-cascading-deletion/#use-foreground-cascading-deletion) +以了解进一步的细节。 + + +### 后台级联删除 {#background-deletion} + +在后台级联删除过程中,Kubernetes 服务器立即删除属主对象,控制器在后台清理所有依赖对象。 +默认情况下,Kubernetes 使用后台级联删除方案,除非你手动设置了要使用前台删除, +或者选择遗弃依赖对象。 + +参阅[使用后台级联删除](/zh/docs/tasks/administer-cluster/use-cascading-deletion/#use-background-cascading-deletion) +以了解进一步的细节。 + + +### 被遗弃的依赖对象 {#orphaned-dependents} + +当 Kubernetes 删除某个属主对象时,被留下来的依赖对象被称作被遗弃的(Orphaned)对象。 +默认情况下,Kubernetes 会删除依赖对象。要了解如何重载这种默认行为,可参阅 +[删除属主对象和遗弃依赖对象](/zh/docs/tasks/administer-cluster/use-cascading-deletion/#set-orphan-deletion-policy)。 + + +## 未使用容器和镜像的垃圾收集 {#containers-images} + +{{}} 会每五分钟对未使用的镜像执行一次垃圾收集, +每分钟对未使用的容器执行一次垃圾收集。 +你应该避免使用外部的垃圾收集工具,因为外部工具可能会破坏 kubelet +的行为,移除应该保留的容器。 + + +要配置对未使用容器和镜像的垃圾收集选项,可以使用一个 +[配置文件](/zh/docs/tasks/administer-cluster/kubelet-config-file/),基于 +[`KubeletConfiguration`](/zh/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) +资源类型来调整与垃圾搜集相关的 kubelet 行为。 + + +### 容器镜像生命期 {#container-image-lifecycle} + +Kubernetes 通过其镜像管理器(Image Manager)来管理所有镜像的生命周期, +该管理器是 kubelet 的一部分,工作时与 +{{< glossary_tooltip text="cadvisor" term_id="cadvisor" >}} 协同。 +kubelet 在作出垃圾收集决定时会考虑如下磁盘用量约束: + +* `HighThresholdPercent` +* `LowThresholdPercent` + + +磁盘用量超出所配置的 `HighThresholdPercent` 值时会触发垃圾收集, +垃圾收集器会基于镜像上次被使用的时间来按顺序删除它们,首先删除的是最老的镜像。 +kubelet 会持续删除镜像,直到磁盘用量到达 `LowThresholdPercent` 值为止。 + + +### 容器垃圾收集 {#container-image-garbage-collection} + +kubelet 会基于如下变量对所有未使用的容器执行垃圾收集操作,这些变量都是你可以定义的: + + +* `MinAge`:kubelet 可以垃圾回收某个容器时该容器的最小年龄。设置为 `0` + 表示禁止使用此规则。 +* `MaxPerPodContainer`:每个 Pod 可以包含的已死亡的容器个数上限。设置为小于 `0` + 的值表示禁止使用此规则。 +* `MaxContainers`:集群中可以存在的已死亡的容器个数上限。设置为小于 `0` + 的值意味着禁止应用此规则。 + + +除以上变量之外,kubelet 还会垃圾收集除无标识的以及已删除的容器,通常从最老的容器开始。 + +当保持每个 Pod 的最大数量的容器(`MaxPerPodContainer`)会使得全局的已死亡容器个数超出上限 +(`MaxContainers`)时,`MaxPerPodContainer` 和 `MaxContainers` 之间可能会出现冲突。 +在这种情况下,kubelet 会调整 `MaxPerPodContainer` 来解决这一冲突。 +最坏的情形是将 `MaxPerPodContainer` 降格为 `1`,并驱逐最老的容器。 +此外,当隶属于某已被删除的 Pod 的容器的年龄超过 `MinAge` 时,它们也会被删除。 + +{{}} + +kubelet 仅会回收由它所管理的容器。 +{{}} + + +## 配置垃圾收集 {#configuring-gc} + +你可以通过配置特定于管理资源的控制器来调整资源的垃圾收集行为。 +下面的页面为你展示如何配置垃圾收集: + +* [配置 Kubernetes 对象的级联删除](/zh/docs/tasks/administer-cluster/use-cascading-deletion/) +* [配置已完成 Job 的清理](/zh/docs/concepts/workloads/controllers/ttlafterfinished/) + + + +## {{% heading "whatsnext" %}} + + +* 进一步了解 [Kubernetes 对象的属主关系](/zh/docs/concepts/overview/working-with-objects/owners-dependents/)。 +* 进一步了解 Kubernetes [finalizers](/zh/docs/concepts/overview/working-with-objects/finalizers/)。 +* 进一步了解 [TTL 控制器](/zh/docs/concepts/workloads/controllers/ttlafterfinished/) (beta), + 该控制器负责清理已完成的 Job。 + diff --git a/content/zh/docs/concepts/cluster-administration/system-metrics.md b/content/zh/docs/concepts/cluster-administration/system-metrics.md index 3e62921679..f054161998 100644 --- a/content/zh/docs/concepts/cluster-administration/system-metrics.md +++ b/content/zh/docs/concepts/cluster-administration/system-metrics.md @@ -128,7 +128,7 @@ For example: -* 被启用之后: +* 被弃用之后: ``` # HELP some_counter (Deprecated since 1.15.0) this counts things diff --git a/content/zh/docs/concepts/services-networking/topology-aware-hints.md b/content/zh/docs/concepts/services-networking/topology-aware-hints.md index 0756210c34..16c312226c 100644 --- a/content/zh/docs/concepts/services-networking/topology-aware-hints.md +++ b/content/zh/docs/concepts/services-networking/topology-aware-hints.md @@ -47,7 +47,7 @@ Routing". When calculating the endpoints for a {{< glossary_tooltip term_id="Ser the EndpointSlice controller considers the topology (region and zone) of each endpoint and populates the hints field to allocate it to a zone. Cluster components such as the {{< glossary_tooltip term_id="kube-proxy" text="kube-proxy" >}} -can then consume those hints, and use them to influence how traffic to is routed +can then consume those hints, and use them to influence how the traffic to is routed (favoring topologically closer endpoints). --> Kubernetes 集群越来越多的部署到多区域环境中。 diff --git a/content/zh/docs/concepts/workloads/pods/pod-lifecycle.md b/content/zh/docs/concepts/workloads/pods/pod-lifecycle.md index 1082713bd3..cbb652885a 100644 --- a/content/zh/docs/concepts/workloads/pods/pod-lifecycle.md +++ b/content/zh/docs/concepts/workloads/pods/pod-lifecycle.md @@ -107,7 +107,7 @@ created anew. 如果 Pod 因为任何原因被删除,甚至某完全相同的替代 Pod 被创建时, 这个相关的对象(例如这里的卷)也会被删除并重建。 -{{< figure src="/images/docs/pod.svg" title="Pod 结构图例" width="50%" >}} +{{< figure src="/images/docs/pod.svg" title="Pod 结构图例" class="diagram-medium" >}} *一个包含多个容器的 Pod 中包含一个用来拉取文件的程序和一个 Web 服务器, 均使用持久卷作为容器间共享的存储。* @@ -153,7 +153,7 @@ Value | Description --> 取值 | 描述 :-----|:----------- -`Pending`(悬决)| Pod 已被 Kubernetes 系统接受,但有一个或者多个容器尚未创建亦未运行。此阶段包括等待 Pod 被调度的时间和通过网络下载镜像的时间, +`Pending`(悬决)| Pod 已被 Kubernetes 系统接受,但有一个或者多个容器尚未创建亦未运行。此阶段包括等待 Pod 被调度的时间和通过网络下载镜像的时间。 `Running`(运行中) | Pod 已经绑定到了某个节点,Pod 中所有的容器都已被创建。至少有一个容器仍在运行,或者正处于启动或重启状态。 `Succeeded`(成功) | Pod 中的所有容器都已成功终止,并且不会再重启。 `Failed`(失败) | Pod 中的所有容器都已终止,并且至少有一个容器是因为失败终止。也就是说,容器以非 0 状态退出或者被系统终止。 @@ -300,14 +300,14 @@ Pod 有一个 PodStatus 对象,其中包含一个 * `PodScheduled`: the Pod has been scheduled to a node. * `ContainersReady`: all containers in the Pod are ready. * `Initialized`: all [init containers](/docs/concepts/workloads/pods/init-containers/) - have started successfully. + have completed successfully. * `Ready`: the Pod is able to serve requests and should be added to the load balancing pools of all matching Services. --> * `PodScheduled`:Pod 已经被调度到某节点; * `ContainersReady`:Pod 中所有容器都已就绪; * `Initialized`:所有的 [Init 容器](/zh/docs/concepts/workloads/pods/init-containers/) - 都已成功启动; + 都已成功完成; * `Ready`:Pod 可以为请求提供服务,并且应该被添加到对应服务的负载均衡池中。 ## 容器探针 {#container-probes} -[Probe](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#probe-v1-core) -是由 [kubelet](/zh/docs/reference/command-line-tools-reference/kubelet/) 对容器执行的定期诊断。 -要执行诊断,kubelet 调用由容器实现的 -[Handler](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#handler-v1-core) -(处理程序)。有三种类型的处理程序: +probe 是由 [kubelet](/zh/docs/reference/command-line-tools-reference/kubelet/) 对容器执行的定期诊断。 +要执行诊断,kubelet 既可以在容器内执行代码,也可以发出一个网络请求。 -- [ExecAction](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#execaction-v1-core): - 在容器内执行指定命令。如果命令退出时返回码为 0 则认为诊断成功。 +### 检查机制 {#probe-check-methods} -- [TCPSocketAction](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#tcpsocketaction-v1-core): - 对容器的 IP 地址上的指定端口执行 TCP 检查。如果端口打开,则诊断被认为是成功的。 +使用探针来检查容器有四种不同的方法。 +每个探针都必须准确定义为这四种机制中的一种: -- [HTTPGetAction](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#httpgetaction-v1-core): - 对容器的 IP 地址上指定端口和路径执行 HTTP Get 请求。如果响应的状态码大于等于 200 +`exec` +: 在容器内执行指定命令。如果命令退出时返回码为 0 则认为诊断成功。 + +`grpc` +: 使用 [gRPC](https://grpc.io/) 执行一个远程过程调用。 + 目标应该实现 + [gRPC健康检查](https://grpc.io/grpc/core/md_doc_health-checking.html)。 + 如果响应的状态是 "SERVING",则认为诊断成功。 + gRPC 探针是一个 alpha 特性,只有在你启用了 + "GRPCContainerProbe" [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gate/)时才能使用。 + +`httpGet` +: 对容器的 IP 地址上指定端口和路径执行 HTTP `GET` 请求。如果响应的状态码大于等于 200 且小于 400,则诊断被认为是成功的。 +`tcpSocket` +: 对容器的 IP 地址上的指定端口执行 TCP 检查。如果端口打开,则诊断被认为是成功的。 + 如果远程系统(容器)在打开连接后立即将其关闭,这算作是健康的。 + +### 探测结果 {#probe-outcome} 每次探测都将获得以下三种结果之一: -- `Success`(成功):容器通过了诊断。 -- `Failure`(失败):容器未通过诊断。 -- `Unknown`(未知):诊断失败,因此不会采取任何行动。 +`Success`(成功) +: 容器通过了诊断。 + +`Failure`(失败) +: 容器未通过诊断。 + +`Unknown`(未知) +: 诊断失败,因此不会采取任何行动。 +### 探测类型 {#types-of-probe} 针对运行中的容器,`kubelet` 可以选择是否执行以下三种探针,以及如何针对探测结果作出反应: -- `livenessProbe`:指示容器是否正在运行。如果存活态探测失败,则 kubelet 会杀死容器, + +`livenessProbe` +: 指示容器是否正在运行。如果存活态探测失败,则 kubelet 会杀死容器, 并且容器将根据其[重启策略](#restart-policy)决定未来。如果容器不提供存活探针, 则默认状态为 `Success`。 -- `readinessProbe`:指示容器是否准备好为请求提供服务。如果就绪态探测失败, +`readinessProbe` +: 指示容器是否准备好为请求提供服务。如果就绪态探测失败, 端点控制器将从与 Pod 匹配的所有服务的端点列表中删除该 Pod 的 IP 地址。 初始延迟之前的就绪态的状态值默认为 `Failure`。 如果容器不提供就绪态探针,则默认状态为 `Success`。 -- `startupProbe`: 指示容器中的应用是否已经启动。如果提供了启动探针,则所有其他探针都会被 +`startupProbe` +: 指示容器中的应用是否已经启动。如果提供了启动探针,则所有其他探针都会被 禁用,直到此探针成功为止。如果启动探测失败,`kubelet` 将杀死容器,而容器依其 [重启策略](#restart-policy)进行重启。 如果容器没有提供启动探测,则默认状态为 `Success`。 @@ -524,9 +576,9 @@ see [Configure Liveness, Readiness and Startup Probes](/docs/tasks/configure-pod [配置存活态、就绪态和启动探针](/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)。 -### 何时该使用存活态探针? {#when-should-you-use-a-liveness-probe} +#### 何时该使用存活态探针? {#when-should-you-use-a-liveness-probe} {{< feature-state for_k8s_version="v1.0" state="stable" >}} @@ -546,9 +598,9 @@ specify a liveness probe, and specify a `restartPolicy` of Always or OnFailure. 并指定`restartPolicy` 为 "`Always`" 或 "`OnFailure`"。 -### 何时该使用就绪态探针? {#when-should-you-use-a-readiness-probe} +#### 何时该使用就绪态探针? {#when-should-you-use-a-readiness-probe} {{< feature-state for_k8s_version="v1.0" state="stable" >}} @@ -606,9 +658,9 @@ to stop. {{< /note >}} -### 何时该使用启动探针? {#when-should-you-use-a-startup-probe} +#### 何时该使用启动探针? {#when-should-you-use-a-startup-probe} {{< feature-state for_k8s_version="v1.18" state="beta" >}} @@ -852,21 +904,20 @@ This avoids a resource leak as Pods are created and terminated over time. * 动手实践[为容器生命周期时间关联处理程序](/zh/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/)。 * 动手实践[配置存活态、就绪态和启动探针](/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)。 * 进一步了解[容器生命周期回调](/zh/docs/concepts/containers/container-lifecycle-hooks/)。 -* 关于 API 中定义的有关 Pod/容器的详细规范信息, - 可参阅 [PodStatus](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podstatus-v1-core) - 和 [ContainerStatus](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#containerstatus-v1-core)。 +* 关于 API 中定义的有关 Pod 和容器状态的详细规范信息, + 可参阅 API 参考文档中 Pod 的 [`.status`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodStatus) 字段。 diff --git a/content/zh/docs/reference/access-authn-authz/_index.md b/content/zh/docs/reference/access-authn-authz/_index.md index 24df472264..bd6a833b91 100644 --- a/content/zh/docs/reference/access-authn-authz/_index.md +++ b/content/zh/docs/reference/access-authn-authz/_index.md @@ -1,5 +1,5 @@ --- -title: 访问 API +title: API 访问控制 weight: 15 no_list: true --- diff --git a/content/zh/docs/reference/access-authn-authz/extensible-admission-controllers.md b/content/zh/docs/reference/access-authn-authz/extensible-admission-controllers.md index 8c1ae96edd..e3b8b19eab 100644 --- a/content/zh/docs/reference/access-authn-authz/extensible-admission-controllers.md +++ b/content/zh/docs/reference/access-authn-authz/extensible-admission-controllers.md @@ -1813,8 +1813,8 @@ webhooks: -使用 `admissionregistration.k8s.io/v1beta1` 创建的准入 Webhook 将 -`failurePolicy` 默认设置为 `Ignore`。 +使用 `admissionregistration.k8s.io/v1` 创建的准入 Webhook 将 +`failurePolicy` 默认设置为 `Fail`。 {{% /tab %}} {{% tab name="admissionregistration.k8s.io/v1beta1" %}} diff --git a/content/zh/docs/reference/access-authn-authz/rbac.md b/content/zh/docs/reference/access-authn-authz/rbac.md index 4e9f0fa341..ba59daa236 100644 --- a/content/zh/docs/reference/access-authn-authz/rbac.md +++ b/content/zh/docs/reference/access-authn-authz/rbac.md @@ -2079,11 +2079,11 @@ are running with no RBAC denial messages in the server logs, you can remove the 在服务器日志中没有出现 RBAC 拒绝消息,就可以删除 ABAC 鉴权器。 -## 宽松的 RBAC 权限 {#permissive-rbac-permissions} +### 宽松的 RBAC 权限 {#permissive-rbac-permissions} 你可以使用 RBAC 角色绑定在多个场合使用宽松的策略。 diff --git a/content/zh/docs/reference/glossary/control-plane.md b/content/zh/docs/reference/glossary/control-plane.md index edb67bd796..80876a2510 100644 --- a/content/zh/docs/reference/glossary/control-plane.md +++ b/content/zh/docs/reference/glossary/control-plane.md @@ -29,6 +29,8 @@ tags: 控制平面(Control Plane)是指容器编排层,它暴露 API 和接口来定义、 部署容器和管理容器的生命周期。 + + diff --git a/content/zh/docs/reference/node/topics-on-dockershim-and-cri-compatible-runtimes.md b/content/zh/docs/reference/node/topics-on-dockershim-and-cri-compatible-runtimes.md new file mode 100644 index 0000000000..094da533f0 --- /dev/null +++ b/content/zh/docs/reference/node/topics-on-dockershim-and-cri-compatible-runtimes.md @@ -0,0 +1,83 @@ +--- +title: 关于 dockershim 移除和使用兼容 CRI 运行时的外部文章 +content_type: reference +weight: 20 +--- + + + + + +这是有关以下内容的文章列表: + +- Kubernetes 弃用和删除 _dockershim_ +- 使用兼容 CRI 的容器运行时 + + + + +## 首要来源 + +* [Kubernetes 博客: “Dockershim 弃用常见问题解答”, 2020/12/02](/blog/2020/12/02/dockershim-faq/) + +* [Kubernetes 文档:“从 dockershim 迁移”](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/) + +* [Kubernetes 文档:“容器运行时”](/zh/docs/setup/production-environment/container-runtimes/) + +* [Kubernetes 增强提问: “从 kubelet 中删除 dockershim” (`kubernetes/enhancements#2221`)](https://github.com/kubernetes/enhancements/issues/2221) + +* [Kubernetes 增强建议:“KEP-2221: 从 kubelet 中删除 dockershim”](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/2221-remove-dockershim/README.md) + +* [Kubernetes 博客: “移除 Dockershim 即将到来。你准备好了吗?”, 2021/11/12](/blog/2021/11/12/are-you-ready-for-dockershim-removal/) + + +## 次要来源 + +* [Docker.com 博客:“开发人员需要了解的关于 Docker、Docker Engine 和 Kubernetes v1.20 的哪些知识”,2020/12/04](https://www.docker.com/blog/what-developers-need-to-know-about-docker-docker-engine-and-kubernetes-v1-20/) + +* [Tripwire.com:“Dockershim 即将弃用如何影响你的 Kubernetes”](https://www.tripwire.com/state-of-security/security-data-protection/cloud/how-dockershim-forthcoming-deprecation-affects-your-kubernetes/) + +* [Amazon EKS 文档:“Dockershim 弃用”](https://docs.aws.amazon.com/eks/latest/userguide/dockershim-deprecation.html) + +* [YouTube 上的 “Google 开源”频道:“与 Google 一起学习 Kubernetes - 从 Dockershim 迁移到 Containerd”](https://youtu.be/fl7_4hjT52g) + +* [Mirantis 博客:“Dockershim 的未来是 cri-dockerd”,2021/04/21](https://www.mirantis.com/blog/the-future-of-dockershim-is-cri-dockerd/) + +* [Github.com:“Mirantis/cri-dockerd” 仓库](https://github.com/Mirantis/cri-dockerd) diff --git a/content/zh/docs/tasks/administer-cluster/memory-manager.md b/content/zh/docs/tasks/administer-cluster/memory-manager.md new file mode 100644 index 0000000000..1b7d64fc03 --- /dev/null +++ b/content/zh/docs/tasks/administer-cluster/memory-manager.md @@ -0,0 +1,799 @@ +--- +title: 使用 NUMA 感知的内存管理器 +content_type: task +min-kubernetes-server-version: v1.21 +--- + + + + + +{{< feature-state state="beta" for_k8s_version="v1.22" >}} + + +Kubernetes 内存管理器(Memory Manager)为 `Guaranteed` +{{< glossary_tooltip text="QoS 类" term_id="qos-class" >}} +的 Pods 提供可保证的内存(及大页面)分配能力。 + +内存管理器使用提示生成协议来为 Pod 生成最合适的 NUMA 亲和性配置。 +内存管理器将这类亲和性提示输入给中央管理器(即 Topology Manager)。 +基于所给的提示和 Topology Manager(拓扑管理器)的策略设置,Pod +或者会被某节点接受,或者被该节点拒绝。 + + +此外,内存管理器还确保 Pod 所请求的内存是从尽量少的 NUMA 节点分配而来。 + +内存管理器仅能用于 Linux 主机。 + +## {{% heading "prerequisites" %}} + +{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} + + +为了使得内存资源与 Pod 规约中所请求的其他资源对齐: + +- CPU 管理器应该被启用,并且在节点(Node)上要配置合适的 CPU 管理器策略, + 参见[控制 CPU 管理策略](/zh/docs/tasks/administer-cluster/cpu-management-policies/); +- 拓扑管理器要被启用,并且要在节点上配置合适的拓扑管理器策略,参见 + [控制拓扑管理器策略](/zh/docs/tasks/administer-cluster/topology-manager/)。 + + +从 v1.22 开始,内存管理器通过 +[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/) +`MemoryManager` 默认启用。 + +在 v1.22 之前,`kubelet` 必须在启动时设置如下标志: + +`--feature-gates=MemoryManager=true` + +这样内存管理器特性才会被启用。 + + +## 内存管理器如何运作? + + +内存管理器目前为 Guaranteed QoS 类中的 Pod 提供可保证的内存(和大页面)分配能力。 +若要立即将内存管理器启用,可参照[内存管理器配置](#memory-manager-configuration)节中的指南, +之后按[将 Pod 放入 Guaranteed QoS 类](#placing-a-pod-in-the-guaranteed-qos-class) +节中所展示的,准备并部署一个 `Guaranteed` Pod。 + + +内存管理器是一个提示驱动组件(Hint Provider),负责为拓扑管理器提供拓扑提示, +后者根据这些拓扑提示对所请求的资源执行对齐操作。 +内存管理器也会为 Pods 应用 `cgroups` 设置(即 `cpuset.mems`)。 +与 Pod 准入和部署流程相关的完整流程图在[Memory Manager KEP: Design Overview][4] +和下面。 + + +![Pod 准入与部署流程中的内存管理器](/images/docs/memory-manager-diagram.svg) + + +在这个过程中,内存管理器会更新其内部存储于[节点映射和内存映射][2]中的计数器, +从而管理有保障的内存分配。 + +内存管理器在启动和运行期间按下述逻辑更新节点映射(Node Map)。 + + +### 启动 {#startup} + + +当节点管理员应用 `--reserved-memory` [预留内存标志](#reserved-memory-flag)时执行此逻辑。 +这时,节点映射会被更新以反映内存的预留,如 +[Memory Manager KEP: Memory Maps at start-up (with examples)][5] +所说明。 + +当配置了 `Static` 策略时,管理员必须提供 `--reserved-memory` 标志设置。 + + +### 运行时 {#runtime} + + +参考文献 [Memory Manager KEP: Memory Maps at runtime (with examples)][6] +中说明了成功的 Pod 部署是如何影响节点映射的,该文档也解释了可能发生的内存不足 +(Out-of-memory,OOM)情况是如何进一步被 Kubernetes 或操作系统处理的。 + + +在内存管理器运作的语境中,一个重要的话题是对 NUMA 分组的管理。 +每当 Pod 的内存请求超出单个 NUMA 节点容量时,内存管理器会尝试创建一个包含多个 +NUMA 节点的分组,从而扩展内存容量。解决这个问题的详细描述在文档 +[Memory Manager KEP: How to enable the guaranteed memory allocation over many NUMA nodes?][3] +中。同时,关于 NUMA 分组是如何管理的,你还可以参考文档 +[Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1]。 + + +## 内存管理器配置 {#memory-manager-configuration} + + +其他管理器也要预先配置。接下来,内存管理器特性需要被启用, +并且采用 `Static` 策略([静态策略](#policy-static))运行。 +作为可选操作,可以预留一定数量的内存给系统或者 kubelet 进程以增强节点的 +稳定性([预留内存标志](#reserved-memory-flag))。 + + +### 策略 {#policies} + + +内存管理器支持两种策略。你可以通过 `kubelet` 标志 `--memory-manager-policy` 来 +选择一种策略: + +* `None` (默认) +* `Static` + + +#### None 策略 {#policy-none} + +这是默认的策略,并且不会以任何方式影响内存分配。该策略的行为好像内存管理器不存在一样。 + +`None` 策略返回默认的拓扑提示信息。这种特殊的提示会表明拓扑驱动组件(Hint Provider) +(在这里是内存管理器)对任何资源都没有与 NUMA 亲和性关联的偏好。 + + +#### Static 策略 {#policy-static} + +对 `Guaranteed` Pod 而言,`Static` 内存管理器策略会返回拓扑提示信息,该信息 +与内存分配有保障的 NUMA 节点集合有关,并且内存管理器还通过更新内部的 +[节点映射][2] 对象来完成内存预留。 + +对 `BestEffort` 或 `Burstable` Pod 而言,因为不存在对有保障的内存资源的请求, +`Static` 内存管理器策略会返回默认的拓扑提示,并且不会通过内部的[节点映射][2]对象 +来预留内存。 + + +### 预留内存标志 {#reserved-memory-flag} + + +[节点可分配](/zh/docs/tasks/administer-cluster/reserve-compute-resources/)机制通常 +被节点管理员用来为 kubelet 或操作系统进程预留 K8S 节点上的系统资源,目的是提高节点稳定性。 +有一组专用的标志可用于这个目的,为节点设置总的预留内存量。 +此预配置的值接下来会被用来计算节点上对 Pods “可分配的”内存。 + + +Kubernetes 调度器在优化 Pod 调度过程时,会考虑“可分配的”内存。 +前面提到的标志包括 `--kube-reserved`、`--system-reserved` 和 `--eviction-threshold`。 +这些标志值的综合计作预留内存的总量。 + +为内存管理器而新增加的 `--reserved-memory` 标志可以(让节点管理员)将总的预留内存进行划分, +并完成跨 NUMA 节点的预留操作。 + + +标志设置的值是一个按 NUMA 节点所给的内存预留的值的列表,用逗号分开。 +只有在内存管理器特性被启用的语境下,这个参数才有意义。 +内存管理器不会使用这些预留的内存来为容器负载分配内存。 + +例如,如果你有一个可用内存为 `10Gi` 的 NUMA 节点 "NUMA0",而参数 `--reserved-memory` +被设置成要在 "NUMA0" 上预留 `1Gi` 的内存,那么内存管理器会假定节点上只有 `9Gi` +内存可用于容器负载。 + + +你也可以忽略此参数,不过这样做时,你要清楚,所有 NUMA 节点上预留内存的数量要等于 +[节点可分配特性](/zh/docs/tasks/administer-cluster/reserve-compute-resources/) +所设定的内存量。如果至少有一个节点可分配参数值为非零,你就需要至少为一个 NUMA +节点设置 `--reserved-memory`。实际上,`eviction-hard` 阈值默认为 `100Mi`, +所以当使用 `Static` 策略时,`--reserved-memory` 是必须设置的。 + + +此外,应尽量避免如下配置: + +1. 重复的配置,即同一 NUMA 节点或内存类型被设置不同的取值; +1. 为某种内存类型设置约束值为零; +1. 使用物理硬件上不存在的 NUMA 节点 ID; +1. 使用名字不是 `memory` 或 `hugepages-` 的内存类型名称 + (特定的 `` 的大页面也必须存在)。 + + +语法: + +`--reserved-memory N:memory-type1=value1,memory-type2=value2,...` + + +* `N`(整数)- NUMA 节点索引,例如,`0` +* `memory-type`(字符串)- 代表内存类型: + * `memory` - 常规内存; + * `hugepages-2Mi` 或 `hugepages-1Gi` - 大页面 +* `value`(字符串) - 预留内存的量,例如 `1Gi` + + +用法示例: + +`--reserved-memory 0:memory=1Gi,hugepages-1Gi=2Gi` + + +或者 + +`--reserved-memory 0:memory=1Gi --reserved-memory 1:memory=2Gi` + + +当你为 `--reserved-memory` 标志指定取值时,必须要遵从之前通过节点可分配特性标志所设置的值。 +换言之,对每种内存类型而言都要遵从下面的规则: + +`sum(reserved-memory(i)) = kube-reserved + system-reserved + eviction-threshold` + +其中,`i` 是 NUMA 节点的索引。 + + +如果你不遵守上面的公示,内存管理器会在启动时输出错误信息。 + +换言之,上面的例子我们一共要预留 `3Gi` 的常规内存(`type=memory`),即: + +`sum(reserved-memory(i)) = reserved-memory(0) + reserved-memory(1) = 1Gi + 2Gi = 3Gi` + + +下面的例子中给出与节点可分配配置相关的 kubelet 命令行参数: + +* `--kube-reserved=cpu=500m,memory=50Mi` +* `--system-reserved=cpu=123m,memory=333Mi` +* `--eviction-hard=memory.available<500Mi` + +{{< note >}} + +默认的硬性驱逐阈值是 100MiB,**不是**零。 +请记得在使用 `--reserved-memory` 设置要预留的内存量时,加上这个硬性驱逐阈值。 +否则 kubelet 不会启动内存管理器,而会输出一个错误信息。 +{{< /note >}} + + +下面是一个正确配置的示例: + +```shell +--feature-gates=MemoryManager=true +--kube-reserved=cpu=4,memory=4Gi +--system-reserved=cpu=1,memory=1Gi +--memory-manager-policy=Static +--reserved-memory 0:memory=3Gi --reserved-memory 1:memory=2148Mi +``` + + +我们对上面的配置做一个检查: + +1. `kube-reserved + system-reserved + eviction-hard(default) = reserved-memory(0) + reserved-memory(1)` +1. `4GiB + 1GiB + 100MiB = 3GiB + 2148MiB` +1. `5120MiB + 100MiB = 3072MiB + 2148MiB` +1. `5220MiB = 5220MiB` (这是对的) + + +## 将 Pod 放入 Guaranteed QoS 类 {#placing-a-pod-in-the-guaranteed-qos-class} + +若所选择的策略不是 `None`,则内存管理器会辨识处于 `Guaranteed` QoS 类中的 Pod。 +内存管理器为每个 `Guaranteed` Pod 向拓扑管理器提供拓扑提示信息。 +对于不在 `Guaranteed` QoS 类中的其他 Pod,内存管理器向拓扑管理器提供默认的 +拓扑提示信息。 + + +下面的来自 Pod 清单的片段将 Pod 加入到 `Guaranteed` QoS 类中。 + +当 Pod 的 CPU `requests` 等于 `limits` 且为整数值时,Pod 将运行在 `Guaranteed` +QoS 类中。 + +```yaml +spec: + containers: + - name: nginx + image: nginx + resources: + limits: + memory: "200Mi" + cpu: "2" + example.com/device: "1" + requests: + memory: "200Mi" + cpu: "2" + example.com/device: "1" +``` + + +此外,共享 CPU 的 Pods 在 `requests` 等于 `limits` 值时也运行在 `Guaranteed` +QoS 类中。 + +```yaml +spec: + containers: + - name: nginx + image: nginx + resources: + limits: + memory: "200Mi" + cpu: "300m" + example.com/device: "1" + requests: + memory: "200Mi" + cpu: "300m" + example.com/device: "1" +``` + + +要注意的是,只有 CPU 和内存请求都被设置时,Pod 才会进入 Guaranteed QoS 类。 + + +## 故障排查 {#troubleshooting} + +下面的方法可用来排查为什么 Pod 无法被调度或者被节点拒绝: + + +- Pod 状态 - 可表明拓扑亲和性错误 +- 系统日志 - 包含用来调试的有价值的信息,例如,关于所生成的提示信息 +- 状态文件 - 其中包含内存管理器内部状态的转储(包含[节点映射和内存映射][2]) +- 从 v1.22 开始,[设备插件资源 API](#device-plugin-resource-api) 可以用来 + 检索关于为容器预留的内存的信息 + + +### Pod 状态 (TopologyAffinityError) {#TopologyAffinityError} + +这类错误通常在以下情形出现: + +* 节点缺少足够的资源来满足 Pod 请求 +* Pod 的请求因为特定的拓扑管理器策略限制而被拒绝 + +错误信息会出现在 Pod 的状态中: + +```shell +kubectl get pods +``` + +```none +NAME READY STATUS RESTARTS AGE +guaranteed 0/1 TopologyAffinityError 0 113s +``` + + +使用 `kubectl describe pod ` 或 `kubectl get events` 可以获得详细的错误信息。 + +```none +Warning TopologyAffinityError 10m kubelet, dell8 Resources cannot be allocated with Topology locality +``` + + +### 系统日志 {#system-logs} + +针对特定的 Pod 搜索系统日志。 + +内存管理器为 Pod 所生成的提示信息可以在日志中找到。 +此外,日志中应该也存在 CPU 管理器所生成的提示信息。 + + +拓扑管理器将这些提示信息进行合并,计算得到唯一的最合适的提示数据。 +此最佳提示数据也应该出现在日志中。 + +最佳提示表明要在哪里分配所有的资源。拓扑管理器会用当前的策略来测试此数据, +并基于得出的结论或者接纳 Pod 到节点,或者将其拒绝。 + +此外,你可以搜索日志查找与内存管理器相关的其他条目,例如 `cgroups` 和 +`cpuset.mems` 的更新信息等。 + + +### 检查节点上内存管理器状态 + +我们首先部署一个 `Guaranteed` Pod 示例,其规约如下所示: + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: guaranteed +spec: + containers: + - name: guaranteed + image: consumer + imagePullPolicy: Never + resources: + limits: + cpu: "2" + memory: 150Gi + requests: + cpu: "2" + memory: 150Gi + command: ["sleep","infinity"] +``` + + +接下来,我们登录到 Pod 运行所在的节点,检查位于 +`/var/lib/kubelet/memory_manager_state` 的状态文件: + +```json +{ + "policyName":"Static", + "machineState":{ + "0":{ + "numberOfAssignments":1, + "memoryMap":{ + "hugepages-1Gi":{ + "total":0, + "systemReserved":0, + "allocatable":0, + "reserved":0, + "free":0 + }, + "memory":{ + "total":134987354112, + "systemReserved":3221225472, + "allocatable":131766128640, + "reserved":131766128640, + "free":0 + } + }, + "nodes":[ + 0, + 1 + ] + }, + "1":{ + "numberOfAssignments":1, + "memoryMap":{ + "hugepages-1Gi":{ + "total":0, + "systemReserved":0, + "allocatable":0, + "reserved":0, + "free":0 + }, + "memory":{ + "total":135286722560, + "systemReserved":2252341248, + "allocatable":133034381312, + "reserved":29295144960, + "free":103739236352 + } + }, + "nodes":[ + 0, + 1 + ] + } + }, + "entries":{ + "fa9bdd38-6df9-4cf9-aa67-8c4814da37a8":{ + "guaranteed":[ + { + "numaAffinity":[ + 0, + 1 + ], + "type":"memory", + "size":161061273600 + } + ] + } + }, + "checksum":4142013182 +} +``` + + +从这个状态文件,可以推断 Pod 被同时绑定到两个 NUMA 节点,即: + +```json +"numaAffinity":[ + 0, + 1 +], +``` + + +术语绑定(pinned)意味着 Pod 的内存使用被(通过 `cgroups` 配置)限制到 +这些 NUMA 节点。 + +这也直接意味着内存管理器已经创建了一个 NUMA 分组,由这两个 NUMA 节点组成, +即索引值分别为 `0` 和 `1` 的 NUMA 节点。 + + +注意 NUMA 分组的管理是有一个相对复杂的管理器处理的,相关逻辑的进一步细节可在内存管理器的 +KEP 中[示例1][1]和[跨 NUMA 节点][3]节找到。 + +为了分析 NUMA 组中可用的内存资源,必须对分组内 NUMA 节点对应的条目进行汇总。 + + +例如,NUMA 分组中空闲的“常规”内存的总量可以通过将分组内所有 NUMA +节点上空闲内存加和来计算,即将 NUMA 节点 `0` 和 NUMA 节点 `1` 的 `"memory"` 节 +(分别是 `"free":0` 和 `"free": 103739236352`)相加,得到此分组中空闲的“常规” +内存总量为 `0 + 103739236352` 字节。 + + +`"systemReserved": 3221225472` 这一行表明节点的管理员使用 `--reserved-memory` 为 NUMA +节点 `0` 上运行的 kubelet 和系统进程预留了 `3221225472` 字节 (即 `3Gi`)。 + + +### 设备插件资源 API {#device-plugin-resource-api} + +通过使用此 [API](/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/), +可以获得每个容器的预留内存信息,该信息位于 protobuf 协议的 `ContainerMemory` 消息中。 +只能针对 Guaranteed QoS 类中的 Pod 来检索此信息。 + +## {{% heading "whatsnext" %}} + + +- [Memory Manager KEP: Design Overview][4] +- [Memory Manager KEP: Memory Maps at start-up (with examples)][5] +- [Memory Manager KEP: Memory Maps at runtime (with examples)][6] +- [Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1] +- [Memory Manager KEP: The Concept of Node Map and Memory Maps][2] +- [Memory Manager KEP: How to enable the guaranteed memory allocation over many NUMA nodes?][3] + +[1]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#simulation---how-the-memory-manager-works-by-examples +[2]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#the-concept-of-node-map-and-memory-maps +[3]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#how-to-enable-the-guaranteed-memory-allocation-over-many-numa-nodes +[4]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#design-overview +[5]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-start-up-with-examples +[6]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-runtime-with-examples diff --git a/content/zh/docs/tutorials/clusters/_index.md b/content/zh/docs/tutorials/clusters/_index.md deleted file mode 100644 index 1c8e1495fb..0000000000 --- a/content/zh/docs/tutorials/clusters/_index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: "集群" -weight: 60 ---- diff --git a/content/zh/docs/tutorials/clusters/apparmor.md b/content/zh/docs/tutorials/security/apparmor.md similarity index 55% rename from content/zh/docs/tutorials/clusters/apparmor.md rename to content/zh/docs/tutorials/security/apparmor.md index caca769b44..6739118c36 100644 --- a/content/zh/docs/tutorials/clusters/apparmor.md +++ b/content/zh/docs/tutorials/security/apparmor.md @@ -3,58 +3,69 @@ title: 使用 AppArmor 限制容器对资源的访问 content_type: tutorial weight: 10 --- - +--> {{< feature-state for_k8s_version="v1.4" state="beta" >}} - - -Apparmor 是一个 Linux 内核安全模块,它补充了标准的基于 Linux 用户和组的安全模块将程序限制为有限资源集的权限。 +violations. +--> +AppArmor 是一个 Linux 内核安全模块, +它补充了基于标准 Linux 用户和组的权限,将程序限制在一组有限的资源中。 AppArmor 可以配置为任何应用程序减少潜在的攻击面,并且提供更加深入的防御。 -AppArmor 是通过配置文件进行配置的,这些配置文件被调整为允许特定程序或者容器访问,如 Linux 功能、网络访问、文件权限等。 -每个配置文件都可以在*强制(enforcing)*模式(阻止访问不允许的资源)或*投诉(complain)*模式 -(仅报告冲突)下运行。 - - +它通过调整配置文件进行配置,以允许特定程序或容器所需的访问, +如 Linux 权能字、网络访问、文件权限等。 +每个配置文件都可以在 +*强制(enforcing)* 模式(阻止访问不允许的资源)或 +*投诉(complain)* 模式(仅报告冲突)下运行。 + +AppArmor 可以通过限制允许容器执行的操作, +和/或通过系统日志提供更好的审计来帮助你运行更安全的部署。 +但是,重要的是要记住 AppArmor 不是灵丹妙药, +只能做部分事情来防止应用程序代码中的漏洞。 +提供良好的限制性配置文件,并从其他角度强化你的应用程序和集群非常重要。 ## {{% heading "objectives" %}} - - +* See what happens when a profile cannot be loaded +--> * 查看如何在节点上加载配置文件示例 * 了解如何在 Pod 上强制执行配置文件 * 了解如何检查配置文件是否已加载 -* 查看违反配置文件时会发生什么情况 -* 查看无法加载配置文件时会发生什么情况 - - +* 查看违反配置文件时会发生什么 +* 查看无法加载配置文件时会发生什么 ## {{% heading "prerequisites" %}} - -务必: +确保: - -1. Kubernetes 版本至少是 v1.4 -- AppArmor 在 Kubernetes v1.4 版本中才添加了对 AppArmor 的支持。早于 v1.4 版本的 Kubernetes 组件不知道新的 AppArmor 注释,并且将会 **默认忽略** 提供的任何 AppArmor 设置。为了确保您的 Pods 能够得到预期的保护,必须验证节点的 Kubelet 版本: + ``` +--> +1. Kubernetes 版本至少是 v1.4 —— AppArmor 在 Kubernetes v1.4 版本中才添加了对 AppArmor 的支持。 + 早于 v1.4 版本的 Kubernetes 组件不知道新的 AppArmor 注解 + 并且将会 **默认忽略** 提供的任何 AppArmor 设置。 + 为了确保你的 Pod 能够得到预期的保护,必须验证节点的 Kubelet 版本: - ```shell + ```shell kubectl get nodes -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {@.status.nodeInfo.kubeletVersion}\n{end}' ``` ``` @@ -78,7 +93,8 @@ AppArmor 是通过配置文件进行配置的,这些配置文件被调整为 gke-test-default-pool-239f5d02-xwux: v1.4.0 ``` - -2. AppArmor 内核模块已启用 -- 要使 Linux 内核强制执行 AppArmor 配置文件,必须安装并且启动 AppArmor 内核模块。默认情况下,有几个发行版支持该模块,如 Ubuntu 和 SUSE,还有许多发行版提供可选支持。要检查模块是否已启用,请检查 -`/sys/module/apparmor/parameters/enabled` 文件: - ```shell + {{< /note >}} +--> +2. AppArmor 内核模块已启用 —— 要使 Linux 内核强制执行 AppArmor 配置文件, + 必须安装并且启动 AppArmor 内核模块。默认情况下,有几个发行版支持该模块, + 如 Ubuntu 和 SUSE,还有许多发行版提供可选支持。要检查模块是否已启用,请检查 + `/sys/module/apparmor/parameters/enabled` 文件: + + ```shell cat /sys/module/apparmor/parameters/enabled Y ``` - 如果 Kubelet 包含 AppArmor 支持(>=v1.4),如果内核模块未启用,它将拒绝运行带有 AppArmor 选项的 Pod。 + + 如果 Kubelet 包含 AppArmor 支持(>= v1.4), + 但是内核模块未启用,它将拒绝运行带有 AppArmor 选项的 Pod。 {{< note >}} - Ubuntu 携带了许多没有合并到上游 Linux 内核中的 AppArmor 补丁,包括添加附加钩子和特性的补丁。Kubernetes 只在上游版本中测试过,不承诺支持其他特性。 + Ubuntu 携带了许多没有合并到上游 Linux 内核中的 AppArmor 补丁, + 包括添加附加钩子和特性的补丁。Kubernetes 只在上游版本中测试过,不承诺支持其他特性。 {{< /note >}} - +3. 容器运行时支持 AppArmor —— 目前所有常见的 Kubernetes 支持的容器运行时都应该支持 AppArmor, + 像 {{< glossary_tooltip term_id="docker">}},{{< glossary_tooltip term_id="cri-o" >}} + 或 {{< glossary_tooltip term_id="containerd" >}}。 + 请参考相应的运行时文档并验证集群是否满足使用 AppArmor 的要求。 - ```shell - kubectl get nodes -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {@.status.nodeInfo.containerRuntimeVersion}\n{end}' - ``` - ``` - gke-test-default-pool-239f5d02-gyn2: docker://1.11.2 - gke-test-default-pool-239f5d02-x1kf: docker://1.11.2 - gke-test-default-pool-239f5d02-xwux: docker://1.11.2 - ``` - - If the Kubelet contains AppArmor support (>= v1.4), it will refuse to run a Pod with AppArmor - options if the runtime is not Docker. --> -3. Docker 作为容器运行环境 -- 目前,支持 Kubernetes 运行的容器中只有 Docker 也支持 AppArmor。随着更多的运行时添加 AppArmor 的支持,可选项将会增多。您可以使用以下命令验证节点是否正在运行 Docker: - ```shell - kubectl get nodes -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {@.status.nodeInfo.containerRuntimeVersion}\n{end}' - ``` - ``` - gke-test-default-pool-239f5d02-gyn2: docker://1.11.2 - gke-test-default-pool-239f5d02-x1kf: docker://1.11.2 - gke-test-default-pool-239f5d02-xwux: docker://1.11.2 - ``` - - 如果 Kubelet 包含 AppArmor 支持(>=v1.4),如果运行环境不是 Docker,它将拒绝运行带有 AppArmor 选项的 Pod。 - - -4. 配置文件已加载 -- 通过指定每个容器都应使用 AppArmor 配置文件,AppArmor 应用于 Pod。如果指定的任何配置文件尚未加载到内核, Kubelet (>=v1.4) 将拒绝 Pod。通过检查 `/sys/kernel/security/apparmor/profiles` 文件,可以查看节点加载了哪些配置文件。例如: + [Setting up nodes with profiles](#setting-up-nodes-with-profiles). +--> +4. 配置文件已加载 —— 通过指定每个容器都应使用的 AppArmor 配置文件, + AppArmor 会被应用到 Pod 上。如果指定的任何配置文件尚未加载到内核, + Kubelet(>= v1.4) 将拒绝 Pod。 + 通过检查 `/sys/kernel/security/apparmor/profiles` 文件, + 可以查看节点加载了哪些配置文件。例如: ```shell ssh gke-test-default-pool-239f5d02-gyn2 "sudo cat /sys/kernel/security/apparmor/profiles | sort" @@ -164,15 +178,17 @@ AppArmor 是通过配置文件进行配置的,这些配置文件被调整为 k8s-nginx (enforce) ``` - 有关在节点上加载配置文件的详细信息,请参见[使用配置文件设置节点](#setting-up-nodes-with-profiles)。 - -只要 Kubelet 版本包含 AppArmor 支持(>=v1.4),如果不满足任何先决条件,Kubelet 将拒绝带有 AppArmor 选项的 Pod。您还可以通过检查节点就绪状况消息来验证节点上的 AppArmor 支持(尽管这可能会在以后的版本中删除): +later release): +--> +只要 Kubelet 版本包含 AppArmor 支持(>=v1.4), +如果不满足这些先决条件,Kubelet 将拒绝带有 AppArmor 选项的 Pod。 +你还可以通过检查节点就绪状况消息来验证节点上的 AppArmor 支持(尽管这可能会在以后的版本中删除): ```shell kubectl get nodes -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {.status.conditions[?(@.reason=="KubeletReady")].message}\n{end}' @@ -183,49 +199,67 @@ gke-test-default-pool-239f5d02-x1kf: kubelet is posting ready status. AppArmor e gke-test-default-pool-239f5d02-xwux: kubelet is posting ready status. AppArmor enabled ``` - - -## 保护 Pod +## 保护 Pod {#securing-a-pod} {{< note >}} - -AppArmor 目前处于测试阶段,因此选项被指定为注释。一旦 AppArmor 被授予支持通用,注释将替换为首要的字段(更多详情参见[升级到 GA 的途径](#upgrade-path-to-general-availability))。 +[Upgrade path to GA](#upgrade-path-to-general-availability)). +--> +AppArmor 目前处于 Beta 阶段,因此选项以注解形式设定。 +一旦 AppArmor 支持进入正式发布阶段,注解将被替换为一阶的资源字段 +(更多详情参见[升级到 GA 的途径](#upgrade-path-to-general-availability))。 {{< /note >}} - -AppArmor 配置文件被指定为 *per-container*。要指定要用其运行 Pod 容器的 AppArmor 配置文件,请向 Pod 的元数据添加注释: + +AppArmor 配置文件是按 *逐个容器* 的形式来设置的。 +要指定用来运行 Pod 容器的 AppArmor 配置文件,请向 Pod 的 metadata 添加注解: ```yaml container.apparmor.security.beta.kubernetes.io/: ``` - -`` 的名称是容器的简称,用以描述简介,并且简称为 `` 。`` 可以作为其中之一: + +`` 的名称是配置文件所针对的容器的名称,`` 则设置要应用的配置文件。 +`` 可以是以下取值之一: - +* `unconfined` to indicate that no profiles will be loaded +--> * `runtime/default` 应用运行时的默认配置 -* `localhost/` 应用在名为 `` 的主机上加载的配置文件 +* `localhost/` 应用在主机上加载的名为 `` 的配置文件 * `unconfined` 表示不加载配置文件 - -有关注释和配置文件名称格式的详细信息,请参阅[API 参考](#api-reference)。 + +有关注解和配置文件名称格式的详细信息,请参阅[API 参考](#api-reference)。 - -Kubernetes AppArmor 强制执行方式首先通过检查所有先决条件都已满足,然后将配置文件选择转发到容器运行时进行强制执行。如果未满足先决条件, Pod 将被拒绝,并且不会运行。 +prerequisites have not been met, the Pod will be rejected, and will not run. +--> +Kubernetes AppArmor 强制执行机制首先检查所有先决条件都已满足, +然后将所选的配置文件转发到容器运行时进行强制执行。 +如果未满足先决条件,Pod 将被拒绝,并且不会运行。 - -要验证是否应用了配置文件,可以查找容器创建事件中列出的 AppArmor 安全选项: + +要验证是否应用了配置文件,可以在容器创建事件中查找所列出的 AppArmor 安全选项: ```shell kubectl get events | grep Created @@ -234,8 +268,10 @@ kubectl get events | grep Created 22s 22s 1 hello-apparmor Pod spec.containers{hello} Normal Created {kubelet e2e-test-stclair-node-pool-31nt} Created container with docker id 269a53b202d3; Security:[seccomp=unconfined apparmor=k8s-apparmor-example-deny-write] ``` - -您还可以通过检查容器的 proc attr,直接验证容器的根进程是否以正确的配置文件运行: + +你还可以通过检查容器的 proc attr,直接验证容器的根进程是否以正确的配置文件运行: ```shell kubectl exec cat /proc/1/attr/current @@ -245,31 +281,37 @@ k8s-apparmor-example-deny-write (enforce) ``` -## 举例 +## 举例 {#example} -*本例假设您已经使用 AppArmor 支持设置了一个集群。* +*本例假设你已经设置了一个集群使用 AppArmor 支持。* - + 首先,我们需要将要使用的配置文件加载到节点上。配置文件拒绝所有文件写入: ```shell #include + profile k8s-apparmor-example-deny-write flags=(attach_disconnected) { #include + file, + # Deny all file writes. deny /** w, } ``` - 由于我们不知道 Pod 将被调度到哪里,我们需要在所有节点上加载配置文件。 -在本例中,我们将使用 SSH 来安装概要文件,但是在[使用配置文件设置节点](#setting-up-nodes-with-profiles) -中讨论了其他方法。 +在本例中,我们将使用 SSH 来安装概要文件, +但是在[使用配置文件设置节点](#setting-up-nodes-with-profiles)中讨论了其他方法。 ```shell NODES=( @@ -293,7 +335,7 @@ done ``` -接下来,我们将运行一个带有拒绝写入配置文件的简单 "Hello AppArmor" pod: +接下来,我们将运行一个带有拒绝写入配置文件的简单 “Hello AppArmor” Pod: {{< codenew file="pods/security/hello-apparmor.yaml" >}} @@ -301,9 +343,12 @@ done kubectl create -f ./hello-apparmor.yaml ``` - -如果我们查看 pod 事件,我们可以看到 pod 容器是用 AppArmor 配置文件 "k8s-apparmor-example-deny-write" 所创建的: + +如果我们查看 Pod 事件,我们可以看到 Pod 容器是用 AppArmor +配置文件 “k8s-apparmor-example-deny-write” 所创建的: ```shell kubectl get events | grep hello-apparmor @@ -327,7 +372,7 @@ k8s-apparmor-example-deny-write (enforce) ``` -最后,我们可以看到如果试图通过写入文件来违反配置文件,会发生什么情况: +最后,我们可以看到,如果我们尝试通过写入文件来违反配置文件会发生什么: ```shell kubectl exec hello-apparmor -- touch /tmp/test @@ -411,41 +456,56 @@ Events: 23s 23s 1 {kubelet e2e-test-stclair-node-pool-t1f5} Warning AppArmor Cannot enforce AppArmor: profile "k8s-apparmor-example-allow-write" is not loaded ``` - -注意 pod 呈现 Pending 状态,并且显示一条有用的错误信息:`Pod Cannot enforce AppArmor: profile -"k8s-apparmor-example-allow-write" 未加载`。还用相同的消息记录了一个事件。 + +注意 Pod 呈现 Pending 状态,并且显示一条有用的错误信息: +`Pod Cannot enforce AppArmor: profile "k8s-apparmor-example-allow-write" is not loaded`。 +还用相同的消息记录了一个事件。 -## 管理 +## 管理 {#administration} -### 使用配置文件设置节点 +### 使用配置文件设置节点 {#setting-up-nodes-with-profiles} - -Kubernetes 目前不提供任何本地机制来将 AppArmor 配置文件加载到节点上。有很多方法可以设置配置文件,例如: + +Kubernetes 目前不提供任何本地机制来将 AppArmor 配置文件加载到节点上。 +有很多方法可以设置配置文件,例如: - -* 通过在每个节点上运行 Pod 的[DaemonSet](/zh/docs/concepts/workloads/controllers/daemonset/)确保加载了正确的配置文件。可以找到一个示例实现[这里](https://git.k8s.io/kubernetes/test/images/apparmor-loader)。 -* 在节点初始化时,使用节点初始化脚本(例如 Salt 、Ansible 等)或镜像。 + [Example](#example). +--> +* 通过在每个节点上运行 Pod 的 + [DaemonSet](/zh/docs/concepts/workloads/controllers/daemonset/)来确保加载了正确的配置文件。 + 可以在[这里](https://git.k8s.io/kubernetes/test/images/apparmor-loader)找到实现示例。 +* 在节点初始化时,使用节点初始化脚本(例如 Salt、Ansible 等)或镜像。 * 通过将配置文件复制到每个节点并通过 SSH 加载它们,如[示例](#example)。 - -调度程序不知道哪些配置文件加载到哪个节点上,因此必须将全套配置文件加载到每个节点上。另一种方法是为节点上的每个配置文件(或配置文件类)添加节点标签,并使用[节点选择器](/zh/docs/concepts/configuration/assign pod node/)确保 Pod 在具有所需配置文件的节点上运行。 +node with the required profile. +--> +调度程序不知道哪些配置文件加载到哪个节点上,因此必须将全套配置文件加载到每个节点上。 +另一种方法是为节点上的每个配置文件(或配置文件类)添加节点标签, +并使用[节点选择器](/zh/docs/concepts/configuration/assign-pod-node/)确保 +Pod 在具有所需配置文件的节点上运行。 -### 使用 PodSecurityPolicy 限制配置文件 +### 使用 PodSecurityPolicy 限制配置文件 {#restricting-profiles-with-the-podsecuritypolicy} {{< note >}} -如果启用了 PodSecurityPolicy 扩展,则可以应用群集范围的 AppArmor 限制。要启用 PodSecurityPolicy,必须在“apiserver”上设置以下标志: + +如果启用了 PodSecurityPolicy 扩展,则可以应用群集范围的 AppArmor 限制。 +要启用 PodSecurityPolicy,必须在 `apiserver` 上设置以下标志: ``` --enable-admission-plugins=PodSecurityPolicy[,others...] ``` -AppArmor 选项可以指定为 PodSecurityPolicy 上的注释: +AppArmor 选项可以指定为 PodSecurityPolicy 上的注解: ```yaml apparmor.security.beta.kubernetes.io/defaultProfileName: apparmor.security.beta.kubernetes.io/allowedProfileNames: [,others...] ``` - -默认配置文件名选项指定默认情况下在未指定任何配置文件时应用于容器的配置文件。节点允许配置文件名选项指定允许 Pod 容器运行时的配置文件列表。配置文件的指定格式与容器上的相同。完整规范见[API 参考](#api-reference)。 +specification. +--> +默认配置文件名选项指定默认情况下在未指定任何配置文件时应用于容器的配置文件。 +所允许的配置文件名称选项指定允许 Pod 容器运行期间所对应的配置文件列表。 +如果同时提供了这两个选项,则必须允许默认值。 +配置文件的指定格式与容器上的相同。有关完整规范,请参阅 [API 参考](#api-reference)。 -### 禁用 AppArmor +### 禁用 AppArmor {#disabling-apparmor} -如果您不希望 AppArmor 在集群上可用,可以通过命令行标志禁用它: +如果你不希望 AppArmor 在集群上可用,可以通过命令行标志禁用它: ``` --feature-gates=AppArmor=false ``` - -禁用时,任何包含 AppArmor 配置文件的 Pod 都将因 "Forbidden" 错误而导致验证失败。注意,默认情况下,docker 总是在非特权 pods 上启用 "docker-default" 配置文件(如果 AppArmor 内核模块已启用),并且即使功能门已禁用,也将继续启用该配置文件。当 AppArmor 应用于通用(GA)时,禁用 Apparmor 的选项将被删除。 +availability (GA). +--> +禁用时,任何包含 AppArmor 配置文件的 Pod 都将导致验证失败,且返回 “Forbidden” 错误。 +注意,默认情况下,docker 总是在非特权 Pod 上启用 “docker-default” 配置文件(如果 AppArmor 内核模块已启用), +并且即使特性门控已禁用,也将继续启用该配置文件。 +当 AppArmor 升级到正式发布(GA)阶段时,禁用 Apparmor 的选项将被删除。 ### 使用 AppArmor 升级到 Kubernetes v1.4 - -不需要对 AppArmor 执行任何操作即可将集群升级到 v1.4。但是,如果任何现有的 pods 有一个 AppArmor 注释,它们将不会通过验证(或 PodSecurityPolicy 认证)。如果节点上加载了许可配置文件,恶意用户可以预先应用许可配置文件,将 pod 权限提升到 docker-default 权限之上。如果存在这个问题,建议清除包含 `apparmor.security.beta.kubernetes.io` 注释的任何 pods 的集群。 +`apparmor.security.beta.kubernetes.io`. +--> +不需要对 AppArmor 执行任何操作即可将集群升级到 v1.4。但是, +如果任何现有的 Pod 有一个 AppArmor 注解, +它们将无法通过合法性检查(或 PodSecurityPolicy 准入控制)。 +如果节点上加载了宽松的配置文件,恶意用户可以预先应用宽松的配置文件, +将 Pod 权限提升到 docker-default 权限之上。 +如果存在这个问题,建议清除集群中包含 `apparmor.security.beta.kubernetes.io` 注解的所有 Pod。 -### 升级到一般可用性的途径 +### 升级到正式发布的途径 {#upgrade-path-to-general-availability} - -当 Apparmor 准备升级到通用(GA)时,当前指定的选项通过注释将转换为字段。通过转换支持所有升级和降级路径是非常微妙的,并将在转换发生时详细解释。我们将承诺在至少两个版本中同时支持字段和注释,并在之后的至少两个版本中显式拒绝注释。 +explicitly reject the annotations for at least 2 releases after that. +--> +当 Apparmor 准备升级到正式发布(GA)状态时,当前通过注解指定的选项将转换为字段。 +通过转换支持所有升级和降级路径是非常微妙的,并将在转换发生时详细解释。 +我们将承诺在至少两个发行版本中同时支持字段和注解,并在之后的至少两个版本中显式拒绝注解。 -## 编写配置文件 +## 编写配置文件 {#authoring-profiles} - -获得正确指定的 AppArmor 配置文件可能是一件棘手的事情。幸运的是,有一些工具可以帮助您做到这一点: + +获得正确指定的 AppArmor 配置文件可能是一件棘手的事情。幸运的是,有一些工具可以帮助你做到这一点: - -* `aa-genprof` and `aa-logprof` 通过监视应用程序的活动和日志并承认它所采取的操作来生成配置文件规则。更多说明由[AppArmor 文档](https://gitlab.com/apparmor/apparmor/wikis/Profiling_with_tools)提供。 -* [bane](https://github.com/jfrazelle/bane)是一个用于 Docker的 AppArmor 档案生成器,它使用简化的档案语言。 + simplified profile language. +--> +* `aa-genprof` 和 `aa-logprof` + 通过监视应用程序的活动和日志并准许它所执行的操作来生成配置文件规则。 + [AppArmor 文档](https://gitlab.com/apparmor/apparmor/wikis/Profiling_with_tools)提供了进一步的指导。 +* [bane](https://github.com/jfrazelle/bane) + 是一个用于 Docker的 AppArmor 配置文件生成器,它使用一种简化的画像语言(profile language) - -建议在开发工作站上通过 Docker 运行应用程序以生成配置文件,但是没有什么可以阻止在运行 Pod 的 Kubernetes 节点上运行工具。 +Pod is running. +--> +建议在开发工作站上通过 Docker 运行应用程序以生成配置文件, +不过在运行 Pod 的 Kubernetes 节点上运行这些工具也是可以的。 - -想要调试 AppArmor 的问题,您可以检查系统日志,查看具体拒绝了什么。AppArmor 将详细消息记录到 `dmesg` ,错误通常可以在系统日志中或通过 `journalctl` 找到。更多详细信息见[AppArmor 失败](https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Failures)。 +[AppArmor failures](https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Failures). +--> +想要调试 AppArmor 的问题,你可以检查系统日志,查看具体拒绝了什么。 +AppArmor 将详细消息记录到 `dmesg`, +错误通常可以在系统日志中或通过 `journalctl` 找到。 +更多详细信息见 [AppArmor 失败](https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Failures)。 -## API 参考 +## API 参考 {#api-reference} -### Pod 注释 +### Pod 注解 {#pod-annotation} 指定容器将使用的配置文件: - -- **key**: `container.apparmor.security.beta.kubernetes.io/` 中的 `` 匹配 Pod 中的容器名称。 +- **value**: a profile reference, described below +--> +- **键名**: `container.apparmor.security.beta.kubernetes.io/` + ,其中 `` 与 Pod 中某容器的名称匹配。 可以为 Pod 中的每个容器指定单独的配置文件。 -- **value**: 配置文件参考,如下所述 +- **键值**: 对配置文件的引用,如下所述 -### 配置文件参考 +### 配置文件引用 {#profile-reference} - +- `unconfined`: This effectively disables AppArmor on the container. +--> - `runtime/default`: 指默认运行时配置文件。 - - 等同于不指定配置文件(没有 PodSecurityPolicy 默认值),除非它仍然需要启用 AppArmor。 - - 对于 Docker,这将解析为非特权容器的[`Docker default`](https://docs.docker.com/engine/security/apparmor/)配置文件,特权容器的配置文件为未定义(无配置文件)。 -- `localhost/`: 指按名称加载到节点(localhost)上的配置文件。 - - 可能的配置文件名在 [核心策略参考](https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference#profile-names-and-attachment-specifications)。 -- `unconfined`: 这有效地禁用了容器上的 AppArmor 。 + - 等同于不指定配置文件(没有 PodSecurityPolicy 默认值),只是它仍然需要启用 AppArmor。 + - 对于 Docker,针对非特权容器时解析为 + [`Docker default`](https://docs.docker.com/engine/security/apparmor/) 配置文件, + 针对特权容器时解析为 unconfined(无配置文件)。 +- `localhost/`: 按名称引用加载到节点(localhost)上的配置文件。 + - 可能的配置文件名在[核心策略参考](https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference#profile-names-and-attachment-specifications)。 +- `unconfined`: 这相当于为容器禁用 AppArmor。 任何其他配置文件引用格式无效。 -### PodSecurityPolicy 注解 +### PodSecurityPolicy 注解 {#podsecuritypolicy-annotations} 指定在未提供容器时应用于容器的默认配置文件: - + +* **键名**: `apparmor.security.beta.kubernetes.io/defaultProfileName` +* **键值**: 如上述文件参考所述 -上面描述的指定配置文件, Pod 容器列表的配置文件引用允许指定: +上面描述的指定配置文件,Pod 容器列表的配置文件引用允许指定: - -* **key**: `apparmor.security.beta.kubernetes.io/allowedProfileNames` -* **value**: 配置文件引用的逗号分隔列表(如上所述) + allowed here. +--> +* **键名**: `apparmor.security.beta.kubernetes.io/allowedProfileNames` +* **键值**: 配置文件引用的逗号分隔列表(如上所述) - 尽管转义逗号是配置文件名中的合法字符,但此处不能显式允许。 - - ## {{% heading "whatsnext" %}} - -其他资源 +其他资源: - + * [Apparmor 配置文件语言快速指南](https://gitlab.com/apparmor/apparmor/wikis/QuickProfileLanguage) * [Apparmor 核心策略参考](https://gitlab.com/apparmor/apparmor/wikis/Policy_Layout) - - diff --git a/content/zh/docs/tutorials/stateful-application/zookeeper.md b/content/zh/docs/tutorials/stateful-application/zookeeper.md index 7f3a0e9548..afde43615a 100644 --- a/content/zh/docs/tutorials/stateful-application/zookeeper.md +++ b/content/zh/docs/tutorials/stateful-application/zookeeper.md @@ -215,7 +215,7 @@ The StatefulSet controller creates three Pods, and each Pod has a container with a [ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) server. --> StatefulSet 控制器创建 3 个 Pods,每个 Pod 包含一个 -[ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) 服务器。 +[ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) 服务容器。 -当 `zk` StatefulSet 中的一个 Pod 被(重新)调度时,它总是拥有相同的 PersistentVolume, +当 `zk` `StatefulSet` 中的一个 Pod 被(重新)调度时,它总是拥有相同的 PersistentVolume, 挂载到 ZooKeeper 服务器的数据目录。 即使在 Pods 被重新调度时,所有对 ZooKeeper 服务器的 WALs 的写入和它们的 全部快照都仍然是持久的。 @@ -1110,17 +1110,17 @@ The Pod `template` for the `zk` `StatefulSet` specifies a liveness probe. 许多场景下,一个系统进程可以是活动状态但不响应请求,或者是不健康状态。 你应该使用存活性探针来通知 Kubernetes 你的应用进程处于不健康状态,需要被重启。 -`zk` StatefulSet 的 Pod 的 `template` 一节指定了一个存活探针。 +`zk` `StatefulSet` 的 Pod 的 `template` 一节指定了一个存活探针。 ```yaml - livenessProbe: - exec: - command: - - sh - - -c - - "zookeeper-ready 2181" - initialDelaySeconds: 15 - timeoutSeconds: 5 + livenessProbe: + exec: + command: + - sh + - -c + - "zookeeper-ready 2181" + initialDelaySeconds: 15 + timeoutSeconds: 5 ``` -默认情况下,Kubernetes 可以把 StatefulSet 的 Pods 部署在相同节点上。 +默认情况下,Kubernetes 可以把 `StatefulSet` 的 Pods 部署在相同节点上。 对于你创建的 3 个服务器的 ensemble 来说,如果有两个服务器并存于 相同的节点上并且该节点发生故障时,ZooKeeper 服务将中断, 直至至少一个 Pods 被重新调度。 @@ -1268,7 +1268,7 @@ Use the command below to get the nodes for Pods in the `zk` `StatefulSet`. ZooKeeper 服务器为止。 但是,如果希望你的服务在容忍节点故障时无停服时间,你应该设置 `podAntiAffinity`。 -获取 `zk` Stateful Set 中的 Pods 的节点。 +使用下面的命令获取 `zk` `StatefulSet` 中的 Pods 的节点。 ```shell for i in 0 1 2; do kubectl get pod zk-$i --template {{.spec.nodeName}}; echo ""; done @@ -1450,7 +1450,7 @@ zk-0 1/1 Running 0 1m Keep watching the `StatefulSet`'s Pods in the first terminal and drain the node on which `zk-1` is scheduled. --> -在第一个终端中持续观察 StatefulSet 的 Pods 并腾空 `zk-1` 调度所在的节点。 +在第一个终端中持续观察 `StatefulSet` 的 Pods 并腾空 `zk-1` 调度所在的节点。 ```shell kubectl drain $(kubectl get pod zk-1 --template {{.spec.nodeName}}) --ignore-daemonsets --force -delete-emptydir-data "kubernetes-node-ixsl" cordoned @@ -1467,7 +1467,7 @@ The `zk-1` Pod cannot be scheduled because the `zk` `StatefulSet` contains a `Po co-location of the Pods, and as only two nodes are schedulable, the Pod will remain in a Pending state. --> `zk-1` Pod 不能被调度,这是因为 `zk` `StatefulSet` 包含了一个防止 Pods -共存的 PodAntiAffinity 规则,而且只有两个节点可用于调度, +共存的 `PodAntiAffinity` 规则,而且只有两个节点可用于调度, 这个 Pod 将保持在 Pending 状态。 ```shell @@ -1498,7 +1498,7 @@ zk-1 0/1 Pending 0 0s ``` 继续观察 StatefulSet 中的 Pods 并腾空 `zk-2` 调度所在的节点。 @@ -1522,7 +1522,7 @@ You cannot drain the third node because evicting `zk-2` would violate `zk-budget Use `zkCli.sh` to retrieve the value you entered during the sanity test from `zk-0`. --> -使用 `CRTL-C` 终止 kubectl。 +使用 `CTRL-C` 终止 kubectl。 你不能腾空第三个节点,因为驱逐 `zk-2` 将和 `zk-budget` 冲突。 然而这个节点仍然处于隔离状态(Cordoned)。 @@ -1536,7 +1536,7 @@ kubectl exec zk-0 zkCli.sh get /hello -由于遵守了 PodDisruptionBudget,服务仍然可用。 +由于遵守了 `PodDisruptionBudget`,服务仍然可用。 ``` WatchedEvent state:SyncConnected type:None path:null diff --git a/content/zh/examples/application/job/cronjob.yaml b/content/zh/examples/application/job/cronjob.yaml index da905a9048..9f06ca7bd6 100644 --- a/content/zh/examples/application/job/cronjob.yaml +++ b/content/zh/examples/application/job/cronjob.yaml @@ -3,7 +3,7 @@ kind: CronJob metadata: name: hello spec: - schedule: "*/1 * * * *" + schedule: "* * * * *" jobTemplate: spec: template: diff --git a/data/i18n/en/en.toml b/data/i18n/en/en.toml index 30f804cb5c..a4b0125e67 100644 --- a/data/i18n/en/en.toml +++ b/data/i18n/en/en.toml @@ -206,10 +206,7 @@ other = "Objectives" other = "Options" [outdated_blog__message] -other = "The Kubernetes project considers this article to be outdated because it is more than one year old. Check that the information in the page has not become incorrect since its publication." - -[outdated_blog__title] -other = "Outdated article" +other = "This article is more than one year old. Older articles may contain outdated content. Check that the information in the page has not become incorrect since its publication." [post_create_issue] other = "Create an issue" diff --git a/layouts/partials/deprecation-warning.html b/layouts/partials/deprecation-warning.html index 449501e582..588a1cad9f 100644 --- a/layouts/partials/deprecation-warning.html +++ b/layouts/partials/deprecation-warning.html @@ -9,10 +9,9 @@

-{{ else if and (eq .Section "blog") .Date (.Date.Before (now.AddDate -1 0 0)) -}} +{{ else if and (eq .Section "blog") (not .Params.evergreen) .Date (.Date.Before (now.AddDate -1 0 0)) -}}
-

{{ T "outdated_blog__title" }}

{{ T "outdated_blog__message" }}