Merge pull request #34966 from krol3/merged-main-dev-1.25
Sync main branch into dev-1.25
This commit is contained in:
@@ -43,12 +43,12 @@ Kubernetes is open source giving you the freedom to take advantage of on-premise
|
||||
<button id="desktopShowVideoButton" onclick="kub.showVideo()">Watch Video</button>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-europe-2022/?utm_source=kubernetes.io&utm_medium=nav&utm_campaign=kccnceu22" button id="desktopKCButton">Attend KubeCon Europe on May 17-20, 2022</a>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/?utm_source=kubernetes.io&utm_medium=nav&utm_campaign=kccncna22" button id="desktopKCButton">Attend KubeCon North America on October 24-28, 2022</a>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-europe-2023/?utm_source=kubernetes.io&utm_medium=nav&utm_campaign=kccnceu23" button id="desktopKCButton">Attend KubeCon Europe on April 17-21, 2023</a>
|
||||
</div>
|
||||
<div id="videoPlayer">
|
||||
<iframe data-url="https://www.youtube.com/embed/H06qrNmGqyE?autoplay=1" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
layout: blog
|
||||
title: "Meet Our Contributors - APAC (India region)"
|
||||
date: 2022-01-10T12:00:00+0000
|
||||
date: 2022-01-10
|
||||
slug: meet-our-contributors-india-ep-01
|
||||
canonicalUrl: https://kubernetes.dev/blog/2022/01/10/meet-our-contributors-india-ep-01/
|
||||
canonicalUrl: https://www.kubernetes.dev/blog/2022/01/10/meet-our-contributors-india-ep-01/
|
||||
---
|
||||
|
||||
**Authors & Interviewers:** [Anubhav Vardhan](https://github.com/anubha-v-ardhan), [Atharva Shinde](https://github.com/Atharva-Shinde), [Avinesh Tripathi](https://github.com/AvineshTripathi), [Debabrata Panigrahi](https://github.com/Debanitrkl), [Kunal Verma](https://github.com/verma-kunal), [Pranshu Srivastava](https://github.com/PranshuSrivastava), [Pritish Samal](https://github.com/CIPHERTron), [Purneswar Prasad](https://github.com/PurneswarPrasad), [Vedant Kakde](https://github.com/vedant-kakde)
|
||||
@@ -19,7 +19,7 @@ Welcome to the first episode of the APAC edition of the "Meet Our Contributors"
|
||||
|
||||
In this post, we'll introduce you to five amazing folks from the India region who have been actively contributing to the upstream Kubernetes projects in a variety of ways, as well as being the leaders or maintainers of numerous community initiatives.
|
||||
|
||||
💫 *Let's get started, so without further ado…*
|
||||
💫 *Let's get started, so without further ado…*
|
||||
|
||||
|
||||
## [Arsh Sharma](https://github.com/RinkiyaKeDad)
|
||||
@@ -39,7 +39,7 @@ To the newcomers, Arsh helps plan their early contributions sustainably.
|
||||
|
||||
Kunal Kushwaha is a core member of the Kubernetes marketing council. He is also a CNCF ambassador and one of the founders of the [CNCF Students Program](https://community.cncf.io/cloud-native-students/).. He also served as a Communications role shadow during the 1.22 release cycle.
|
||||
|
||||
At the end of his first year, Kunal began contributing to the [fabric8io kubernetes-client](https://github.com/fabric8io/kubernetes-client) project. He was then selected to work on the same project as part of Google Summer of Code. Kunal mentored people on the same project, first through Google Summer of Code then through Google Code-in.
|
||||
At the end of his first year, Kunal began contributing to the [fabric8io kubernetes-client](https://github.com/fabric8io/kubernetes-client) project. He was then selected to work on the same project as part of Google Summer of Code. Kunal mentored people on the same project, first through Google Summer of Code then through Google Code-in.
|
||||
|
||||
As an open-source enthusiast, he believes that diverse participation in the community is beneficial since it introduces new perspectives and opinions and respect for one's peers. He has worked on various open-source projects, and his participation in communities has considerably assisted his development as a developer.
|
||||
|
||||
@@ -103,4 +103,3 @@ If you have any recommendations/suggestions for who we should interview next, pl
|
||||
|
||||
|
||||
We'll see you all in the next one. Everyone, till then, have a happy contributing! 👋
|
||||
|
||||
|
||||
+2
-8
@@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: blog
|
||||
title: "Meet Our Contributors - APAC (Aus-NZ region)"
|
||||
date: 2022-03-16T12:00:00+0000
|
||||
date: 2022-03-16
|
||||
slug: meet-our-contributors-au-nz-ep-02
|
||||
canonicalUrl: https://www.kubernetes.dev/blog/2022/03/14/meet-our-contributors-au-nz-ep-02/
|
||||
---
|
||||
@@ -60,19 +60,13 @@ Nick Young works at VMware as a technical lead for Contour, a CNCF ingress contr
|
||||
|
||||
His contribution path was notable in that he began working on major areas of the Kubernetes project early on, skewing his trajectory.
|
||||
|
||||
He asserts the best thing a new contributor can do is to "start contributing". Naturally, if it is relevant to their employment, that is excellent; however, investing non-work time in contributing can pay off in the long run in terms of work. He believes that new contributors, particularly those who are currently Kubernetes users, should be encouraged to participate in higher-level project discussions.
|
||||
He asserts the best thing a new contributor can do is to "start contributing". Naturally, if it is relevant to their employment, that is excellent; however, investing non-work time in contributing can pay off in the long run in terms of work. He believes that new contributors, particularly those who are currently Kubernetes users, should be encouraged to participate in higher-level project discussions.
|
||||
|
||||
> _Just being active and contributing will get you a long way. Once you've been active for a while, you'll find that you're able to answer questions, which will mean you're asked questions, and before you know it you are an expert._
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
If you have any recommendations/suggestions for who we should interview next, please let us know in #sig-contribex. Your suggestions would be much appreciated. We're thrilled to have additional folks assisting us in reaching out to even more wonderful individuals of the community.
|
||||
|
||||
|
||||
We'll see you all in the next one. Everyone, till then, have a happy contributing! 👋
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ are allowed.
|
||||
Nodes should be provisioned with the public root certificate for the cluster such that they can
|
||||
connect securely to the API server along with valid client credentials. A good approach is that the
|
||||
client credentials provided to the kubelet are in the form of a client certificate. See
|
||||
[kubelet TLS bootstrapping](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
|
||||
[kubelet TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
|
||||
for automated provisioning of kubelet client certificates.
|
||||
|
||||
Pods that wish to connect to the API server can do so securely by leveraging a service account so
|
||||
|
||||
@@ -479,29 +479,24 @@ these pods will be stuck in terminating status on the shutdown node forever.
|
||||
To mitigate the above situation, a user can manually add the taint `node
|
||||
kubernetes.io/out-of-service` with either `NoExecute` or `NoSchedule` effect to
|
||||
a Node marking it out-of-service.
|
||||
If the `NodeOutOfServiceVolumeDetach` [feature gate](/docs/reference/
|
||||
command-line-tools-reference/feature-gates/) is enabled on
|
||||
`kube-controller-manager`, and a Node is marked out-of-service with this taint, the
|
||||
pods on the node will be forcefully deleted if there are no matching tolerations on
|
||||
it and volume detach operations for the pods terminating on the node will happen
|
||||
immediately. This allows the Pods on the out-of-service node to recover quickly on a
|
||||
different node.
|
||||
If the `NodeOutOfServiceVolumeDetach`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
is enabled on `kube-controller-manager`, and a Node is marked out-of-service with this taint, the
|
||||
pods on the node will be forcefully deleted if there are no matching tolerations on it and volume
|
||||
detach operations for the pods terminating on the node will happen immediately. This allows the
|
||||
Pods on the out-of-service node to recover quickly on a different node.
|
||||
|
||||
During a non-graceful shutdown, Pods are terminated in the two phases:
|
||||
|
||||
1. Force delete the Pods that do not have matching `out-of-service` tolerations.
|
||||
2. Immediately perform detach volume operation for such pods.
|
||||
|
||||
|
||||
{{< note >}}
|
||||
- Before adding the taint `node.kubernetes.io/out-of-service` , it should be verified
|
||||
that the node is already in shutdown or power off state (not in the middle of
|
||||
restarting).
|
||||
that the node is already in shutdown or power off state (not in the middle of
|
||||
restarting).
|
||||
- The user is required to manually remove the out-of-service taint after the pods are
|
||||
moved to a new node and the user has checked that the shutdown node has been
|
||||
recovered since the user was the one who originally added the taint.
|
||||
|
||||
|
||||
moved to a new node and the user has checked that the shutdown node has been
|
||||
recovered since the user was the one who originally added the taint.
|
||||
{{< /note >}}
|
||||
|
||||
### Pod Priority based graceful node shutdown {#pod-priority-graceful-node-shutdown}
|
||||
|
||||
@@ -11,31 +11,37 @@ no_list: true
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
The cluster administration overview is for anyone creating or administering a Kubernetes cluster.
|
||||
It assumes some familiarity with core Kubernetes [concepts](/docs/concepts/).
|
||||
|
||||
|
||||
<!-- body -->
|
||||
|
||||
## Planning a cluster
|
||||
|
||||
See the guides in [Setup](/docs/setup/) for examples of how to plan, set up, and configure Kubernetes clusters. The solutions listed in this article are called *distros*.
|
||||
See the guides in [Setup](/docs/setup/) for examples of how to plan, set up, and configure
|
||||
Kubernetes clusters. The solutions listed in this article are called *distros*.
|
||||
|
||||
{{< note >}}
|
||||
Not all distros are actively maintained. Choose distros which have been tested with a recent version of Kubernetes.
|
||||
{{< /note >}}
|
||||
{{< note >}}
|
||||
Not all distros are actively maintained. Choose distros which have been tested with a recent
|
||||
version of Kubernetes.
|
||||
{{< /note >}}
|
||||
|
||||
Before choosing a guide, here are some considerations:
|
||||
|
||||
- Do you want to try out Kubernetes on your computer, or do you want to build a high-availability, multi-node cluster? Choose distros best suited for your needs.
|
||||
- Will you be using **a hosted Kubernetes cluster**, such as [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/), or **hosting your own cluster**?
|
||||
- Will your cluster be **on-premises**, or **in the cloud (IaaS)**? Kubernetes does not directly support hybrid clusters. Instead, you can set up multiple clusters.
|
||||
- **If you are configuring Kubernetes on-premises**, consider which [networking model](/docs/concepts/cluster-administration/networking/) fits best.
|
||||
- Will you be running Kubernetes on **"bare metal" hardware** or on **virtual machines (VMs)**?
|
||||
- Do you **want to run a cluster**, or do you expect to do **active development of Kubernetes project code**? If the
|
||||
latter, choose an actively-developed distro. Some distros only use binary releases, but
|
||||
offer a greater variety of choices.
|
||||
- Familiarize yourself with the [components](/docs/concepts/overview/components/) needed to run a cluster.
|
||||
|
||||
- Do you want to try out Kubernetes on your computer, or do you want to build a high-availability,
|
||||
multi-node cluster? Choose distros best suited for your needs.
|
||||
- Will you be using **a hosted Kubernetes cluster**, such as
|
||||
[Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/), or **hosting your own cluster**?
|
||||
- Will your cluster be **on-premises**, or **in the cloud (IaaS)**? Kubernetes does not directly
|
||||
support hybrid clusters. Instead, you can set up multiple clusters.
|
||||
- **If you are configuring Kubernetes on-premises**, consider which
|
||||
[networking model](/docs/concepts/cluster-administration/networking/) fits best.
|
||||
- Will you be running Kubernetes on **"bare metal" hardware** or on **virtual machines (VMs)**?
|
||||
- Do you **want to run a cluster**, or do you expect to do **active development of Kubernetes project code**?
|
||||
If the latter, choose an actively-developed distro. Some distros only use binary releases, but
|
||||
offer a greater variety of choices.
|
||||
- Familiarize yourself with the [components](/docs/concepts/overview/components/) needed to run a cluster.
|
||||
|
||||
## Managing a cluster
|
||||
|
||||
@@ -45,29 +51,43 @@ Before choosing a guide, here are some considerations:
|
||||
|
||||
## Securing a cluster
|
||||
|
||||
* [Generate Certificates](/docs/tasks/administer-cluster/certificates/) describes the steps to generate certificates using different tool chains.
|
||||
* [Generate Certificates](/docs/tasks/administer-cluster/certificates/) describes the steps to
|
||||
generate certificates using different tool chains.
|
||||
|
||||
* [Kubernetes Container Environment](/docs/concepts/containers/container-environment/) describes the environment for Kubelet managed containers on a Kubernetes node.
|
||||
* [Kubernetes Container Environment](/docs/concepts/containers/container-environment/) describes
|
||||
the environment for Kubelet managed containers on a Kubernetes node.
|
||||
|
||||
* [Controlling Access to the Kubernetes API](/docs/concepts/security/controlling-access) describes how Kubernetes implements access control for its own API.
|
||||
* [Controlling Access to the Kubernetes API](/docs/concepts/security/controlling-access) describes
|
||||
how Kubernetes implements access control for its own API.
|
||||
|
||||
* [Authenticating](/docs/reference/access-authn-authz/authentication/) explains authentication in Kubernetes, including the various authentication options.
|
||||
* [Authenticating](/docs/reference/access-authn-authz/authentication/) explains authentication in
|
||||
Kubernetes, including the various authentication options.
|
||||
|
||||
* [Authorization](/docs/reference/access-authn-authz/authorization/) is separate from authentication, and controls how HTTP calls are handled.
|
||||
* [Authorization](/docs/reference/access-authn-authz/authorization/) is separate from
|
||||
authentication, and controls how HTTP calls are handled.
|
||||
|
||||
* [Using Admission Controllers](/docs/reference/access-authn-authz/admission-controllers/) explains plug-ins which intercepts requests to the Kubernetes API server after authentication and authorization.
|
||||
* [Using Admission Controllers](/docs/reference/access-authn-authz/admission-controllers/)
|
||||
explains plug-ins which intercepts requests to the Kubernetes API server after authentication
|
||||
and authorization.
|
||||
|
||||
* [Using Sysctls in a Kubernetes Cluster](/docs/tasks/administer-cluster/sysctl-cluster/) describes to an administrator how to use the `sysctl` command-line tool to set kernel parameters .
|
||||
* [Using Sysctls in a Kubernetes Cluster](/docs/tasks/administer-cluster/sysctl-cluster/)
|
||||
describes to an administrator how to use the `sysctl` command-line tool to set kernel parameters
|
||||
.
|
||||
|
||||
* [Auditing](/docs/tasks/debug/debug-cluster/audit/) describes how to interact with Kubernetes' audit logs.
|
||||
* [Auditing](/docs/tasks/debug/debug-cluster/audit/) describes how to interact with Kubernetes'
|
||||
audit logs.
|
||||
|
||||
### Securing the kubelet
|
||||
* [Control Plane-Node communication](/docs/concepts/architecture/control-plane-node-communication/)
|
||||
* [TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
|
||||
* [Kubelet authentication/authorization](/docs/reference/acess-authn-authz/kubelet-authn-authz/)
|
||||
|
||||
* [Control Plane-Node communication](/docs/concepts/architecture/control-plane-node-communication/)
|
||||
* [TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
|
||||
* [Kubelet authentication/authorization](/docs/reference/access-authn-authz/kubelet-authn-authz/)
|
||||
|
||||
## Optional Cluster Services
|
||||
|
||||
* [DNS Integration](/docs/concepts/services-networking/dns-pod-service/) describes how to resolve a DNS name directly to a Kubernetes service.
|
||||
* [DNS Integration](/docs/concepts/services-networking/dns-pod-service/) describes how to resolve
|
||||
a DNS name directly to a Kubernetes service.
|
||||
|
||||
* [Logging and Monitoring Cluster Activity](/docs/concepts/cluster-administration/logging/)
|
||||
explains how logging in Kubernetes works and how to implement it.
|
||||
|
||||
* [Logging and Monitoring Cluster Activity](/docs/concepts/cluster-administration/logging/) explains how logging in Kubernetes works and how to implement it.
|
||||
|
||||
@@ -8,21 +8,29 @@ card:
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
This page explains how Kubernetes objects are represented in the Kubernetes API, and how you can express them in `.yaml` format.
|
||||
|
||||
This page explains how Kubernetes objects are represented in the Kubernetes API, and how you can
|
||||
express them in `.yaml` format.
|
||||
|
||||
<!-- body -->
|
||||
## Understanding Kubernetes objects {#kubernetes-objects}
|
||||
|
||||
*Kubernetes objects* are persistent entities in the Kubernetes system. Kubernetes uses these entities to represent the state of your cluster. Specifically, they can describe:
|
||||
*Kubernetes objects* are persistent entities in the Kubernetes system. Kubernetes uses these
|
||||
entities to represent the state of your cluster. Specifically, they can describe:
|
||||
|
||||
* What containerized applications are running (and on which nodes)
|
||||
* The resources available to those applications
|
||||
* The policies around how those applications behave, such as restart policies, upgrades, and fault-tolerance
|
||||
|
||||
A Kubernetes object is a "record of intent"--once you create the object, the Kubernetes system will constantly work to ensure that object exists. By creating an object, you're effectively telling the Kubernetes system what you want your cluster's workload to look like; this is your cluster's *desired state*.
|
||||
A Kubernetes object is a "record of intent"--once you create the object, the Kubernetes system
|
||||
will constantly work to ensure that object exists. By creating an object, you're effectively
|
||||
telling the Kubernetes system what you want your cluster's workload to look like; this is your
|
||||
cluster's *desired state*.
|
||||
|
||||
To work with Kubernetes objects--whether to create, modify, or delete them--you'll need to use the [Kubernetes API](/docs/concepts/overview/kubernetes-api/). When you use the `kubectl` command-line interface, for example, the CLI makes the necessary Kubernetes API calls for you. You can also use the Kubernetes API directly in your own programs using one of the [Client Libraries](/docs/reference/using-api/client-libraries/).
|
||||
To work with Kubernetes objects--whether to create, modify, or delete them--you'll need to use the
|
||||
[Kubernetes API](/docs/concepts/overview/kubernetes-api/). When you use the `kubectl` command-line
|
||||
interface, for example, the CLI makes the necessary Kubernetes API calls for you. You can also use
|
||||
the Kubernetes API directly in your own programs using one of the
|
||||
[Client Libraries](/docs/reference/using-api/client-libraries/).
|
||||
|
||||
### Object Spec and Status
|
||||
|
||||
@@ -48,11 +56,17 @@ the status to match your spec. If any of those instances should fail
|
||||
between spec and status by making a correction--in this case, starting
|
||||
a replacement instance.
|
||||
|
||||
For more information on the object spec, status, and metadata, see the [Kubernetes API Conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md).
|
||||
For more information on the object spec, status, and metadata, see the
|
||||
[Kubernetes API Conventions](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md).
|
||||
|
||||
### Describing a Kubernetes object
|
||||
|
||||
When you create an object in Kubernetes, you must provide the object spec that describes its desired state, as well as some basic information about the object (such as a name). When you use the Kubernetes API to create the object (either directly or via `kubectl`), that API request must include that information as JSON in the request body. **Most often, you provide the information to `kubectl` in a .yaml file.** `kubectl` converts the information to JSON when making the API request.
|
||||
When you create an object in Kubernetes, you must provide the object spec that describes its
|
||||
desired state, as well as some basic information about the object (such as a name). When you use
|
||||
the Kubernetes API to create the object (either directly or via `kubectl`), that API request must
|
||||
include that information as JSON in the request body. **Most often, you provide the information to
|
||||
`kubectl` in a .yaml file.** `kubectl` converts the information to JSON when making the API
|
||||
request.
|
||||
|
||||
Here's an example `.yaml` file that shows the required fields and object spec for a Kubernetes Deployment:
|
||||
|
||||
@@ -81,7 +95,9 @@ In the `.yaml` file for the Kubernetes object you want to create, you'll need to
|
||||
* `metadata` - Data that helps uniquely identify the object, including a `name` string, `UID`, and optional `namespace`
|
||||
* `spec` - What state you desire for the object
|
||||
|
||||
The precise format of the object `spec` is different for every Kubernetes object, and contains nested fields specific to that object. The [Kubernetes API Reference](/docs/reference/kubernetes-api/) can help you find the spec format for all of the objects you can create using Kubernetes.
|
||||
The precise format of the object `spec` is different for every Kubernetes object, and contains
|
||||
nested fields specific to that object. The [Kubernetes API Reference](/docs/reference/kubernetes-api/)
|
||||
can help you find the spec format for all of the objects you can create using Kubernetes.
|
||||
|
||||
For example, see the [`spec` field](/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec)
|
||||
for the Pod API reference.
|
||||
@@ -103,5 +119,3 @@ detail the structure of that `.status` field, and its content for each different
|
||||
* Learn about [controllers](/docs/concepts/architecture/controller/) in Kubernetes.
|
||||
* [Using the Kubernetes API](/docs/reference/using-api/) explains some more API concepts.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -169,9 +169,9 @@ Disadvantages compared to imperative object configuration:
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
- [Managing Kubernetes Objects Using Imperative Commands](/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
- [Managing Kubernetes Objects Using Object Configuration (Imperative)](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
- [Managing Kubernetes Objects Using Object Configuration (Declarative)](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
- [Managing Kubernetes Objects Using Kustomize (Declarative)](/docs/tasks/manage-kubernetes-objects/kustomization/)
|
||||
- [Imperative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
- [Declarative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
- [Declarative Management of Kubernetes Objects Using Kustomize](/docs/tasks/manage-kubernetes-objects/kustomization/)
|
||||
- [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
- [Kubectl Book](https://kubectl.docs.kubernetes.io)
|
||||
- [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
|
||||
@@ -66,8 +66,8 @@ the signal.
|
||||
|
||||
The value for `memory.available` is derived from the cgroupfs instead of tools
|
||||
like `free -m`. This is important because `free -m` does not work in a
|
||||
container, and if users use the [node
|
||||
allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable) feature, out of resource decisions
|
||||
container, and if users use the [node allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)
|
||||
feature, out of resource decisions
|
||||
are made local to the end user Pod part of the cgroup hierarchy as well as the
|
||||
root node. This [script](/examples/admin/resource/memory-available.sh)
|
||||
reproduces the same set of steps that the kubelet performs to calculate
|
||||
@@ -87,7 +87,8 @@ does not support other configurations.
|
||||
|
||||
{{<note>}}
|
||||
Some kubelet garbage collection features are deprecated in favor of eviction.
|
||||
For a list of the deprecated features, see [kubelet garbage collection deprecation](/docs/concepts/cluster-administration/kubelet-garbage-collection/#deprecation).
|
||||
For a list of the deprecated features, see
|
||||
[kubelet garbage collection deprecation](/docs/concepts/architecture/garbage-collection/#deprecation).
|
||||
{{</note>}}
|
||||
|
||||
### Eviction thresholds
|
||||
|
||||
@@ -15,14 +15,15 @@ is a property of {{< glossary_tooltip text="Pods" term_id="pod" >}} that *attrac
|
||||
a set of {{< glossary_tooltip text="nodes" term_id="node" >}} (either as a preference or a
|
||||
hard requirement). _Taints_ are the opposite -- they allow a node to repel a set of pods.
|
||||
|
||||
_Tolerations_ are applied to pods. Tolerations allow the scheduler to schedule pods with matching taints. Tolerations allow scheduling but don't guarantee scheduling: the scheduler also [evaluates other parameters](/docs/concepts/scheduling-eviction/pod-priority-preemption/) as part of its function.
|
||||
_Tolerations_ are applied to pods. Tolerations allow the scheduler to schedule pods with matching
|
||||
taints. Tolerations allow scheduling but don't guarantee scheduling: the scheduler also
|
||||
[evaluates other parameters](/docs/concepts/scheduling-eviction/pod-priority-preemption/)
|
||||
as part of its function.
|
||||
|
||||
Taints and tolerations work together to ensure that pods are not scheduled
|
||||
onto inappropriate nodes. One or more taints are applied to a node; this
|
||||
marks that the node should not accept any pods that do not tolerate the taints.
|
||||
|
||||
|
||||
|
||||
<!-- body -->
|
||||
|
||||
## Concepts
|
||||
@@ -266,7 +267,8 @@ This ensures that DaemonSet pods are never evicted due to these problems.
|
||||
## Taint Nodes by Condition
|
||||
|
||||
The control plane, using the node {{<glossary_tooltip text="controller" term_id="controller">}},
|
||||
automatically creates taints with a `NoSchedule` effect for [node conditions](/docs/concepts/scheduling-eviction/node-pressure-eviction/#node-conditions).
|
||||
automatically creates taints with a `NoSchedule` effect for
|
||||
[node conditions](/docs/concepts/scheduling-eviction/node-pressure-eviction/#node-conditions).
|
||||
|
||||
The scheduler checks taints, not node conditions, when it makes scheduling
|
||||
decisions. This ensures that node conditions don't directly affect scheduling.
|
||||
@@ -297,7 +299,7 @@ arbitrary tolerations to DaemonSets.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Read about [Node-pressure Eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/) and how you can configure it
|
||||
* Read about [Node-pressure Eviction](/docs/concepts/scheduling-eviction/node-pressure-eviction/)
|
||||
and how you can configure it
|
||||
* Read about [Pod Priority](/docs/concepts/scheduling-eviction/pod-priority-preemption/)
|
||||
|
||||
|
||||
|
||||
@@ -23,10 +23,11 @@ following diagram:
|
||||
|
||||
## Transport security
|
||||
|
||||
In a typical Kubernetes cluster, the API serves on port 443, protected by TLS.
|
||||
By default, the Kubernetes API server listens on port 6443 on the first non-localhost network interface, protected by TLS. In a typical production Kubernetes cluster, the API serves on port 443. The port can be changed with the `--secure-port`, and the listening IP address with the `--bind-address` flag.
|
||||
|
||||
The API server presents a certificate. This certificate may be signed using
|
||||
a private certificate authority (CA), or based on a public key infrastructure linked
|
||||
to a generally recognized CA.
|
||||
to a generally recognized CA. The certificate and corresponding private key can be set by using the `--tls-cert-file` and `--tls-private-key-file` flags.
|
||||
|
||||
If your cluster uses a private certificate authority, you need a copy of that CA
|
||||
certificate configured into your `~/.kube/config` on the client, so that you can
|
||||
@@ -137,34 +138,6 @@ The cluster audits the activities generated by users, by applications that use t
|
||||
|
||||
For more information, see [Auditing](/docs/tasks/debug/debug-cluster/audit/).
|
||||
|
||||
## API server ports and IPs
|
||||
|
||||
The previous discussion applies to requests sent to the secure port of the API server
|
||||
(the typical case). The API server can actually serve on 2 ports:
|
||||
|
||||
By default, the Kubernetes API server serves HTTP on 2 ports:
|
||||
|
||||
1. `localhost` port:
|
||||
|
||||
- is intended for testing and bootstrap, and for other components of the master node
|
||||
(scheduler, controller-manager) to talk to the API
|
||||
- no TLS
|
||||
- default is port 8080
|
||||
- default IP is localhost, change with `--insecure-bind-address` flag.
|
||||
- request **bypasses** authentication and authorization modules.
|
||||
- request handled by admission control module(s).
|
||||
- protected by need to have host access
|
||||
|
||||
2. “Secure port”:
|
||||
|
||||
- use whenever possible
|
||||
- uses TLS. Set cert with `--tls-cert-file` and key with `--tls-private-key-file` flag.
|
||||
- default is port 6443, change with `--secure-port` flag.
|
||||
- default IP is first non-localhost network interface, change with `--bind-address` flag.
|
||||
- request handled by authentication and authorization modules.
|
||||
- request handled by admission control module(s).
|
||||
- authentication and authorization modules run.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
Read more documentation on authentication, authorization and API access control:
|
||||
|
||||
@@ -129,7 +129,7 @@ Namespace management tools may simplify the creation of default or common networ
|
||||
Network policies require a [CNI plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#cni) that supports the implementation of network policies. Otherwise, NetworkPolicy resources will be ignored.
|
||||
{{< /warning >}}
|
||||
|
||||
More advanced network isolation may be provided by service meshes, which provide OSI Layer 7 policies based on workload identity, in addition to namespaces. These higher-level policies can make it easier to manage namespaced based multi-tenancy, especially when multiple namespaces are dedicated to a single tenant. They frequently also offer encryption using mutual TLS, protecting your data even in the presence of a compromised node, and work across dedicated or virtual clusters. However, they can be significantly more complex to manage and may not be appropriate for all users.
|
||||
More advanced network isolation may be provided by service meshes, which provide OSI Layer 7 policies based on workload identity, in addition to namespaces. These higher-level policies can make it easier to manage namespace-based multi-tenancy, especially when multiple namespaces are dedicated to a single tenant. They frequently also offer encryption using mutual TLS, protecting your data even in the presence of a compromised node, and work across dedicated or virtual clusters. However, they can be significantly more complex to manage and may not be appropriate for all users.
|
||||
|
||||
### Storage isolation
|
||||
|
||||
|
||||
@@ -462,11 +462,11 @@ of individual policies are not defined here.
|
||||
{{% thirdparty-content %}}
|
||||
|
||||
Other alternatives for enforcing policies are being developed in the Kubernetes ecosystem, such as:
|
||||
|
||||
- [Kubewarden](https://github.com/kubewarden)
|
||||
- [Kyverno](https://kyverno.io/policies/pod-security/)
|
||||
- [OPA Gatekeeper](https://github.com/open-policy-agent/gatekeeper)
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why isn't there a profile between privileged and baseline?
|
||||
@@ -493,9 +493,9 @@ built-in [Pod Security Admission Controller](/docs/concepts/security/pod-securit
|
||||
### What profiles should I apply to my Windows Pods?
|
||||
|
||||
Windows in Kubernetes has some limitations and differentiators from standard Linux-based
|
||||
workloads. Specifically, many of the Pod SecurityContext fields [have no effect on
|
||||
Windows](/docs/setup/production-environment/windows/intro-windows-in-kubernetes/#v1-podsecuritycontext). As
|
||||
such, no standardized Pod Security profiles currently exist.
|
||||
workloads. Specifically, many of the Pod SecurityContext fields
|
||||
[have no effect on Windows](/docs/concepts/windows/intro/#compatibility-v1-pod-spec-containers-securitycontext).
|
||||
As such, no standardized Pod Security profiles currently exist.
|
||||
|
||||
If you apply the restricted profile for a Windows pod, this **may** have an impact on the pod
|
||||
at runtime. The restricted profile requires enforcing Linux-specific restrictions (such as seccomp
|
||||
@@ -504,7 +504,9 @@ these Linux-specific values, then the Windows pod should still work normally wit
|
||||
profile. However, the lack of enforcement means that there is no additional restriction, for Pods
|
||||
that use Windows containers, compared to the baseline profile.
|
||||
|
||||
The use of the HostProcess flag to create a HostProcess pod should only be done in alignment with the privileged policy. Creation of a Windows HostProcess pod is blocked under the baseline and restricted policies, so any HostProcess pod should be considered privileged.
|
||||
The use of the HostProcess flag to create a HostProcess pod should only be done in alignment with the privileged policy.
|
||||
Creation of a Windows HostProcess pod is blocked under the baseline and restricted policies,
|
||||
so any HostProcess pod should be considered privileged.
|
||||
|
||||
### What about sandboxed Pods?
|
||||
|
||||
@@ -518,3 +520,4 @@ kernel. This allows for workloads requiring heightened permissions to still be i
|
||||
|
||||
Additionally, the protection of sandboxed workloads is highly dependent on the method of
|
||||
sandboxing. As such, no single recommended profile is recommended for all sandboxed workloads.
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ execute their roles. It is important to ensure that, when designing permissions
|
||||
users, the cluster administrator understands the areas where privilge escalation could occur,
|
||||
to reduce the risk of excessive access leading to security incidents.
|
||||
|
||||
The good practices laid out here should be read in conjunction with the general [RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update).
|
||||
The good practices laid out here should be read in conjunction with the general
|
||||
[RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update).
|
||||
|
||||
<!-- body -->
|
||||
|
||||
@@ -34,7 +35,8 @@ some general rules that can be applied are :
|
||||
not just to all object types presently in the cluster, but also to all future object types
|
||||
which are created in the future.
|
||||
- Administrators should not use `cluster-admin` accounts except where specifically needed.
|
||||
Providing a low privileged account with [impersonation rights](/docs/reference/access-authn-authz/authentication/#user-impersonation)
|
||||
Providing a low privileged account with
|
||||
[impersonation rights](/docs/reference/access-authn-authz/authentication/#user-impersonation)
|
||||
can avoid accidental modification of cluster resources.
|
||||
- Avoid adding users to the `system:masters` group. Any user who is a member of this group
|
||||
bypasses all RBAC rights checks and will always have unrestricted superuser access, which cannot be
|
||||
@@ -44,15 +46,17 @@ some general rules that can be applied are :
|
||||
|
||||
### Minimize distribution of privileged tokens
|
||||
|
||||
Ideally, pods shouldn't be assigned service accounts that have been granted powerful permissions (for example, any of the rights listed under
|
||||
[privilege escalation risks](#privilege-escalation-risks)).
|
||||
Ideally, pods shouldn't be assigned service accounts that have been granted powerful permissions
|
||||
(for example, any of the rights listed under [privilege escalation risks](#privilege-escalation-risks)).
|
||||
In cases where a workload requires powerful permissions, consider the following practices:
|
||||
|
||||
- Limit the number of nodes running powerful pods. Ensure that any DaemonSets you run
|
||||
are necessary and are run with least privilege to limit the blast radius of container escapes.
|
||||
- Avoid running powerful pods alongside untrusted or publicly-exposed ones. Consider using
|
||||
[Taints and Toleration](/docs/concepts/scheduling-eviction/taint-and-toleration/), [NodeAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity), or [PodAntiAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity) to ensure
|
||||
pods don't run alongside untrusted or less-trusted Pods. Pay especial attention to
|
||||
[Taints and Toleration](/docs/concepts/scheduling-eviction/taint-and-toleration/),
|
||||
[NodeAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity), or
|
||||
[PodAntiAffinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity)
|
||||
to ensure pods don't run alongside untrusted or less-trusted Pods. Pay especial attention to
|
||||
situations where less-trustworthy Pods are not meeting the **Restricted** Pod Security Standard.
|
||||
|
||||
### Hardening
|
||||
@@ -107,7 +111,7 @@ with the ability to create suitably secure and isolated Pods, you should enforce
|
||||
You can use [Pod Security admission](/docs/concepts/security/pod-security-admission/)
|
||||
or other (third party) mechanisms to implement that enforcement.
|
||||
|
||||
You can also use the deprecated [PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/) mechanism
|
||||
You can also use the deprecated [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) mechanism
|
||||
to restrict users' abilities to create privileged Pods (N.B. PodSecurityPolicy is scheduled for removal
|
||||
in version 1.25).
|
||||
|
||||
@@ -117,7 +121,9 @@ Secrets they would not have through RBAC directly.
|
||||
|
||||
### Persistent volume creation
|
||||
|
||||
As noted in the [PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems) documentation, access to create PersistentVolumes can allow for escalation of access to the underlying host. Where access to persistent storage is required trusted administrators should create
|
||||
As noted in the [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/#volumes-and-file-systems)
|
||||
documentation, access to create PersistentVolumes can allow for escalation of access to the underlying host.
|
||||
Where access to persistent storage is required trusted administrators should create
|
||||
PersistentVolumes, and constrained users should use PersistentVolumeClaims to access that storage.
|
||||
|
||||
### Access to `proxy` subresource of Nodes
|
||||
@@ -130,7 +136,8 @@ granting rights to this resource.
|
||||
### Escalate verb
|
||||
|
||||
Generally the RBAC system prevents users from creating clusterroles with more rights than
|
||||
they possess. The exception to this is the `escalate` verb. As noted in the [RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update),
|
||||
they possess. The exception to this is the `escalate` verb. As noted in the
|
||||
[RBAC documentation](/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update),
|
||||
users with this right can effectively escalate their privileges.
|
||||
|
||||
### Bind verb
|
||||
@@ -173,8 +180,11 @@ objects to create a denial of service condition either based on the size or numb
|
||||
specifically relevant in multi-tenant clusters if semi-trusted or untrusted users
|
||||
are allowed limited access to a system.
|
||||
|
||||
One option for mitigation of this issue would be to use [resource quotas](/docs/concepts/policy/resource-quotas/#object-count-quota)
|
||||
One option for mitigation of this issue would be to use
|
||||
[resource quotas](/docs/concepts/policy/resource-quotas/#object-count-quota)
|
||||
to limit the quantity of objects which can be created.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* To learn more about RBAC, see the [RBAC documentation](/docs/reference/access-authn-authz/rbac/).
|
||||
|
||||
|
||||
@@ -22,34 +22,41 @@ storage (as compared to using tmpfs / in-memory filesystems on Linux). As a clus
|
||||
operator, you should take both of the following additional measures:
|
||||
|
||||
1. Use file ACLs to secure the Secrets' file location.
|
||||
1. Apply volume-level encryption using [BitLocker](https://docs.microsoft.com/windows/security/information-protection/bitlocker/bitlocker-how-to-deploy-on-windows-server).
|
||||
1. Apply volume-level encryption using
|
||||
[BitLocker](https://docs.microsoft.com/windows/security/information-protection/bitlocker/bitlocker-how-to-deploy-on-windows-server).
|
||||
|
||||
## Container users
|
||||
|
||||
[RunAsUsername](/docs/tasks/configure-pod-container/configure-runasusername)
|
||||
can be specified for Windows Pods or containers to execute the container
|
||||
processes as specific user. This is roughly equivalent to
|
||||
[RunAsUser](/docs/concepts/policy/pod-security-policy/#users-and-groups).
|
||||
[RunAsUser](/docs/concepts/security/pod-security-policy/#users-and-groups).
|
||||
|
||||
Windows containers offer two default user accounts, ContainerUser and ContainerAdministrator.
|
||||
The differences between these two user accounts are covered in
|
||||
[When to use ContainerAdmin and ContainerUser user accounts](https://docs.microsoft.com/virtualization/windowscontainers/manage-containers/container-security#when-to-use-containeradmin-and-containeruser-user-accounts) within Microsoft's _Secure Windows containers_ documentation.
|
||||
[When to use ContainerAdmin and ContainerUser user accounts](https://docs.microsoft.com/virtualization/windowscontainers/manage-containers/container-security#when-to-use-containeradmin-and-containeruser-user-accounts)
|
||||
within Microsoft's _Secure Windows containers_ documentation.
|
||||
|
||||
Local users can be added to container images during the container build process.
|
||||
|
||||
{{< note >}}
|
||||
|
||||
* [Nano Server](https://hub.docker.com/_/microsoft-windows-nanoserver) based images run as `ContainerUser` by default
|
||||
* [Server Core](https://hub.docker.com/_/microsoft-windows-servercore) based images run as `ContainerAdministrator` by default
|
||||
* [Nano Server](https://hub.docker.com/_/microsoft-windows-nanoserver) based images run as
|
||||
`ContainerUser` by default
|
||||
* [Server Core](https://hub.docker.com/_/microsoft-windows-servercore) based images run as
|
||||
`ContainerAdministrator` by default
|
||||
|
||||
{{< /note >}}
|
||||
|
||||
Windows containers can also run as Active Directory identities by utilizing [Group Managed Service Accounts](/docs/tasks/configure-pod-container/configure-gmsa/)
|
||||
Windows containers can also run as Active Directory identities by utilizing
|
||||
[Group Managed Service Accounts](/docs/tasks/configure-pod-container/configure-gmsa/)
|
||||
|
||||
## Pod-level security isolation
|
||||
|
||||
Linux-specific pod security context mechanisms (such as SELinux, AppArmor, Seccomp, or custom
|
||||
POSIX capabilities) are not supported on Windows nodes.
|
||||
|
||||
Privileged containers are [not supported](/docs/concepts/windows/intro/#compatibility-v1-pod-spec-containers-securitycontext) on Windows.
|
||||
Instead [HostProcess containers](/docs/tasks/configure-pod-container/create-hostprocess-pod) can be used on Windows to perform many of the tasks performed by privileged containers on Linux.
|
||||
Privileged containers are [not supported](/docs/concepts/windows/intro/#compatibility-v1-pod-spec-containers-securitycontext)
|
||||
on Windows.
|
||||
Instead [HostProcess containers](/docs/tasks/configure-pod-container/create-hostprocess-pod)
|
||||
can be used on Windows to perform many of the tasks performed by privileged containers on Linux.
|
||||
|
||||
@@ -46,6 +46,7 @@ Kubernetes as a project supports and maintains [AWS](https://github.com/kubernet
|
||||
is an [Istio](https://istio.io/) based ingress controller.
|
||||
* The [Kong Ingress Controller for Kubernetes](https://github.com/Kong/kubernetes-ingress-controller#readme)
|
||||
is an ingress controller driving [Kong Gateway](https://konghq.com/kong/).
|
||||
* [Kusk Gateway](https://kusk.kubeshop.io/) is an OpenAPI-driven ingress controller based on [Envoy](https://www.envoyproxy.io).
|
||||
* The [NGINX Ingress Controller for Kubernetes](https://www.nginx.com/products/nginx-ingress-controller/)
|
||||
works with the [NGINX](https://www.nginx.com/resources/glossary/nginx/) webserver (as a proxy).
|
||||
* The [Pomerium Ingress Controller](https://www.pomerium.com/docs/k8s/ingress.html) is based on [Pomerium](https://pomerium.com/), which offers context-aware access policy.
|
||||
|
||||
@@ -299,9 +299,14 @@ thus is only available to use as-is.
|
||||
### Configuration
|
||||
|
||||
Note that the kube-proxy starts up in different modes, which are determined by its configuration.
|
||||
- The kube-proxy's configuration is done via a ConfigMap, and the ConfigMap for kube-proxy effectively deprecates the behaviour for almost all of the flags for the kube-proxy.
|
||||
- The kube-proxy's configuration is done via a ConfigMap, and the ConfigMap for kube-proxy
|
||||
effectively deprecates the behaviour for almost all of the flags for the kube-proxy.
|
||||
- The ConfigMap for the kube-proxy does not support live reloading of configuration.
|
||||
- The ConfigMap parameters for the kube-proxy cannot all be validated and verified on startup. For example, if your operating system doesn't allow you to run iptables commands, the standard kernel kube-proxy implementation will not work. Likewise, if you have an operating system which doesn't support `netsh`, it will not run in Windows userspace mode.
|
||||
- The ConfigMap parameters for the kube-proxy cannot all be validated and verified on startup.
|
||||
For example, if your operating system doesn't allow you to run iptables commands,
|
||||
the standard kernel kube-proxy implementation will not work.
|
||||
Likewise, if you have an operating system which doesn't support `netsh`,
|
||||
it will not run in Windows userspace mode.
|
||||
|
||||
### User space proxy mode {#proxy-mode-userspace}
|
||||
|
||||
@@ -492,7 +497,11 @@ variables and DNS.
|
||||
### Environment variables
|
||||
|
||||
When a Pod is run on a Node, the kubelet adds a set of environment variables
|
||||
for each active Service. It adds `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables, where the Service name is upper-cased and dashes are converted to underscores. It also supports variables (see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72)) that are compatible with Docker Engine's "_[legacy container links](https://docs.docker.com/network/links/)_" feature.
|
||||
for each active Service. It adds `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables,
|
||||
where the Service name is upper-cased and dashes are converted to underscores.
|
||||
It also supports variables (see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72))
|
||||
that are compatible with Docker Engine's
|
||||
"_[legacy container links](https://docs.docker.com/network/links/)_" feature.
|
||||
|
||||
For example, the Service `redis-master` which exposes TCP port 6379 and has been
|
||||
allocated cluster IP address 10.0.0.11, produces the following environment
|
||||
@@ -604,8 +613,10 @@ The default is `ClusterIP`.
|
||||
to use the `ExternalName` type.
|
||||
{{< /note >}}
|
||||
|
||||
You can also use [Ingress](/docs/concepts/services-networking/ingress/) to expose your Service. Ingress is not a Service type, but it acts as the entry point for your cluster. It lets you consolidate your routing rules
|
||||
into a single resource as it can expose multiple services under the same IP address.
|
||||
You can also use [Ingress](/docs/concepts/services-networking/ingress/) to expose your Service.
|
||||
Ingress is not a Service type, but it acts as the entry point for your cluster.
|
||||
It lets you consolidate your routing rules into a single resource as it can expose multiple
|
||||
services under the same IP address.
|
||||
|
||||
### Type NodePort {#type-nodeport}
|
||||
|
||||
@@ -620,9 +631,14 @@ field of the
|
||||
[kube-proxy configuration file](/docs/reference/config-api/kube-proxy-config.v1alpha1/)
|
||||
to particular IP block(s).
|
||||
|
||||
This flag takes a comma-delimited list of IP blocks (e.g. `10.0.0.0/8`, `192.0.2.0/25`) to specify IP address ranges that kube-proxy should consider as local to this node.
|
||||
This flag takes a comma-delimited list of IP blocks (e.g. `10.0.0.0/8`, `192.0.2.0/25`)
|
||||
to specify IP address ranges that kube-proxy should consider as local to this node.
|
||||
|
||||
For example, if you start kube-proxy with the `--nodeport-addresses=127.0.0.0/8` flag, kube-proxy only selects the loopback interface for NodePort Services. The default for `--nodeport-addresses` is an empty list. This means that kube-proxy should consider all available network interfaces for NodePort. (That's also compatible with earlier Kubernetes releases).
|
||||
For example, if you start kube-proxy with the `--nodeport-addresses=127.0.0.0/8` flag,
|
||||
kube-proxy only selects the loopback interface for NodePort Services.
|
||||
The default for `--nodeport-addresses` is an empty list.
|
||||
his means that kube-proxy should consider all available network interfaces for NodePort.
|
||||
(That's also compatible with earlier Kubernetes releases).
|
||||
|
||||
If you want a specific port number, you can specify a value in the `nodePort`
|
||||
field. The control plane will either allocate you that port or report that
|
||||
@@ -689,7 +705,8 @@ status:
|
||||
- ip: 192.0.2.127
|
||||
```
|
||||
|
||||
Traffic from the external load balancer is directed at the backend Pods. The cloud provider decides how it is load balanced.
|
||||
Traffic from the external load balancer is directed at the backend Pods.
|
||||
The cloud provider decides how it is load balanced.
|
||||
|
||||
Some cloud providers allow you to specify the `loadBalancerIP`. In those cases, the load-balancer is created
|
||||
with the user-specified `loadBalancerIP`. If the `loadBalancerIP` field is not specified,
|
||||
@@ -704,7 +721,11 @@ to create a static type public IP address resource. This public IP address resou
|
||||
be in the same resource group of the other automatically created resources of the cluster.
|
||||
For example, `MC_myResourceGroup_myAKSCluster_eastus`.
|
||||
|
||||
Specify the assigned IP address as loadBalancerIP. Ensure that you have updated the securityGroupName in the cloud provider configuration file. For information about troubleshooting `CreatingLoadBalancerFailed` permission issues see, [Use a static IP address with the Azure Kubernetes Service (AKS) load balancer](https://docs.microsoft.com/en-us/azure/aks/static-ip) or [CreatingLoadBalancerFailed on AKS cluster with advanced networking](https://github.com/Azure/AKS/issues/357).
|
||||
Specify the assigned IP address as loadBalancerIP. Ensure that you have updated the
|
||||
`securityGroupName` in the cloud provider configuration file.
|
||||
For information about troubleshooting `CreatingLoadBalancerFailed` permission issues see,
|
||||
[Use a static IP address with the Azure Kubernetes Service (AKS) load balancer](https://docs.microsoft.com/en-us/azure/aks/static-ip)
|
||||
or [CreatingLoadBalancerFailed on AKS cluster with advanced networking](https://github.com/Azure/AKS/issues/357).
|
||||
|
||||
{{< /note >}}
|
||||
|
||||
@@ -760,7 +781,8 @@ Unprefixed names are reserved for end-users.
|
||||
In a mixed environment it is sometimes necessary to route traffic from Services inside the same
|
||||
(virtual) network address block.
|
||||
|
||||
In a split-horizon DNS environment you would need two Services to be able to route both external and internal traffic to your endpoints.
|
||||
In a split-horizon DNS environment you would need two Services to be able to route both external
|
||||
and internal traffic to your endpoints.
|
||||
|
||||
To set an internal load balancer, add one of the following annotations to your Service
|
||||
depending on the cloud Service provider you're using.
|
||||
@@ -925,7 +947,9 @@ you can use the following annotations:
|
||||
In the above example, if the Service contained three ports, `80`, `443`, and
|
||||
`8443`, then `443` and `8443` would use the SSL certificate, but `80` would be proxied HTTP.
|
||||
|
||||
From Kubernetes v1.9 onwards you can use [predefined AWS SSL policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html) with HTTPS or SSL listeners for your Services.
|
||||
From Kubernetes v1.9 onwards you can use
|
||||
[predefined AWS SSL policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html)
|
||||
with HTTPS or SSL listeners for your Services.
|
||||
To see which policies are available for use, you can use the `aws` command line tool:
|
||||
|
||||
```bash
|
||||
@@ -981,14 +1005,17 @@ specifies the logical hierarchy you created for your Amazon S3 bucket.
|
||||
metadata:
|
||||
name: my-service
|
||||
annotations:
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-enabled: "true"
|
||||
# Specifies whether access logs are enabled for the load balancer
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval: "60"
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-enabled: "true"
|
||||
|
||||
# The interval for publishing the access logs. You can specify an interval of either 5 or 60 (minutes).
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name: "my-bucket"
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval: "60"
|
||||
|
||||
# The name of the Amazon S3 bucket where the access logs are stored
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix: "my-bucket-prefix/prod"
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name: "my-bucket"
|
||||
|
||||
# The logical hierarchy you created for your Amazon S3 bucket, for example `my-bucket-prefix/prod`
|
||||
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix: "my-bucket-prefix/prod"
|
||||
```
|
||||
|
||||
#### Connection Draining on AWS
|
||||
@@ -997,7 +1024,8 @@ Connection draining for Classic ELBs can be managed with the annotation
|
||||
`service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled` set
|
||||
to the value of `"true"`. The annotation
|
||||
`service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout` can
|
||||
also be used to set maximum time, in seconds, to keep the existing connections open before deregistering the instances.
|
||||
also be used to set maximum time, in seconds, to keep the existing connections open before
|
||||
deregistering the instances.
|
||||
|
||||
```yaml
|
||||
metadata:
|
||||
@@ -1015,50 +1043,56 @@ There are other annotations to manage Classic Elastic Load Balancers that are de
|
||||
metadata:
|
||||
name: my-service
|
||||
annotations:
|
||||
# The time, in seconds, that the connection is allowed to be idle (no data has been sent
|
||||
# over the connection) before it is closed by the load balancer
|
||||
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
|
||||
# The time, in seconds, that the connection is allowed to be idle (no data has been sent over the connection) before it is closed by the load balancer
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
|
||||
# Specifies whether cross-zone load balancing is enabled for the load balancer
|
||||
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "environment=prod,owner=devops"
|
||||
# A comma-separated list of key-value pairs which will be recorded as
|
||||
# additional tags in the ELB.
|
||||
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "environment=prod,owner=devops"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold: ""
|
||||
# The number of successive successful health checks required for a backend to
|
||||
# be considered healthy for traffic. Defaults to 2, must be between 2 and 10
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold: ""
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "3"
|
||||
# The number of unsuccessful health checks required for a backend to be
|
||||
# considered unhealthy for traffic. Defaults to 6, must be between 2 and 10
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "3"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval: "20"
|
||||
# The approximate interval, in seconds, between health checks of an
|
||||
# individual instance. Defaults to 10, must be between 5 and 300
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval: "20"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout: "5"
|
||||
# The amount of time, in seconds, during which no response means a failed
|
||||
# health check. This value must be less than the service.beta.kubernetes.io/aws-load-balancer-healthcheck-interval
|
||||
# value. Defaults to 5, must be between 2 and 60
|
||||
service.beta.kubernetes.io/aws-load-balancer-healthcheck-timeout: "5"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-security-groups: "sg-53fae93f"
|
||||
# A list of existing security groups to be configured on the ELB created. Unlike the annotation
|
||||
# service.beta.kubernetes.io/aws-load-balancer-extra-security-groups, this replaces all other security groups previously assigned to the ELB and also overrides the creation
|
||||
# service.beta.kubernetes.io/aws-load-balancer-extra-security-groups, this replaces all other
|
||||
# security groups previously assigned to the ELB and also overrides the creation
|
||||
# of a uniquely generated security group for this ELB.
|
||||
# The first security group ID on this list is used as a source to permit incoming traffic to target worker nodes (service traffic and health checks).
|
||||
# If multiple ELBs are configured with the same security group ID, only a single permit line will be added to the worker node security groups, that means if you delete any
|
||||
# The first security group ID on this list is used as a source to permit incoming traffic to
|
||||
# target worker nodes (service traffic and health checks).
|
||||
# If multiple ELBs are configured with the same security group ID, only a single permit line
|
||||
# will be added to the worker node security groups, that means if you delete any
|
||||
# of those ELBs it will remove the single permit line and block access for all ELBs that shared the same security group ID.
|
||||
# This can cause a cross-service outage if not used properly
|
||||
service.beta.kubernetes.io/aws-load-balancer-security-groups: "sg-53fae93f"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-extra-security-groups: "sg-53fae93f,sg-42efd82e"
|
||||
# A list of additional security groups to be added to the created ELB, this leaves the uniquely generated security group in place, this ensures that every ELB
|
||||
# has a unique security group ID and a matching permit line to allow traffic to the target worker nodes (service traffic and health checks).
|
||||
# A list of additional security groups to be added to the created ELB, this leaves the uniquely
|
||||
# generated security group in place, this ensures that every ELB
|
||||
# has a unique security group ID and a matching permit line to allow traffic to the target worker nodes
|
||||
# (service traffic and health checks).
|
||||
# Security groups defined here can be shared between services.
|
||||
service.beta.kubernetes.io/aws-load-balancer-extra-security-groups: "sg-53fae93f,sg-42efd82e"
|
||||
|
||||
service.beta.kubernetes.io/aws-load-balancer-target-node-labels: "ingress-gw,gw-name=public-api"
|
||||
# A comma separated list of key-value pairs which are used
|
||||
# to select the target nodes for the load balancer
|
||||
service.beta.kubernetes.io/aws-load-balancer-target-node-labels: "ingress-gw,gw-name=public-api"
|
||||
```
|
||||
|
||||
#### Network Load Balancer support on AWS {#aws-nlb-support}
|
||||
@@ -1075,7 +1109,8 @@ To use a Network Load Balancer on AWS, use the annotation `service.beta.kubernet
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
NLB only works with certain instance classes; see the [AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html#register-deregister-targets)
|
||||
NLB only works with certain instance classes; see the
|
||||
[AWS documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-register-targets.html#register-deregister-targets)
|
||||
on Elastic Load Balancing for a list of supported instance types.
|
||||
{{< /note >}}
|
||||
|
||||
@@ -1182,7 +1217,8 @@ spec:
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
ExternalName accepts an IPv4 address string, but as a DNS name comprised of digits, not as an IP address. ExternalNames that resemble IPv4 addresses are not resolved by CoreDNS or ingress-nginx because ExternalName
|
||||
ExternalName accepts an IPv4 address string, but as a DNS name comprised of digits, not as an IP address.
|
||||
ExternalNames that resemble IPv4 addresses are not resolved by CoreDNS or ingress-nginx because ExternalName
|
||||
is intended to specify a canonical DNS name. To hardcode an IP address, consider using
|
||||
[headless Services](#headless-services).
|
||||
{{< /note >}}
|
||||
@@ -1196,9 +1232,13 @@ can start its Pods, add appropriate selectors or endpoints, and change the
|
||||
Service's `type`.
|
||||
|
||||
{{< warning >}}
|
||||
You may have trouble using ExternalName for some common protocols, including HTTP and HTTPS. If you use ExternalName then the hostname used by clients inside your cluster is different from the name that the ExternalName references.
|
||||
You may have trouble using ExternalName for some common protocols, including HTTP and HTTPS.
|
||||
If you use ExternalName then the hostname used by clients inside your cluster is different from
|
||||
the name that the ExternalName references.
|
||||
|
||||
For protocols that use hostnames this difference may lead to errors or unexpected responses. HTTP requests will have a `Host:` header that the origin server does not recognize; TLS servers will not be able to provide a certificate matching the hostname that the client connected to.
|
||||
For protocols that use hostnames this difference may lead to errors or unexpected responses.
|
||||
HTTP requests will have a `Host:` header that the origin server does not recognize;
|
||||
TLS servers will not be able to provide a certificate matching the hostname that the client connected to.
|
||||
{{< /warning >}}
|
||||
|
||||
{{< note >}}
|
||||
@@ -1357,12 +1397,15 @@ through a load-balancer, though in those cases the client IP does get altered.
|
||||
#### IPVS
|
||||
|
||||
iptables operations slow down dramatically in large scale cluster e.g 10,000 Services.
|
||||
IPVS is designed for load balancing and based on in-kernel hash tables. So you can achieve performance consistency in large number of Services from IPVS-based kube-proxy. Meanwhile, IPVS-based kube-proxy has more sophisticated load balancing algorithms (least conns, locality, weighted, persistence).
|
||||
IPVS is designed for load balancing and based on in-kernel hash tables.
|
||||
So you can achieve performance consistency in large number of Services from IPVS-based kube-proxy.
|
||||
Meanwhile, IPVS-based kube-proxy has more sophisticated load balancing algorithms
|
||||
(least conns, locality, weighted, persistence).
|
||||
|
||||
## API Object
|
||||
|
||||
Service is a top-level resource in the Kubernetes REST API. You can find more details
|
||||
about the API object at: [Service API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#service-v1-core).
|
||||
about the [Service API object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#service-v1-core).
|
||||
|
||||
## Supported protocols {#protocol-support}
|
||||
|
||||
@@ -1388,7 +1431,8 @@ provider offering this facility. (Most do not).
|
||||
##### Support for multihomed SCTP associations {#caveat-sctp-multihomed}
|
||||
|
||||
{{< warning >}}
|
||||
The support of multihomed SCTP associations requires that the CNI plugin can support the assignment of multiple interfaces and IP addresses to a Pod.
|
||||
The support of multihomed SCTP associations requires that the CNI plugin can support the
|
||||
assignment of multiple interfaces and IP addresses to a Pod.
|
||||
|
||||
NAT for multihomed SCTP associations requires special logic in the corresponding kernel modules.
|
||||
{{< /warning >}}
|
||||
@@ -1437,3 +1481,4 @@ followed by the data from the client.
|
||||
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
|
||||
* Read about [Ingress](/docs/concepts/services-networking/ingress/)
|
||||
* Read about [EndpointSlices](/docs/concepts/services-networking/endpoint-slices/)
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ is managed by kubelet, or injecting different data.
|
||||
|
||||
{{< feature-state for_k8s_version="v1.16" state="beta" >}}
|
||||
|
||||
This feature requires the `CSIInlineVolume` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled. It
|
||||
is enabled by default starting with Kubernetes 1.16.
|
||||
This feature requires the `CSIInlineVolume` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
to be enabled. It is enabled by default starting with Kubernetes 1.16.
|
||||
|
||||
{{< note >}}
|
||||
CSI ephemeral volumes are only supported by a subset of CSI drivers.
|
||||
@@ -136,8 +136,11 @@ should not be exposed to users through the use of inline ephemeral volumes.
|
||||
|
||||
Cluster administrators who need to restrict the CSI drivers that are
|
||||
allowed to be used as inline volumes within a Pod spec may do so by:
|
||||
- Removing `Ephemeral` from `volumeLifecycleModes` in the CSIDriver spec, which prevents the driver from being used as an inline ephemeral volume.
|
||||
- Using an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) to restrict how this driver is used.
|
||||
|
||||
- Removing `Ephemeral` from `volumeLifecycleModes` in the CSIDriver spec, which prevents the
|
||||
driver from being used as an inline ephemeral volume.
|
||||
- Using an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)
|
||||
to restrict how this driver is used.
|
||||
|
||||
### Generic ephemeral volumes
|
||||
|
||||
@@ -207,7 +210,7 @@ because then the scheduler is free to choose a suitable node for
|
||||
the Pod. With immediate binding, the scheduler is forced to select a node that has
|
||||
access to the volume once it is available.
|
||||
|
||||
In terms of [resource ownership](/docs/concepts/workloads/controllers/garbage-collection/#owners-dependents),
|
||||
In terms of [resource ownership](/docs/concepts/architecture/garbage-collection/#owners-dependents),
|
||||
a Pod that has generic ephemeral storage is the owner of the PersistentVolumeClaim(s)
|
||||
that provide that ephemeral storage. When the Pod is deleted,
|
||||
the Kubernetes garbage collector deletes the PVC, which then usually
|
||||
@@ -252,10 +255,11 @@ Enabling the GenericEphemeralVolume feature allows users to create
|
||||
PVCs indirectly if they can create Pods, even if they do not have
|
||||
permission to create PVCs directly. Cluster administrators must be
|
||||
aware of this. If this does not fit their security model, they should
|
||||
use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/) that rejects objects like Pods that have a generic ephemeral volume.
|
||||
use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)
|
||||
that rejects objects like Pods that have a generic ephemeral volume.
|
||||
|
||||
The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota) still applies, so
|
||||
even if users are allowed to use this new mechanism, they cannot use
|
||||
The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota)
|
||||
still applies, so even if users are allowed to use this new mechanism, they cannot use
|
||||
it to circumvent other policies.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
@@ -266,11 +270,13 @@ See [local ephemeral storage](/docs/concepts/configuration/manage-resources-cont
|
||||
|
||||
### CSI ephemeral volumes
|
||||
|
||||
- For more information on the design, see the [Ephemeral Inline CSI
|
||||
volumes KEP](https://github.com/kubernetes/enhancements/blob/ad6021b3d61a49040a3f835e12c8bb5424db2bbb/keps/sig-storage/20190122-csi-inline-volumes.md).
|
||||
- For more information on further development of this feature, see the [enhancement tracking issue #596](https://github.com/kubernetes/enhancements/issues/596).
|
||||
- For more information on the design, see the
|
||||
[Ephemeral Inline CSI volumes KEP](https://github.com/kubernetes/enhancements/blob/ad6021b3d61a49040a3f835e12c8bb5424db2bbb/keps/sig-storage/20190122-csi-inline-volumes.md).
|
||||
- For more information on further development of this feature, see the
|
||||
[enhancement tracking issue #596](https://github.com/kubernetes/enhancements/issues/596).
|
||||
|
||||
### Generic ephemeral volumes
|
||||
|
||||
- For more information on the design, see the
|
||||
[Generic ephemeral inline volumes KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/1698-generic-ephemeral-volumes/README.md).
|
||||
[Generic ephemeral inline volumes KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/1698-generic-ephemeral-volumes/README.md).
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ visit [Configuration](/docs/concepts/configuration/).
|
||||
|
||||
There are two supporting concepts that provide backgrounds about how Kubernetes manages pods
|
||||
for applications:
|
||||
* [Garbage collection](/docs/concepts/workloads/controllers/garbage-collection/) tidies up objects
|
||||
* [Garbage collection](/docs/concepts/architecture/garbage-collection/) tidies up objects
|
||||
from your cluster after their _owning resource_ has been removed.
|
||||
* The [_time-to-live after finished_ controller](/docs/concepts/workloads/controllers/ttlafterfinished/)
|
||||
removes Jobs once a defined time has passed since they completed.
|
||||
|
||||
@@ -13,9 +13,6 @@ weight: 20
|
||||
A ReplicaSet's purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often
|
||||
used to guarantee the availability of a specified number of identical Pods.
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- body -->
|
||||
|
||||
## How a ReplicaSet works
|
||||
@@ -26,14 +23,14 @@ it should create to meet the number of replicas criteria. A ReplicaSet then fulf
|
||||
and deleting Pods as needed to reach the desired number. When a ReplicaSet needs to create new Pods, it uses its Pod
|
||||
template.
|
||||
|
||||
A ReplicaSet is linked to its Pods via the Pods' [metadata.ownerReferences](/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)
|
||||
A ReplicaSet is linked to its Pods via the Pods' [metadata.ownerReferences](/docs/concepts/architecture/garbage-collection/#owners-and-dependents)
|
||||
field, which specifies what resource the current object is owned by. All Pods acquired by a ReplicaSet have their owning
|
||||
ReplicaSet's identifying information within their ownerReferences field. It's through this link that the ReplicaSet
|
||||
knows of the state of the Pods it is maintaining and plans accordingly.
|
||||
|
||||
A ReplicaSet identifies new Pods to acquire by using its selector. If there is a Pod that has no OwnerReference or the
|
||||
OwnerReference is not a {{< glossary_tooltip term_id="controller" >}} and it matches a ReplicaSet's selector, it will be immediately acquired by said
|
||||
ReplicaSet.
|
||||
A ReplicaSet identifies new Pods to acquire by using its selector. If there is a Pod that has no
|
||||
OwnerReference or the OwnerReference is not a {{< glossary_tooltip term_id="controller" >}} and it
|
||||
matches a ReplicaSet's selector, it will be immediately acquired by said ReplicaSet.
|
||||
|
||||
## When to use a ReplicaSet
|
||||
|
||||
@@ -253,7 +250,9 @@ In the ReplicaSet, `.spec.template.metadata.labels` must match `spec.selector`,
|
||||
be rejected by the API.
|
||||
|
||||
{{< note >}}
|
||||
For 2 ReplicaSets specifying the same `.spec.selector` but different `.spec.template.metadata.labels` and `.spec.template.spec` fields, each ReplicaSet ignores the Pods created by the other ReplicaSet.
|
||||
For 2 ReplicaSets specifying the same `.spec.selector` but different
|
||||
`.spec.template.metadata.labels` and `.spec.template.spec` fields, each ReplicaSet ignores the
|
||||
Pods created by the other ReplicaSet.
|
||||
{{< /note >}}
|
||||
|
||||
### Replicas
|
||||
@@ -267,11 +266,14 @@ If you do not specify `.spec.replicas`, then it defaults to 1.
|
||||
|
||||
### Deleting a ReplicaSet and its Pods
|
||||
|
||||
To delete a ReplicaSet and all of its Pods, use [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete). The [Garbage collector](/docs/concepts/workloads/controllers/garbage-collection/) automatically deletes all of the dependent Pods by default.
|
||||
To delete a ReplicaSet and all of its Pods, use
|
||||
[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete). The
|
||||
[Garbage collector](/docs/concepts/architecture/garbage-collection/) automatically deletes all of
|
||||
the dependent Pods by default.
|
||||
|
||||
When using the REST API or the `client-go` library, you must set `propagationPolicy` to
|
||||
`Background` or `Foreground` in the `-d` option. For example:
|
||||
|
||||
When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Background` or `Foreground` in
|
||||
the -d option.
|
||||
For example:
|
||||
```shell
|
||||
kubectl proxy --port=8080
|
||||
curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/frontend' \
|
||||
@@ -281,9 +283,12 @@ curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/fron
|
||||
|
||||
### Deleting just a ReplicaSet
|
||||
|
||||
You can delete a ReplicaSet without affecting any of its Pods using [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) with the `--cascade=orphan` option.
|
||||
You can delete a ReplicaSet without affecting any of its Pods using
|
||||
[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete)
|
||||
with the `--cascade=orphan` option.
|
||||
When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`.
|
||||
For example:
|
||||
|
||||
```shell
|
||||
kubectl proxy --port=8080
|
||||
curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/frontend' \
|
||||
@@ -295,7 +300,8 @@ Once the original is deleted, you can create a new ReplicaSet to replace it. As
|
||||
as the old and new `.spec.selector` are the same, then the new one will adopt the old Pods.
|
||||
However, it will not make any effort to make existing Pods match a new, different pod template.
|
||||
To update Pods to a new spec in a controlled way, use a
|
||||
[Deployment](/docs/concepts/workloads/controllers/deployment/#creating-a-deployment), as ReplicaSets do not support a rolling update directly.
|
||||
[Deployment](/docs/concepts/workloads/controllers/deployment/#creating-a-deployment), as
|
||||
ReplicaSets do not support a rolling update directly.
|
||||
|
||||
### Isolating Pods from a ReplicaSet
|
||||
|
||||
@@ -310,17 +316,19 @@ ensures that a desired number of Pods with a matching label selector are availab
|
||||
|
||||
When scaling down, the ReplicaSet controller chooses which pods to delete by sorting the available pods to
|
||||
prioritize scaling down pods based on the following general algorithm:
|
||||
1. Pending (and unschedulable) pods are scaled down first
|
||||
2. If `controller.kubernetes.io/pod-deletion-cost` annotation is set, then
|
||||
the pod with the lower value will come first.
|
||||
3. Pods on nodes with more replicas come before pods on nodes with fewer replicas.
|
||||
4. If the pods' creation times differ, the pod that was created more recently
|
||||
comes before the older pod (the creation times are bucketed on an integer log scale
|
||||
when the `LogarithmicScaleDown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled)
|
||||
|
||||
1. Pending (and unschedulable) pods are scaled down first
|
||||
1. If `controller.kubernetes.io/pod-deletion-cost` annotation is set, then
|
||||
the pod with the lower value will come first.
|
||||
1. Pods on nodes with more replicas come before pods on nodes with fewer replicas.
|
||||
1. If the pods' creation times differ, the pod that was created more recently
|
||||
comes before the older pod (the creation times are bucketed on an integer log scale
|
||||
when the `LogarithmicScaleDown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled)
|
||||
|
||||
If all of the above match, then selection is random.
|
||||
|
||||
### Pod deletion cost
|
||||
|
||||
{{< feature-state for_k8s_version="v1.22" state="beta" >}}
|
||||
|
||||
Using the [`controller.kubernetes.io/pod-deletion-cost`](/docs/reference/labels-annotations-taints/#pod-deletion-cost)
|
||||
@@ -344,6 +352,7 @@ This feature is beta and enabled by default. You can disable it using the
|
||||
{{< /note >}}
|
||||
|
||||
#### Example Use Case
|
||||
|
||||
The different pods of an application could have different utilization levels. On scale down, the application
|
||||
may prefer to remove the pods with lower utilization. To avoid frequently updating the pods, the application
|
||||
should update `controller.kubernetes.io/pod-deletion-cost` once before issuing a scale down (setting the
|
||||
@@ -387,12 +396,17 @@ As such, it is recommended to use Deployments when you want ReplicaSets.
|
||||
|
||||
### Bare Pods
|
||||
|
||||
Unlike the case where a user directly created Pods, a ReplicaSet replaces Pods that are deleted or terminated for any reason, such as in the case of node failure or disruptive node maintenance, such as a kernel upgrade. For this reason, we recommend that you use a ReplicaSet even if your application requires only a single Pod. Think of it similarly to a process supervisor, only it supervises multiple Pods across multiple nodes instead of individual processes on a single node. A ReplicaSet delegates local container restarts to some agent on the node such as Kubelet.
|
||||
Unlike the case where a user directly created Pods, a ReplicaSet replaces Pods that are deleted or
|
||||
terminated for any reason, such as in the case of node failure or disruptive node maintenance,
|
||||
such as a kernel upgrade. For this reason, we recommend that you use a ReplicaSet even if your
|
||||
application requires only a single Pod. Think of it similarly to a process supervisor, only it
|
||||
supervises multiple Pods across multiple nodes instead of individual processes on a single node. A
|
||||
ReplicaSet delegates local container restarts to some agent on the node such as Kubelet.
|
||||
|
||||
### Job
|
||||
|
||||
Use a [`Job`](/docs/concepts/workloads/controllers/job/) instead of a ReplicaSet for Pods that are expected to terminate on their own
|
||||
(that is, batch jobs).
|
||||
Use a [`Job`](/docs/concepts/workloads/controllers/job/) instead of a ReplicaSet for Pods that are
|
||||
expected to terminate on their own (that is, batch jobs).
|
||||
|
||||
### DaemonSet
|
||||
|
||||
@@ -402,12 +416,12 @@ to a machine lifetime: the Pod needs to be running on the machine before other P
|
||||
safe to terminate when the machine is otherwise ready to be rebooted/shutdown.
|
||||
|
||||
### ReplicationController
|
||||
ReplicaSets are the successors to [_ReplicationControllers_](/docs/concepts/workloads/controllers/replicationcontroller/).
|
||||
|
||||
ReplicaSets are the successors to [ReplicationControllers](/docs/concepts/workloads/controllers/replicationcontroller/).
|
||||
The two serve the same purpose, and behave similarly, except that a ReplicationController does not support set-based
|
||||
selector requirements as described in the [labels user guide](/docs/concepts/overview/working-with-objects/labels/#label-selectors).
|
||||
As such, ReplicaSets are preferred over ReplicationControllers
|
||||
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Learn about [Pods](/docs/concepts/workloads/pods).
|
||||
@@ -419,3 +433,4 @@ As such, ReplicaSets are preferred over ReplicationControllers
|
||||
object definition to understand the API for replica sets.
|
||||
* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how
|
||||
you can use it to manage application availability during disruptions.
|
||||
|
||||
|
||||
@@ -39,10 +39,18 @@ that provides a set of stateless replicas.
|
||||
|
||||
## Limitations
|
||||
|
||||
* The storage for a given Pod must either be provisioned by a [PersistentVolume Provisioner](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md) based on the requested `storage class`, or pre-provisioned by an admin.
|
||||
* Deleting and/or scaling a StatefulSet down will *not* delete the volumes associated with the StatefulSet. This is done to ensure data safety, which is generally more valuable than an automatic purge of all related StatefulSet resources.
|
||||
* StatefulSets currently require a [Headless Service](/docs/concepts/services-networking/service/#headless-services) to be responsible for the network identity of the Pods. You are responsible for creating this Service.
|
||||
* StatefulSets do not provide any guarantees on the termination of pods when a StatefulSet is deleted. To achieve ordered and graceful termination of the pods in the StatefulSet, it is possible to scale the StatefulSet down to 0 prior to deletion.
|
||||
* The storage for a given Pod must either be provisioned by a
|
||||
[PersistentVolume Provisioner](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md)
|
||||
based on the requested `storage class`, or pre-provisioned by an admin.
|
||||
* Deleting and/or scaling a StatefulSet down will *not* delete the volumes associated with the
|
||||
StatefulSet. This is done to ensure data safety, which is generally more valuable than an
|
||||
automatic purge of all related StatefulSet resources.
|
||||
* StatefulSets currently require a [Headless Service](/docs/concepts/services-networking/service/#headless-services)
|
||||
to be responsible for the network identity of the Pods. You are responsible for creating this
|
||||
Service.
|
||||
* StatefulSets do not provide any guarantees on the termination of pods when a StatefulSet is
|
||||
deleted. To achieve ordered and graceful termination of the pods in the StatefulSet, it is
|
||||
possible to scale the StatefulSet down to 0 prior to deletion.
|
||||
* When using [Rolling Updates](#rolling-updates) with the default
|
||||
[Pod Management Policy](#pod-management-policies) (`OrderedReady`),
|
||||
it's possible to get into a broken state that requires
|
||||
@@ -108,18 +116,24 @@ In the above example:
|
||||
|
||||
* A Headless Service, named `nginx`, is used to control the network domain.
|
||||
* The StatefulSet, named `web`, has a Spec that indicates that 3 replicas of the nginx container will be launched in unique Pods.
|
||||
* The `volumeClaimTemplates` will provide stable storage using [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume Provisioner.
|
||||
* The `volumeClaimTemplates` will provide stable storage using
|
||||
[PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a
|
||||
PersistentVolume Provisioner.
|
||||
|
||||
The name of a StatefulSet object must be a valid
|
||||
[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
|
||||
|
||||
### Pod Selector
|
||||
|
||||
You must set the `.spec.selector` field of a StatefulSet to match the labels of its `.spec.template.metadata.labels`. Failing to specify a matching Pod Selector will result in a validation error during StatefulSet creation.
|
||||
You must set the `.spec.selector` field of a StatefulSet to match the labels of its
|
||||
`.spec.template.metadata.labels`. Failing to specify a matching Pod Selector will result in a
|
||||
validation error during StatefulSet creation.
|
||||
|
||||
### Volume Claim Templates
|
||||
|
||||
You can set the `.spec.volumeClaimTemplates` which can provide stable storage using [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume Provisioner.
|
||||
You can set the `.spec.volumeClaimTemplates` which can provide stable storage using
|
||||
[PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume
|
||||
Provisioner.
|
||||
|
||||
|
||||
### Minimum ready seconds
|
||||
@@ -128,9 +142,11 @@ You can set the `.spec.volumeClaimTemplates` which can provide stable storage u
|
||||
|
||||
`.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly
|
||||
created Pod should be ready without any of its containers crashing, for it to be considered available.
|
||||
Please note that this feature is beta and enabled by default. Please opt out by unsetting the StatefulSetMinReadySeconds flag, if you don't
|
||||
Please note that this feature is beta and enabled by default. Please opt out by unsetting the
|
||||
StatefulSetMinReadySeconds flag, if you don't
|
||||
want this feature to be enabled. This field defaults to 0 (the Pod will be considered
|
||||
available as soon as it is ready). To learn more about when a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
|
||||
available as soon as it is ready). To learn more about when a Pod is considered ready, see
|
||||
[Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
|
||||
|
||||
## Pod Identity
|
||||
|
||||
@@ -166,8 +182,8 @@ remembered and reused, even after the Pod is running, for at least a few seconds
|
||||
If you need to discover Pods promptly after they are created, you have a few options:
|
||||
|
||||
- Query the Kubernetes API directly (for example, using a watch) rather than relying on DNS lookups.
|
||||
- Decrease the time of caching in your Kubernetes DNS provider (typically this means editing the config map for CoreDNS, which currently caches for 30 seconds).
|
||||
|
||||
- Decrease the time of caching in your Kubernetes DNS provider (typically this means editing the
|
||||
config map for CoreDNS, which currently caches for 30 seconds).
|
||||
|
||||
As mentioned in the [limitations](#limitations) section, you are responsible for
|
||||
creating the [Headless Service](/docs/concepts/services-networking/service/#headless-services)
|
||||
@@ -189,7 +205,9 @@ Cluster Domain will be set to `cluster.local` unless
|
||||
|
||||
### Stable Storage
|
||||
|
||||
For each VolumeClaimTemplate entry defined in a StatefulSet, each Pod receives one PersistentVolumeClaim. In the nginx example above, each Pod receives a single PersistentVolume with a StorageClass of `my-storage-class` and 1 Gib of provisioned storage. If no StorageClass
|
||||
For each VolumeClaimTemplate entry defined in a StatefulSet, each Pod receives one
|
||||
PersistentVolumeClaim. In the nginx example above, each Pod receives a single PersistentVolume
|
||||
with a StorageClass of `my-storage-class` and 1 Gib of provisioned storage. If no StorageClass
|
||||
is specified, then the default StorageClass will be used. When a Pod is (re)scheduled
|
||||
onto a node, its `volumeMounts` mount the PersistentVolumes associated with its
|
||||
PersistentVolume Claims. Note that, the PersistentVolumes associated with the
|
||||
@@ -210,7 +228,9 @@ the StatefulSet.
|
||||
* Before a scaling operation is applied to a Pod, all of its predecessors must be Running and Ready.
|
||||
* Before a Pod is terminated, all of its successors must be completely shutdown.
|
||||
|
||||
The StatefulSet should not specify a `pod.Spec.TerminationGracePeriodSeconds` of 0. This practice is unsafe and strongly discouraged. For further explanation, please refer to [force deleting StatefulSet Pods](/docs/tasks/run-application/force-delete-stateful-set-pod/).
|
||||
The StatefulSet should not specify a `pod.Spec.TerminationGracePeriodSeconds` of 0. This practice
|
||||
is unsafe and strongly discouraged. For further explanation, please refer to
|
||||
[force deleting StatefulSet Pods](/docs/tasks/run-application/force-delete-stateful-set-pod/).
|
||||
|
||||
When the nginx example above is created, three Pods will be deployed in the order
|
||||
web-0, web-1, web-2. web-1 will not be deployed before web-0 is
|
||||
@@ -256,7 +276,8 @@ annotations for the Pods in a StatefulSet. There are two possible values:
|
||||
create new Pods that reflect modifications made to a StatefulSet's `.spec.template`.
|
||||
|
||||
`RollingUpdate`
|
||||
: The `RollingUpdate` update strategy implements automated, rolling update for the Pods in a StatefulSet. This is the default update strategy.
|
||||
: The `RollingUpdate` update strategy implements automated, rolling update for the Pods in a
|
||||
StatefulSet. This is the default update strategy.
|
||||
|
||||
## Rolling Updates
|
||||
|
||||
@@ -299,7 +320,7 @@ unavailable Pod in the range `0` to `replicas - 1`, it will be counted towards
|
||||
{{< note >}}
|
||||
The `maxUnavailable` field is in Alpha stage and it is honored only by API servers
|
||||
that are running with the `MaxUnavailableStatefulSet`
|
||||
[feature gate](/docs/reference/commmand-line-tools-reference/feature-gates/)
|
||||
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
enabled.
|
||||
{{< /note >}}
|
||||
|
||||
@@ -375,8 +396,8 @@ spec:
|
||||
...
|
||||
```
|
||||
|
||||
The StatefulSet {{<glossary_tooltip text="controller" term_id="controller">}} adds [owner
|
||||
references](/docs/concepts/overview/working-with-objects/owners-dependents/#owner-references-in-object-specifications)
|
||||
The StatefulSet {{<glossary_tooltip text="controller" term_id="controller">}} adds
|
||||
[owner references](/docs/concepts/overview/working-with-objects/owners-dependents/#owner-references-in-object-specifications)
|
||||
to its PVCs, which are then deleted by the {{<glossary_tooltip text="garbage collector"
|
||||
term_id="garbage-collection">}} after the Pod is terminated. This enables the Pod to
|
||||
cleanly unmount all volumes before the PVCs are deleted (and before the backing PV and
|
||||
|
||||
@@ -278,7 +278,7 @@ For an example of adding a new localization, see the PR to enable
|
||||
|
||||
To guide other localization contributors, add a new
|
||||
[`README-**.md`](https://help.github.com/articles/about-readmes/) to the top level of
|
||||
[k/website](https://github.com/kubernetes/website/), where `**` is the two-letter language code.
|
||||
[kubernetes/website](https://github.com/kubernetes/website/), where `**` is the two-letter language code.
|
||||
For example, a German README file would be `README-de.md`.
|
||||
|
||||
Provide guidance to localization contributors in the localized `README-**.md` file.
|
||||
@@ -418,7 +418,7 @@ To collaborate on a localization branch:
|
||||
`dev-<source version>-<language code>.<team milestone>`
|
||||
|
||||
For example, an approver on a German localization team opens the localization branch
|
||||
`dev-1.12-de.1` directly against the k/website repository, based on the source branch for
|
||||
`dev-1.12-de.1` directly against the `kubernetes/website` repository, based on the source branch for
|
||||
Kubernetes v1.12.
|
||||
|
||||
2. Individual contributors open feature branches based on the localization branch.
|
||||
|
||||
@@ -74,6 +74,10 @@ PUT | update
|
||||
PATCH | patch
|
||||
DELETE | delete (for individual resources), deletecollection (for collections)
|
||||
|
||||
{{< caution >}}
|
||||
The `get`, `list` and `watch` verbs can all return the full details of a resource. In terms of the returned data they are equivalent. For example, `list` on `secrets` will still reveal the `data` attributes of any returned resources.
|
||||
{{< /caution >}}
|
||||
|
||||
Kubernetes sometimes checks authorization for additional permissions using specialized verbs. For example:
|
||||
|
||||
* [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/)
|
||||
|
||||
+405
-866
File diff suppressed because it is too large
Load Diff
@@ -187,27 +187,6 @@ kubelet [flags]
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Domain for this cluster. If set, kubelet will configure all containers to search this domain in addition to the host's search domains (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--cni-bin-dir string Default: <code>/opt/cni/bin</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">A comma-separated list of full paths of directories in which to search for CNI plugin binaries. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--cni-cache-dir string Default: <code>/var/lib/cni/cache</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The full path of the directory in which CNI should store cache files. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--cni-conf-dir string Default: <code>/etc/cni/net.d</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><Warning: Alpha feature> The full path of the directory in which to search for CNI config files. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--config string</td>
|
||||
</tr>
|
||||
@@ -230,20 +209,19 @@ kubelet [flags]
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--container-runtime string Default: <code>docker</code></td>
|
||||
<td colspan="2">--container-runtime string Default: <code>remote</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The container runtime to use. Possible values: <code>docker</code>, <code>remote</code>.</td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The container runtime to use. Possible values: <code>docker</code>, <code>remote</code>. (DEPRECATED: will be removed in 1.27 as the only valid value is 'remote')</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--container-runtime-endpoint string Default: <code>unix:///var/run/dockershim.sock</code></td>
|
||||
<td colspan="2">--container-runtime-endpoint string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">[Experimental] The endpoint of remote runtime service. Currently unix socket endpoint is supported on Linux, while npipe and tcp endpoints are supported on windows. Examples: <code>unix:///var/run/dockershim.sock</code>, <code>npipe:////./pipe/dockershim</code>.</td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The endpoint of remote runtime service. Unix Domain SOckets are supported on Linux, while npipe and tcp endpoints are supported on windows. Examples: <code>unix:///var/run/dockershim.sock</code>, <code>npipe:////./pipe/dockershim</code>.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--contention-profiling</td>
|
||||
</tr>
|
||||
@@ -276,7 +254,7 @@ kubelet [flags]
|
||||
<td colspan="2">--cpu-manager-policy-options mapStringString</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Comma-separated list of options to fine-tune the behavior of the selected CPU Manager policy. If not supplied, keep the default behaviour. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">A set of key=value CPU Manager policy options to use, to fine tune their behaviour. If not supplied, keep the default behaviour. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -286,20 +264,6 @@ kubelet [flags]
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><Warning: Alpha feature> CPU Manager reconciliation period. Examples: <code>10s</code>, or <code>1m</code>. If not supplied, defaults to node status update frequency. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--docker-endpoint string Default: <code>unix:///var/run/docker.sock</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Use this for the <code>docker</code> endpoint to communicate with. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--dynamic-config-dir string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The Kubelet will use this directory for checkpointing downloaded configurations and tracking configuration health. The Kubelet will create this directory if it does not already exist. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Providing this flag enables dynamic Kubelet configuration. The <code>DynamicKubeletConfig</code> feature gate must be enabled to pass this flag. (DEPRECATED: Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA. It is planned to be removed from Kubernetes in the version 1.24 or later. Please use alternative ways to update kubelet configuration.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--enable-controller-attach-detach Default: <code>true</code></td>
|
||||
</tr>
|
||||
@@ -398,13 +362,6 @@ kubelet [flags]
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">When set to <code>true</code>, hard eviction thresholds will be ignored while calculating node allocatable. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/">here</a> for more details. (DEPRECATED: will be removed in 1.24 or later)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--experimental-check-node-capabilities-before-mount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">[Experimental] if set to <code>true</code>, the kubelet will check the underlying node for required components (binaries, etc.) before performing the mount (DEPRECATED: will be removed in 1.24 or later, in favor of using CSI.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--experimental-kernel-memcg-notification</td>
|
||||
</tr>
|
||||
@@ -412,13 +369,6 @@ kubelet [flags]
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Use kernelMemcgNotification configuration, this flag will be removed in 1.24 or later. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--experimental-log-sanitization bool</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">[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. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--experimental-mounter-path string Default: <code>mount</code></td>
|
||||
</tr>
|
||||
@@ -445,83 +395,76 @@ APIServerIdentity=true|false (ALPHA - default=false)<br/>
|
||||
APIServerTracing=true|false (ALPHA - default=false)<br/>
|
||||
AllAlpha=true|false (ALPHA - default=false)<br/>
|
||||
AllBeta=true|false (BETA - default=false)<br/>
|
||||
AnyVolumeDataSource=true|false (ALPHA - default=false)<br/>
|
||||
AnyVolumeDataSource=true|false (BETA - default=true)<br/>
|
||||
AppArmor=true|false (BETA - default=true)<br/>
|
||||
CPUManager=true|false (BETA - default=true)<br/>
|
||||
CPUManagerPolicyAlphaOptions=true|false (ALPHA - default=false)<br/>
|
||||
CPUManagerPolicyBetaOptions=true|false (BETA - default=true)<br/>
|
||||
CPUManagerPolicyOptions=true|false (ALPHA - default=false)<br/>
|
||||
CPUManagerPolicyOptions=true|false (BETA - default=true)<br/>
|
||||
CSIInlineVolume=true|false (BETA - default=true)<br/>
|
||||
CSIMigration=true|false (BETA - default=true)<br/>
|
||||
CSIMigrationAWS=true|false (BETA - default=false)<br/>
|
||||
CSIMigrationAzureDisk=true|false (BETA - default=true)<br/>
|
||||
CSIMigrationAzureFile=true|false (BETA - default=false)<br/>
|
||||
CSIMigrationAWS=true|false (BETA - default=true)<br/>
|
||||
CSIMigrationAzureFile=true|false (BETA - default=true)<br/>
|
||||
CSIMigrationGCE=true|false (BETA - default=true)<br/>
|
||||
CSIMigrationOpenStack=true|false (BETA - default=true)<br/>
|
||||
CSIMigrationPortworx=true|false (ALPHA - default=false)<br/>
|
||||
CSIMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
CSIMigrationvSphere=true|false (BETA - default=false)<br/>
|
||||
CSIStorageCapacity=true|false (BETA - default=true)<br/>
|
||||
CSIVolumeHealth=true|false (ALPHA - default=false)<br/>
|
||||
CSRDuration=true|false (BETA - default=true)<br/>
|
||||
ControllerManagerLeaderMigration=true|false (BETA - default=true)<br/>
|
||||
ContextualLogging=true|false (ALPHA - default=false)<br/>
|
||||
CronJobTimeZone=true|false (ALPHA - default=false)<br/>
|
||||
CustomCPUCFSQuotaPeriod=true|false (ALPHA - default=false)<br/>
|
||||
CustomResourceValidationExpressions=true|false (ALPHA - default=false)<br/>
|
||||
DaemonSetUpdateSurge=true|false (BETA - default=true)<br/>
|
||||
DefaultPodTopologySpread=true|false (BETA - default=true)<br/>
|
||||
DelegateFSGroupToCSIDriver=true|false (BETA - default=true)<br/>
|
||||
DevicePlugins=true|false (BETA - default=true)<br/>
|
||||
DisableAcceleratorUsageMetrics=true|false (BETA - default=true)<br/>
|
||||
DisableCloudProviders=true|false (ALPHA - default=false)<br/>
|
||||
DisableKubeletCloudCredentialProviders=true|false (ALPHA - default=false)<br/>
|
||||
DownwardAPIHugePages=true|false (BETA - default=true)<br/>
|
||||
EfficientWatchResumption=true|false (BETA - default=true)<br/>
|
||||
EndpointSliceTerminatingCondition=true|false (BETA - default=true)<br/>
|
||||
EphemeralContainers=true|false (BETA - default=true)<br/>
|
||||
ExpandCSIVolumes=true|false (BETA - default=true)<br/>
|
||||
ExpandInUsePersistentVolumes=true|false (BETA - default=true)<br/>
|
||||
ExpandPersistentVolumes=true|false (BETA - default=true)<br/>
|
||||
ExpandedDNSConfig=true|false (ALPHA - default=false)<br/>
|
||||
ExperimentalHostUserNamespaceDefaulting=true|false (BETA - default=false)<br/>
|
||||
GRPCContainerProbe=true|false (ALPHA - default=false)<br/>
|
||||
GRPCContainerProbe=true|false (BETA - default=true)<br/>
|
||||
GracefulNodeShutdown=true|false (BETA - default=true)<br/>
|
||||
GracefulNodeShutdownBasedOnPodPriority=true|false (ALPHA - default=false)<br/>
|
||||
GracefulNodeShutdownBasedOnPodPriority=true|false (BETA - default=true)<br/>
|
||||
HPAContainerMetrics=true|false (ALPHA - default=false)<br/>
|
||||
HPAScaleToZero=true|false (ALPHA - default=false)<br/>
|
||||
HonorPVReclaimPolicy=true|false (ALPHA - default=false)<br/>
|
||||
IdentifyPodOS=true|false (ALPHA - default=false)<br/>
|
||||
IdentifyPodOS=true|false (BETA - default=true)<br/>
|
||||
InTreePluginAWSUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginAzureDiskUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginAzureFileUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginGCEUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginOpenStackUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginPortworxUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginRBDUnregister=true|false (ALPHA - default=false)<br>
|
||||
InTreePluginRBDUnregister=true|false (ALPHA - default=false)<br/>
|
||||
InTreePluginvSphereUnregister=true|false (ALPHA - default=false)<br/>
|
||||
IndexedJob=true|false (BETA - default=true)<br/>
|
||||
JobMutableNodeSchedulingDirectives=true|false (BETA - default=true)<br/>
|
||||
JobReadyPods=true|false (ALPHA - default=false)<br/>
|
||||
JobTrackingWithFinalizers=true|false (BETA - default=true)<br/>
|
||||
KubeletCredentialProviders=true|false (ALPHA - default=false)<br/>
|
||||
JobReadyPods=true|false (BETA - default=true)<br/>
|
||||
JobTrackingWithFinalizers=true|false (BETA - default=false)<br/>
|
||||
KubeletCredentialProviders=true|false (BETA - default=true)<br/>
|
||||
KubeletInUserNamespace=true|false (ALPHA - default=false)<br/>
|
||||
KubeletPodResources=true|false (BETA - default=true)<br/>
|
||||
KubeletPodResourcesGetAllocatable=true|false (BETA - default=true)<br/>
|
||||
LegacyServiceAccountTokenNoAutoGeneration=true|false (BETA - default=true)<br/>
|
||||
LocalStorageCapacityIsolation=true|false (BETA - default=true)<br/>
|
||||
LocalStorageCapacityIsolationFSQuotaMonitoring=true|false (ALPHA - default=false)<br/>
|
||||
LogarithmicScaleDown=true|false (BETA - default=true)<br/>
|
||||
MaxUnavailableStatefulSet=true|false (ALPHA - default=false)<br/>
|
||||
MemoryManager=true|false (BETA - default=true)<br/>
|
||||
MemoryQoS=true|false (ALPHA - default=false)<br/>
|
||||
MixedProtocolLBService=true|false (ALPHA - default=false)<br/>
|
||||
MinDomainsInPodTopologySpread=true|false (ALPHA - default=false)<br/>
|
||||
MixedProtocolLBService=true|false (BETA - default=true)<br/>
|
||||
NetworkPolicyEndPort=true|false (BETA - default=true)<br/>
|
||||
NetworkPolicyStatus=true|false (ALPHA - default=false)<br/>
|
||||
NodeOutOfServiceVolumeDetach=true|false (ALPHA - default=false)<br/>
|
||||
NodeSwap=true|false (ALPHA - default=false)<br/>
|
||||
NonPreemptingPriority=true|false (BETA - default=true)<br/>
|
||||
OpenAPIEnums=true|false (ALPHA - default=false)<br/>
|
||||
OpenAPIV3=true|false (ALPHA - default=false)<br/>
|
||||
PodAffinityNamespaceSelector=true|false (BETA - default=true)<br/>
|
||||
OpenAPIEnums=true|false (BETA - default=true)<br/>
|
||||
OpenAPIV3=true|false (BETA - default=true)<br/>
|
||||
PodAndContainerStatsFromCRI=true|false (ALPHA - default=false)<br/>
|
||||
PodDeletionCost=true|false (BETA - default=true)<br/>
|
||||
PodOverhead=true|false (BETA - default=true)<br/>
|
||||
PodSecurity=true|false (BETA - default=true)<br/>
|
||||
PreferNominatedNode=true|false (BETA - default=true)<br/>
|
||||
ProbeTerminationGracePeriod=true|false (BETA - default=false)<br/>
|
||||
ProcMountType=true|false (ALPHA - default=false)<br/>
|
||||
ProxyTerminatingEndpoints=true|false (ALPHA - default=false)<br/>
|
||||
@@ -529,25 +472,22 @@ QOSReserved=true|false (ALPHA - default=false)<br/>
|
||||
ReadWriteOncePod=true|false (ALPHA - default=false)<br/>
|
||||
RecoverVolumeExpansionFailure=true|false (ALPHA - default=false)<br/>
|
||||
RemainingItemCount=true|false (BETA - default=true)<br/>
|
||||
RemoveSelfLink=true|false (BETA - default=true)<br/>
|
||||
RotateKubeletServerCertificate=true|false (BETA - default=true)<br/>
|
||||
SeccompDefault=true|false (ALPHA - default=false)<br/>
|
||||
ServerSideFieldValidation=true|false (ALPHA - default=false)<br/>
|
||||
ServiceIPStaticSubrange=true|false (ALPHA - default=false)<br/>
|
||||
ServiceInternalTrafficPolicy=true|false (BETA - default=true)<br/>
|
||||
ServiceLBNodePortControl=true|false (BETA - default=true)<br/>
|
||||
ServiceLoadBalancerClass=true|false (BETA - default=true)<br/>
|
||||
SizeMemoryBackedVolumes=true|false (BETA - default=true)<br/>
|
||||
StatefulSetAutoDeletePVC=true|false (ALPHA - default=false)<br/>
|
||||
StatefulSetMinReadySeconds=true|false (BETA - default=true)<br/>
|
||||
StorageVersionAPI=true|false (ALPHA - default=false)<br/>
|
||||
StorageVersionHash=true|false (BETA - default=true)<br/>
|
||||
SuspendJob=true|false (BETA - default=true)<br/>
|
||||
TopologyAwareHints=true|false (BETA - default=true)<br/>
|
||||
TopologyManager=true|false (BETA - default=true)<br/>
|
||||
VolumeCapacityPriority=true|false (ALPHA - default=false)<br/>
|
||||
WinDSR=true|false (ALPHA - default=false)<br/>
|
||||
WinOverlay=true|false (BETA - default=true)<br/>
|
||||
WindowsHostProcessContainers=true|false (BETA - default=true)<br/>
|
||||
csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
@@ -628,18 +568,11 @@ csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to. Values must be within the range [0, 100] and should not be larger than that of <code>--image-gc-high-threshold</code>. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--image-pull-progress-deadline duration Default: <code>1m0s</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">If no pulling progress is made before this deadline, the image pulling will be cancelled. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--image-service-endpoint string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">[Experimental] The endpoint of remote image service. If not specified, it will be the same with <code>--container-runtime-endpoint</code> by default. Currently UNIX socket endpoint is supported on Linux, while npipe and TCP endpoints are supported on Windows. Examples: <code>unix:///var/run/dockershim.sock</code>, <code>npipe:////./pipe/dockershim</code></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">[Experimental] The endpoint of remote image service. If not specified, it will be the same with <code>--container-runtime-endpoint</code> by default. Unix Domain Socket are supported on Linux, while npipe and TCP endpoints are supported on Windows. Examples: <code>unix:///var/run/dockershim.sock</code>, <code>npipe:////./pipe/dockershim</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -866,20 +799,6 @@ csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Minimum age for an unused image before it is garbage collected. Examples: <code>'300ms'</code>, <code>'10s'</code> or <code>'2h45m'</code>. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--network-plugin string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The name of the network plugin to be invoked for various events in kubelet/pod lifecycle. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--network-plugin-mtu int32</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The MTU to be passed to the network plugin, to override the default. Set to <code>0</code> to use the default 1460 MTU. This docker-specific flag only works when container-runtime is set to <code>docker</code>. (DEPRECATED: will be removed along with dockershim.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--node-ip string</td>
|
||||
</tr>
|
||||
@@ -908,13 +827,6 @@ csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with <code>nodeMonitorGracePeriod</code> in Node controller. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--non-masquerade-cidr string Default: <code>10.0.0.0/8</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Traffic to IPs outside this range will use IP masquerade. Set to <code>'0.0.0.0/0'</code> to never masquerade. (DEPRECATED: will be removed in a future version)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--one-output</td>
|
||||
</tr>
|
||||
@@ -999,13 +911,6 @@ csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">The read-only port for the kubelet to serve on with no authentication/authorization (set to <code>0</code> to disable). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's <code>--config</code> flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--really-crash-for-testing</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">If true, when panics occur crash. Intended for testing. (DEPRECATED: will be removed in a future version.)</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--register-node Default: <code>true</code></td>
|
||||
</tr>
|
||||
@@ -1105,7 +1010,7 @@ csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--seccomp-default RuntimeDefault</td>
|
||||
<td colspan="2">--seccomp-default string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><Warning: Alpha feature> Enable the use of <code>RuntimeDefault</code> as the default seccomp profile for all workloads. The <code>SeccompDefault</code> feature gate must be enabled to allow this flag, which is disabled by default.</td>
|
||||
@@ -1187,10 +1092,10 @@ csiMigrationRBD=true|false (ALPHA - default=false)<br/>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Comma-separated list of cipher suites for the server. If omitted, the default Go cipher suites will be used.<br/>
|
||||
Preferred values:
|
||||
TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384<br/>
|
||||
Insecure values:
|
||||
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_RC4_128_SHA.
|
||||
(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)
|
||||
`TLS_AES_128_GCM_SHA256`, `TLS_AES_256_GCM_SHA384`, `TLS_CHACHA20_POLY1305_SHA256`, `TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA`, `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`, `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA`, `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384`, `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305`, `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256`, `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA`, `TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256`, `TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA`, `TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384`, `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305`, `TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256`, `TLS_RSA_WITH_AES_128_CBC_SHA`, `TLS_RSA_WITH_AES_128_GCM_SHA256`, `TLS_RSA_WITH_AES_256_CBC_SHA`, `TLS_RSA_WITH_AES_256_GCM_SHA384`<br/>
|
||||
Insecure values:<br/>
|
||||
`TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256`, `TLS_ECDHE_ECDSA_WITH_RC4_128_SHA`, `TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA`, `TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256`, `TLS_ECDHE_RSA_WITH_RC4_128_SHA`, `TLS_RSA_WITH_3DES_EDE_CBC_SHA`, `TLS_RSA_WITH_AES_128_CBC_SHA256`, `TLS_RSA_WITH_RC4_128_SHA`.<br/>
|
||||
(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's `--config` flag. See <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/">kubelet-config-file</a> for more information.)
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -1237,7 +1142,7 @@ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_E
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--vmodule <A list of 'pattern=N' string></td>
|
||||
<td colspan="2">--vmodule <A list of 'pattern=N' strings></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Comma-separated list of <code>pattern=N</code> settings for file-filtered logging</td>
|
||||
|
||||
@@ -113,7 +113,7 @@ components by adding customized setting or overriding kubeadm default settings.<
|
||||
</span></pre><p>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.</p>
|
||||
<p>See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ or
|
||||
https://godoc.org/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration
|
||||
https://pkg.go.dev/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration
|
||||
for kube proxy official documentation.</p>
|
||||
<pre style="background-color:#fff"><span style="color:#000;font-weight:bold">apiVersion</span>:<span style="color:#bbb"> </span>kubelet.config.k8s.io/v1beta1<span style="color:#bbb">
|
||||
</span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">kind</span>:<span style="color:#bbb"> </span>KubeletConfiguration<span style="color:#bbb">
|
||||
@@ -121,7 +121,7 @@ for kube proxy official documentation.</p>
|
||||
</span></pre><p>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.</p>
|
||||
<p>See https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ or
|
||||
https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration
|
||||
https://pkg.go.dev/k8s.io/kubelet/config/v1beta1#KubeletConfiguration
|
||||
for kubelet official documentation.</p>
|
||||
<p>Here is a fully populated example of a single YAML file containing multiple
|
||||
configuration types to be used during a <code>kubeadm init</code> run.</p>
|
||||
@@ -1307,4 +1307,4 @@ current node is registered.</p>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ components by adding customized setting or overriding kubeadm default settings.<
|
||||
</span></pre><p>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.</p>
|
||||
<p>See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ or
|
||||
https://godoc.org/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration
|
||||
https://pkg.go.dev/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration
|
||||
for kube-proxy official documentation.</p>
|
||||
<pre style="background-color:#fff"><span style="color:#000;font-weight:bold">apiVersion</span>:<span style="color:#bbb"> </span>kubelet.config.k8s.io/v1beta1<span style="color:#bbb">
|
||||
</span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">kind</span>:<span style="color:#bbb"> </span>KubeletConfiguration<span style="color:#bbb">
|
||||
@@ -130,7 +130,7 @@ for kube-proxy official documentation.</p>
|
||||
</span></pre><p>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.</p>
|
||||
<p>See https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ or
|
||||
https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration
|
||||
https://pkg.go.dev/k8s.io/kubelet/config/v1beta1#KubeletConfiguration
|
||||
for kubelet official documentation.</p>
|
||||
<p>Here is a fully populated example of a single YAML file containing multiple
|
||||
configuration types to be used during a <code>kubeadm init</code> run.</p>
|
||||
@@ -1159,7 +1159,7 @@ This information will be annotated to the Node API object, for later re-use</p>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#taint-v1-core"><code>[]core/v1.Taint</code></a>
|
||||
</td>
|
||||
<td>
|
||||
<p><code>tains</code> specifies the taints the Node API object should be registered with.
|
||||
<p><code>taints</code> specifies the taints the Node API object should be registered with.
|
||||
If this field is unset, i.e. nil, in the <code>kubeadm init</code> process it will be defaulted
|
||||
with a control-plane taint for control-plane nodes.
|
||||
If you don't want to taint your control-plane node, set this field to an empty list,
|
||||
|
||||
@@ -68,6 +68,11 @@ kubectl config get-contexts # display list of contexts
|
||||
kubectl config current-context # display the current-context
|
||||
kubectl config use-context my-cluster-name # set the default context to my-cluster-name
|
||||
|
||||
kubectl config set-cluster my-cluster-name # set a cluster entry in the kubeconfig
|
||||
|
||||
# configure the URL to a proxy server to use for requests made by this client in the kubeconfig
|
||||
kubectl config set-cluster my-cluster-name --proxy-url=my-proxy-url
|
||||
|
||||
# add a new user to your kubeconf that supports basic auth
|
||||
kubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=kubepassword
|
||||
|
||||
@@ -182,6 +187,9 @@ kubectl get pods --selector=app=cassandra -o \
|
||||
kubectl get configmap myconfig \
|
||||
-o jsonpath='{.data.ca\.crt}'
|
||||
|
||||
# Retrieve a base64 encoded value with dashes instead of underscores.
|
||||
kubectl get secret my-secret --template='{{index .data "key-name-with-dashes"}}'
|
||||
|
||||
# Get all worker nodes (use a selector to exclude results that have a label
|
||||
# named 'node-role.kubernetes.io/control-plane')
|
||||
kubectl get node --selector='!node-role.kubernetes.io/control-plane'
|
||||
|
||||
@@ -6,7 +6,9 @@ title: kubeadm init
|
||||
content_type: concept
|
||||
weight: 20
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
This command initializes a Kubernetes control-plane node.
|
||||
|
||||
<!-- body -->
|
||||
@@ -26,12 +28,12 @@ following steps:
|
||||
1. Generates a self-signed CA to set up identities for each component in the cluster. The user can provide their
|
||||
own CA cert and/or key by dropping it in the cert directory configured via `--cert-dir`
|
||||
(`/etc/kubernetes/pki` by default).
|
||||
The APIServer certs will have additional SAN entries for any `--apiserver-cert-extra-sans` arguments, lowercased if necessary.
|
||||
The APIServer certs will have additional SAN entries for any `--apiserver-cert-extra-sans`
|
||||
arguments, lowercased if necessary.
|
||||
|
||||
1. Writes kubeconfig files in `/etc/kubernetes/` for
|
||||
the kubelet, the controller-manager and the scheduler to use to connect to the
|
||||
API server, each with its own identity, as well as an additional
|
||||
kubeconfig file for administration named `admin.conf`.
|
||||
1. Writes kubeconfig files in `/etc/kubernetes/` for the kubelet, the controller-manager and the
|
||||
scheduler to use to connect to the API server, each with its own identity, as well as an
|
||||
additional kubeconfig file for administration named `admin.conf`.
|
||||
|
||||
1. Generates static Pod manifests for the API server,
|
||||
controller-manager and scheduler. In case an external etcd is not provided,
|
||||
@@ -76,10 +78,12 @@ following steps:
|
||||
|
||||
Kubeadm allows you to create a control-plane node in phases using the `kubeadm init phase` command.
|
||||
|
||||
To view the ordered list of phases and sub-phases you can call `kubeadm init --help`. The list will be located at the top of the help screen and each phase will have a description next to it.
|
||||
To view the ordered list of phases and sub-phases you can call `kubeadm init --help`. The list
|
||||
will be located at the top of the help screen and each phase will have a description next to it.
|
||||
Note that by calling `kubeadm init` all of the phases and sub-phases will be executed in this exact order.
|
||||
|
||||
Some phases have unique flags, so if you want to have a look at the list of available options add `--help`, for example:
|
||||
Some phases have unique flags, so if you want to have a look at the list of available options add
|
||||
`--help`, for example:
|
||||
|
||||
```shell
|
||||
sudo kubeadm init phase control-plane controller-manager --help
|
||||
@@ -91,7 +95,8 @@ You can also use `--help` to see the list of sub-phases for a certain parent pha
|
||||
sudo kubeadm init phase control-plane --help
|
||||
```
|
||||
|
||||
`kubeadm init` also exposes a flag called `--skip-phases` that can be used to skip certain phases. The flag accepts a list of phase names and the names can be taken from the above ordered list.
|
||||
`kubeadm init` also exposes a flag called `--skip-phases` that can be used to skip certain phases.
|
||||
The flag accepts a list of phase names and the names can be taken from the above ordered list.
|
||||
|
||||
An example:
|
||||
|
||||
@@ -102,7 +107,10 @@ sudo kubeadm init phase etcd local --config=configfile.yaml
|
||||
sudo kubeadm init --skip-phases=control-plane,etcd --config=configfile.yaml
|
||||
```
|
||||
|
||||
What this example would do is write the manifest files for the control plane and etcd in `/etc/kubernetes/manifests` based on the configuration in `configfile.yaml`. This allows you to modify the files and then skip these phases using `--skip-phases`. By calling the last command you will create a control plane node with the custom manifest files.
|
||||
What this example would do is write the manifest files for the control plane and etcd in
|
||||
`/etc/kubernetes/manifests` based on the configuration in `configfile.yaml`. This allows you to
|
||||
modify the files and then skip these phases using `--skip-phases`. By calling the last command you
|
||||
will create a control plane node with the custom manifest files.
|
||||
|
||||
{{< feature-state for_k8s_version="v1.22" state="beta" >}}
|
||||
|
||||
@@ -245,7 +253,7 @@ To set a custom image for these you need to configure this in your
|
||||
to use the image.
|
||||
Consult the documentation for your container runtime to find out how to change this setting;
|
||||
for selected container runtimes, you can also find advice within the
|
||||
[Container Runtimes]((/docs/setup/production-environment/container-runtimes/) topic.
|
||||
[Container Runtimes](/docs/setup/production-environment/container-runtimes/) topic.
|
||||
|
||||
### Uploading control-plane certificates to the cluster
|
||||
|
||||
@@ -280,30 +288,35 @@ and certificate renewal.
|
||||
|
||||
### Managing the kubeadm drop-in file for the kubelet {#kubelet-drop-in}
|
||||
|
||||
The `kubeadm` package ships with a configuration file for running the `kubelet` by `systemd`. Note that the kubeadm CLI never touches this drop-in file. This drop-in file is part of the kubeadm DEB/RPM package.
|
||||
The `kubeadm` package ships with a configuration file for running the `kubelet` by `systemd`.
|
||||
Note that the kubeadm CLI never touches this drop-in file. This drop-in file is part of the kubeadm
|
||||
DEB/RPM package.
|
||||
|
||||
For further information, see [Managing the kubeadm drop-in file for systemd](/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#the-kubelet-drop-in-file-for-systemd).
|
||||
For further information, see
|
||||
[Managing the kubeadm drop-in file for systemd](/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#the-kubelet-drop-in-file-for-systemd).
|
||||
|
||||
### Use kubeadm with CRI runtimes
|
||||
|
||||
By default kubeadm attempts to detect your container runtime. For more details on this detection, see
|
||||
the [kubeadm CRI installation guide](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime).
|
||||
By default kubeadm attempts to detect your container runtime. For more details on this detection,
|
||||
see the [kubeadm CRI installation guide](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-runtime).
|
||||
|
||||
### Setting the node name
|
||||
|
||||
By default, `kubeadm` assigns a node name based on a machine's host address. You can override this setting with the `--node-name` flag.
|
||||
By default, `kubeadm` assigns a node name based on a machine's host address.
|
||||
You can override this setting with the `--node-name` flag.
|
||||
The flag passes the appropriate [`--hostname-override`](/docs/reference/command-line-tools-reference/kubelet/#options)
|
||||
value to the kubelet.
|
||||
|
||||
Be aware that overriding the hostname can [interfere with cloud providers](https://github.com/kubernetes/website/pull/8873).
|
||||
Be aware that overriding the hostname can
|
||||
[interfere with cloud providers](https://github.com/kubernetes/website/pull/8873).
|
||||
|
||||
### Automating kubeadm
|
||||
|
||||
Rather than copying the token you obtained from `kubeadm init` to each node, as
|
||||
in the [basic kubeadm tutorial](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/), you can parallelize the
|
||||
token distribution for easier automation. To implement this automation, you must
|
||||
know the IP address that the control-plane node will have after it is started,
|
||||
or use a DNS name or an address of a load balancer.
|
||||
in the [basic kubeadm tutorial](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/),
|
||||
you can parallelize the token distribution for easier automation. To implement this automation,
|
||||
you must know the IP address that the control-plane node will have after it is started, or use a
|
||||
DNS name or an address of a load balancer.
|
||||
|
||||
1. Generate a token. This token must have the form `<6 character string>.<16
|
||||
character string>`. More formally, it must match the regex:
|
||||
@@ -337,7 +350,11 @@ provisioned). For details, see the [kubeadm join](/docs/reference/setup-tools/ku
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* [kubeadm init phase](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/) to understand more about
|
||||
`kubeadm init` phases
|
||||
* [kubeadm join](/docs/reference/setup-tools/kubeadm/kubeadm-join/) to bootstrap a Kubernetes worker node and join it to the cluster
|
||||
* [kubeadm upgrade](/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/) to upgrade a Kubernetes cluster to a newer version
|
||||
* [kubeadm reset](/docs/reference/setup-tools/kubeadm/kubeadm-reset/) to revert any changes made to this host by `kubeadm init` or `kubeadm join`
|
||||
`kubeadm init` phases
|
||||
* [kubeadm join](/docs/reference/setup-tools/kubeadm/kubeadm-join/) to bootstrap a Kubernetes
|
||||
worker node and join it to the cluster
|
||||
* [kubeadm upgrade](/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/) to upgrade a Kubernetes
|
||||
cluster to a newer version
|
||||
* [kubeadm reset](/docs/reference/setup-tools/kubeadm/kubeadm-reset/) to revert any changes made
|
||||
to this host by `kubeadm init` or `kubeadm join`
|
||||
|
||||
|
||||
@@ -179,9 +179,9 @@ Follow the instructions for [getting started with containerd](https://github.com
|
||||
{{% tab name="Linux" %}}
|
||||
You can find this file under the path `/etc/containerd/config.toml`.
|
||||
{{% /tab %}}
|
||||
{{< tab name="Windows" >}}
|
||||
{{% tab name="Windows" %}}
|
||||
You can find this file under the path `C:\Program Files\containerd\config.toml`.
|
||||
{{< /tab >}}
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
On Linux the default CRI socket for containerd is `/run/containerd/containerd.sock`.
|
||||
|
||||
@@ -41,13 +41,12 @@ See [Running kind with Rootless Docker](https://kind.sigs.k8s.io/docs/user/rootl
|
||||
|
||||
### minikube
|
||||
|
||||
[minikube](https://minikube.sigs.k8s.io/) also supports running Kubernetes inside Rootless Docker.
|
||||
[minikube](https://minikube.sigs.k8s.io/) also supports running Kubernetes inside Rootless Docker or Rootless Podman.
|
||||
|
||||
See the page about the [docker](https://minikube.sigs.k8s.io/docs/drivers/docker/) driver in the Minikube documentation.
|
||||
See the Minikube documentation:
|
||||
|
||||
Rootless Podman is not supported.
|
||||
|
||||
<!-- Supporting rootless podman is discussed in https://github.com/kubernetes/minikube/issues/8719 -->
|
||||
* [Rootless Docker](https://minikube.sigs.k8s.io/docs/drivers/docker/)
|
||||
* [Rootless Podman](https://minikube.sigs.k8s.io/docs/drivers/podman/)
|
||||
|
||||
## Running Kubernetes inside Unprivileged Containers
|
||||
|
||||
|
||||
@@ -68,5 +68,5 @@ e.g. [conformance image](https://github.com/kubernetes/kubernetes/blob/master/te
|
||||
admission controller. To get started with `cosigned` here are a few helpful
|
||||
resources:
|
||||
|
||||
* [Installation](https://github.com/sigstore/helm-charts/tree/main/charts/cosigned)
|
||||
* [Installation](https://github.com/sigstore/cosign#installation)
|
||||
* [Configuration Options](https://github.com/sigstore/cosign/tree/main/config)
|
||||
|
||||
@@ -26,21 +26,16 @@ Therefore, jobs should be idempotent.
|
||||
|
||||
For more limitations, see [CronJobs](/docs/concepts/workloads/controllers/cron-jobs).
|
||||
|
||||
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
* {{< include "task-tutorial-prereqs.md" >}}
|
||||
|
||||
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
## Creating a Cron Job
|
||||
## Creating a CronJob {#creating-a-cron-job}
|
||||
|
||||
Cron jobs require a config file.
|
||||
This example cron job config `.spec` file prints the current time and a hello message every minute:
|
||||
Here is a manifest for a CronJob that runs a simple demonstration task every minute:
|
||||
|
||||
{{< codenew file="application/job/cronjob.yaml" >}}
|
||||
|
||||
@@ -60,6 +55,7 @@ After creating the cron job, get its status using this command:
|
||||
```shell
|
||||
kubectl get cronjob hello
|
||||
```
|
||||
|
||||
The output is similar to this:
|
||||
|
||||
```
|
||||
@@ -102,14 +98,14 @@ You should see that the cron job `hello` successfully scheduled a job at the tim
|
||||
Now, find the pods that the last scheduled job created and view the standard output of one of the pods.
|
||||
|
||||
{{< note >}}
|
||||
The job name and pod name are different.
|
||||
The job name is different from the pod name.
|
||||
{{< /note >}}
|
||||
|
||||
```shell
|
||||
# Replace "hello-4111706356" with the job name in your system
|
||||
pods=$(kubectl get pods --selector=job-name=hello-4111706356 --output=jsonpath={.items[*].metadata.name})
|
||||
```
|
||||
Show pod log:
|
||||
Show the pod log:
|
||||
|
||||
```shell
|
||||
kubectl logs $pods
|
||||
@@ -121,7 +117,7 @@ Fri Feb 22 11:02:09 UTC 2019
|
||||
Hello from the Kubernetes cluster
|
||||
```
|
||||
|
||||
## Deleting a Cron Job
|
||||
## Deleting a CronJob {#deleting-a-cron-job}
|
||||
|
||||
When you don't need a cron job any more, delete it with `kubectl delete cronjob <cronjob name>`:
|
||||
|
||||
@@ -132,16 +128,20 @@ kubectl delete cronjob hello
|
||||
Deleting the cron job removes all the jobs and pods it created and stops it from creating additional jobs.
|
||||
You can read more about removing jobs in [garbage collection](/docs/concepts/architecture/garbage-collection/).
|
||||
|
||||
## Writing a Cron Job Spec
|
||||
## Writing a CronJob Spec {#writing-a-cron-job-spec}
|
||||
|
||||
As with all other Kubernetes configs, a cron job needs `apiVersion`, `kind`, and `metadata` fields. For general
|
||||
information about working with config files, see [deploying applications](/docs/tasks/run-application/run-stateless-application-deployment/),
|
||||
As with all other Kubernetes objects, a CronJob must have `apiVersion`, `kind`, and `metadata` fields.
|
||||
For more information about working with Kubernetes objects and their
|
||||
{{< glossary_tooltip text="manifests" term_id="manifest" >}}, see the
|
||||
[managing resources](/docs/concepts/cluster-administration/manage-deployment/),
|
||||
and [using kubectl to manage resources](/docs/concepts/overview/working-with-objects/object-management/) documents.
|
||||
|
||||
A cron job config also needs a [`.spec` section](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status).
|
||||
Each manifest for a CrobJob also needs a [`.spec`](/docs/concepts/overview/working-with-objects/kubernetes-objects/#object-spec-and-status) section.
|
||||
|
||||
{{< note >}}
|
||||
All modifications to a cron job, especially its `.spec`, are applied only to the following runs.
|
||||
If you modify a CronJob, the changes you make will apply to new jobs that start to run after your modification
|
||||
is complete. Jobs (and their Pods) that have already started continue to run without changes.
|
||||
That is, the CronJob does _not_ update existing jobs, even if those remain running.
|
||||
{{< /note >}}
|
||||
|
||||
### Schedule
|
||||
@@ -153,11 +153,11 @@ as schedule time of its jobs to be created and executed.
|
||||
The format also includes extended "Vixie cron" step values. As explained in the
|
||||
[FreeBSD manual](https://www.freebsd.org/cgi/man.cgi?crontab%285%29):
|
||||
|
||||
> Step values can be used in conjunction with ranges. Following a range
|
||||
> with `/<number>` specifies skips of the number's value through the
|
||||
> range. For example, `0-23/2` can be used in the hours field to specify
|
||||
> command execution every other hour (the alternative in the V7 standard is
|
||||
> `0,2,4,6,8,10,12,14,16,18,20,22`). Steps are also permitted after an
|
||||
> Step values can be used in conjunction with ranges. Following a range
|
||||
> with `/<number>` specifies skips of the number's value through the
|
||||
> range. For example, `0-23/2` can be used in the hours field to specify
|
||||
> command execution every other hour (the alternative in the V7 standard is
|
||||
> `0,2,4,6,8,10,12,14,16,18,20,22`). Steps are also permitted after an
|
||||
> asterisk, so if you want to say "every two hours", just use `*/2`.
|
||||
|
||||
{{< note >}}
|
||||
@@ -221,5 +221,3 @@ The `.spec.successfulJobsHistoryLimit` and `.spec.failedJobsHistoryLimit` fields
|
||||
These fields specify how many completed and failed jobs should be kept.
|
||||
By default, they are set to 3 and 1 respectively. Setting a limit to `0` corresponds to keeping
|
||||
none of the corresponding kind of jobs after they finish.
|
||||
|
||||
|
||||
|
||||
@@ -165,8 +165,8 @@ kubectl create --edit -f /tmp/srv.yaml
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
* [Managing Kubernetes Objects Using Object Configuration (Imperative)](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [Managing Kubernetes Objects Using Object Configuration (Declarative)](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Imperative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [Declarative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ template:
|
||||
|
||||
|
||||
* [Managing Kubernetes Objects Using Imperative Commands](/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [Managing Kubernetes Objects Using Object Configuration (Declarative)](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Declarative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
|
||||
|
||||
+38
-9
@@ -6,34 +6,63 @@ weight: 10
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
In this tutorial you will learn how and why to externalize your microservice’s configuration. Specifically, you will learn how to use Kubernetes ConfigMaps and Secrets to set environment variables and then consume them using MicroProfile Config.
|
||||
In this tutorial you will learn how and why to externalize your microservice’s configuration.
|
||||
Specifically, you will learn how to use Kubernetes ConfigMaps and Secrets to set environment
|
||||
variables and then consume them using MicroProfile Config.
|
||||
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
### Creating Kubernetes ConfigMaps & Secrets
|
||||
There are several ways to set environment variables for a Docker container in Kubernetes, including: Dockerfile, kubernetes.yml, Kubernetes ConfigMaps, and Kubernetes Secrets. In the tutorial, you will learn how to use the latter two for setting your environment variables whose values will be injected into your microservices. One of the benefits for using ConfigMaps and Secrets is that they can be re-used across multiple containers, including being assigned to different environment variables for the different containers.
|
||||
|
||||
ConfigMaps are API Objects that store non-confidential key-value pairs. In the Interactive Tutorial you will learn how to use a ConfigMap to store the application's name. For more information regarding ConfigMaps, you can find the documentation [here](/docs/tasks/configure-pod-container/configure-pod-configmap/).
|
||||
There are several ways to set environment variables for a Docker container in Kubernetes,
|
||||
including: Dockerfile, kubernetes.yml, Kubernetes ConfigMaps, and Kubernetes Secrets. In the
|
||||
tutorial, you will learn how to use the latter two for setting your environment variables whose
|
||||
values will be injected into your microservices. One of the benefits for using ConfigMaps and
|
||||
Secrets is that they can be re-used across multiple containers, including being assigned to
|
||||
different environment variables for the different containers.
|
||||
|
||||
Although Secrets are also used to store key-value pairs, they differ from ConfigMaps in that they're intended for confidential/sensitive information and are stored using Base64 encoding. This makes secrets the appropriate choice for storing such things as credentials, keys, and tokens, the former of which you'll do in the Interactive Tutorial. For more information on Secrets, you can find the documentation [here](/docs/concepts/configuration/secret/).
|
||||
ConfigMaps are API Objects that store non-confidential key-value pairs. In the Interactive
|
||||
Tutorial you will learn how to use a ConfigMap to store the application's name. For more
|
||||
information regarding ConfigMaps, you can find the documentation
|
||||
[here](/docs/tasks/configure-pod-container/configure-pod-configmap/).
|
||||
|
||||
Although Secrets are also used to store key-value pairs, they differ from ConfigMaps in that
|
||||
they're intended for confidential/sensitive information and are stored using Base64 encoding.
|
||||
This makes secrets the appropriate choice for storing such things as credentials, keys, and
|
||||
tokens, the former of which you'll do in the Interactive Tutorial. For more information on
|
||||
Secrets, you can find the documentation [here](/docs/concepts/configuration/secret/).
|
||||
|
||||
|
||||
### Externalizing Config from Code
|
||||
Externalized application configuration is useful because configuration usually changes depending on your environment. In order to accomplish this, we'll use Java's Contexts and Dependency Injection (CDI) and MicroProfile Config. MicroProfile Config is a feature of MicroProfile, a set of open Java technologies for developing and deploying cloud-native microservices.
|
||||
|
||||
CDI provides a standard dependency injection capability enabling an application to be assembled from collaborating, loosely-coupled beans. MicroProfile Config provides apps and microservices a standard way to obtain config properties from various sources, including the application, runtime, and environment. Based on the source's defined priority, the properties are automatically combined into a single set of properties that the application can access via an API. Together, CDI & MicroProfile will be used in the Interactive Tutorial to retrieve the externally provided properties from the Kubernetes ConfigMaps and Secrets and get injected into your application code.
|
||||
Externalized application configuration is useful because configuration usually changes depending
|
||||
on your environment. In order to accomplish this, we'll use Java's Contexts and Dependency
|
||||
Injection (CDI) and MicroProfile Config. MicroProfile Config is a feature of MicroProfile, a set
|
||||
of open Java technologies for developing and deploying cloud-native microservices.
|
||||
|
||||
Many open source frameworks and runtimes implement and support MicroProfile Config. Throughout the interactive tutorial, you'll be using Open Liberty, a flexible open-source Java runtime for building and running cloud-native apps and microservices. However, any MicroProfile compatible runtime could be used instead.
|
||||
CDI provides a standard dependency injection capability enabling an application to be assembled
|
||||
from collaborating, loosely-coupled beans. MicroProfile Config provides apps and microservices a
|
||||
standard way to obtain config properties from various sources, including the application, runtime,
|
||||
and environment. Based on the source's defined priority, the properties are automatically
|
||||
combined into a single set of properties that the application can access via an API. Together,
|
||||
CDI & MicroProfile will be used in the Interactive Tutorial to retrieve the externally provided
|
||||
properties from the Kubernetes ConfigMaps and Secrets and get injected into your application code.
|
||||
|
||||
Many open source frameworks and runtimes implement and support MicroProfile Config. Throughout
|
||||
the interactive tutorial, you'll be using Open Liberty, a flexible open-source Java runtime for
|
||||
building and running cloud-native apps and microservices. However, any MicroProfile compatible
|
||||
runtime could be used instead.
|
||||
|
||||
|
||||
## {{% heading "objectives" %}}
|
||||
|
||||
* Create a Kubernetes ConfigMap and Secret
|
||||
* Inject microservice configuration using MicroProfile Config
|
||||
|
||||
|
||||
<!-- lessoncontent -->
|
||||
|
||||
## Example: Externalizing config using MicroProfile, ConfigMaps and Secrets
|
||||
### [Start Interactive Tutorial](/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/)
|
||||
|
||||
[Start Interactive Tutorial](/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive/)
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ created. This tutorial shows you how to enforce the `baseline` Pod Security
|
||||
Standard at the cluster level which applies a standard configuration
|
||||
to all namespaces in a cluster.
|
||||
|
||||
To apply Pod Security Standards to specific namespaces, refer to [Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss).
|
||||
To apply Pod Security Standards to specific namespaces, refer to
|
||||
[Apply Pod Security Standards at the namespace level](/docs/tutorials/security/ns-level-pss).
|
||||
|
||||
If you are running a version of Kubernetes other than v{{< skew currentVersion >}},
|
||||
check the documentation for that version.
|
||||
|
||||
@@ -17,7 +17,7 @@ one namespace at a time.
|
||||
|
||||
You can also apply Pod Security Standards to multiple namespaces at once at the cluster
|
||||
level. For instructions, refer to
|
||||
[Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss).
|
||||
[Apply Pod Security Standards at the cluster level](/docs/tutorials/security/cluster-level-pss/).
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ zk-2 1/1 Running 0 40s
|
||||
```
|
||||
|
||||
The StatefulSet controller creates three Pods, and each Pod has a container with
|
||||
a [ZooKeeper](https://www-us.apache.org/dist/zookeeper/stable/) server.
|
||||
a [ZooKeeper](https://archive.apache.org/dist/zookeeper/stable/) server.
|
||||
|
||||
### Facilitating leader election
|
||||
|
||||
@@ -305,7 +305,7 @@ numChildren = 0
|
||||
|
||||
### Providing durable storage
|
||||
|
||||
As mentioned in the [ZooKeeper Basics](#zookeeper-basics) section,
|
||||
As mentioned in the [ZooKeeper Basics](#zookeeper) section,
|
||||
ZooKeeper commits all entries to a durable WAL, and periodically writes snapshots
|
||||
in memory state, to storage media. Using WALs to provide durability is a common
|
||||
technique for applications that use consensus protocols to achieve a replicated
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB |
@@ -136,7 +136,7 @@ The general labeling process should be consistent across artifact types.
|
||||
|
||||
## The Release Cycle
|
||||
|
||||

|
||||

|
||||
|
||||
Kubernetes releases currently happen approximately three times per year.
|
||||
|
||||
@@ -204,7 +204,7 @@ back to the release branch. The release is built from the release branch.
|
||||
|
||||
Each release is part of a broader Kubernetes lifecycle:
|
||||
|
||||

|
||||

|
||||
|
||||
## Removal Of Items From The Milestone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user