The IP address for the Kubelet to serve on (set to 0.0.0.0 or :: for listening in all interfaces and IP families) (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The IP address for the Kubelet to serve on (set to 0.0.0.0 or :: for listening in all interfaces and IP families) (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--allowed-unsafe-sysctls strings
-
Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in *). Use these at your own risk. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--alsologtostderr
-
Log to standard error as well as files (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
Log to standard error as well as files (DEPRECATED: will be removed in a future release, see here.)
--anonymous-auth Default: true
-
Enables anonymous requests to the Kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enables anonymous requests to the Kubelet server. Requests that are not rejected by another authentication method are treated as anonymous requests. Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--authentication-token-webhook
-
Use the TokenReview API to determine authentication for bearer tokens. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Use the TokenReview API to determine authentication for bearer tokens. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The duration to cache responses from the webhook token authenticator. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The duration to cache responses from the webhook token authenticator. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--authorization-mode string Default: AlwaysAllow
-
Authorization mode for Kubelet server. Valid options are AlwaysAllow or Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Authorization mode for Kubelet server. Valid options are AlwaysAllow or Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The duration to cache 'authorized' responses from the webhook authorizer. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The duration to cache 'authorized' responses from the webhook authorizer. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The duration to cache 'unauthorized' responses from the webhook authorizer. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The duration to cache 'unauthorized' responses from the webhook authorizer. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
@@ -135,28 +135,28 @@ kubelet [flags]
--cgroup-driver string Default: cgroupfs
-
Driver that the kubelet uses to manipulate cgroups on the host. Possible values: cgroupfs, systemd. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)/td>
+
Driver that the kubelet uses to manipulate cgroups on the host. Possible values: cgroupfs, systemd. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cgroup-root string Default: ''
-
Optional root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Default: '', which means use the container runtime default. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Optional root cgroup to use for pods. This is handled by the container runtime on a best effort basis. Default: '', which means use the container runtime default. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cgroups-per-qos Default: true
-
Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--client-ca-file string
-
If set, any request presenting a client certificate signed by one of the authorities in the client-ca-file is authenticated with an identity corresponding to the CommonName of the client certificate. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
If set, any request presenting a client certificate signed by one of the authorities in the client-ca-file is authenticated with an identity corresponding to the CommonName of the client certificate. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
@@ -177,14 +177,14 @@ kubelet [flags]
--cluster-dns strings
-
Comma-separated list of DNS server IP address. This value is used for containers DNS server in case of Pods with "dnsPolicy=ClusterFirst". Note: all DNS servers appearing in the list MUST serve the same set of records otherwise name resolution within the cluster may not work correctly. There is no guarantee as to which DNS server may be contacted for name resolution. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Comma-separated list of DNS server IP address. This value is used for containers DNS server in case of Pods with "dnsPolicy=ClusterFirst". Note: all DNS servers appearing in the list MUST serve the same set of records otherwise name resolution within the cluster may not work correctly. There is no guarantee as to which DNS server may be contacted for name resolution. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cluster-domain string
-
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 --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
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 --config flag. See kubelet-config-file for more information.)
@@ -219,14 +219,14 @@ kubelet [flags]
--container-log-max-files int32 Default: 5
-
<Warning: Beta feature> Set the maximum number of container log files that can be present for a container. The number must be >= 2. This flag can only be used with --container-runtime=remote. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
<Warning: Beta feature> Set the maximum number of container log files that can be present for a container. The number must be >= 2. This flag can only be used with --container-runtime=remote. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--container-log-max-size string Default: 10Mi
-
<Warning: Beta feature> Set the maximum size (e.g. 10Mi) of container log file before it is rotated. This flag can only be used with --container-runtime=remote. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
<Warning: Beta feature> Set the maximum size (e.g. 10Mi) of container log file before it is rotated. This flag can only be used with --container-runtime=remote. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
@@ -248,42 +248,42 @@ kubelet [flags]
--contention-profiling
-
Enable lock contention profiling, if profiling is enabled (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enable lock contention profiling, if profiling is enabled (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cpu-cfs-quota Default: true
-
Enable CPU CFS quota enforcement for containers that specify CPU limits (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enable CPU CFS quota enforcement for containers that specify CPU limits (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cpu-cfs-quota-period duration Default: 100ms
-
Sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cpu-manager-policy string Default: none
-
CPU Manager policy to use. Possible values: none, static. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
CPU Manager policy to use. Possible values: none, static. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--cpu-manager-policy-options mapStringString
-
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 --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
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 --config flag. See kubelet-config-file for more information.)
<Warning: Alpha feature> CPU Manager reconciliation period. Examples: 10s, or 1m. If not supplied, defaults to node status update frequency. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
<Warning: Alpha feature> CPU Manager reconciliation period. Examples: 10s, or 1m. If not supplied, defaults to node status update frequency. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
@@ -304,84 +304,84 @@ kubelet [flags]
--enable-controller-attach-detach Default: true
-
Enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enables the Attach/Detach controller to manage attachment/detachment of volumes scheduled to this node, and disables kubelet from executing any attach/detach operations. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--enable-debugging-handlers Default: true
-
Enables server endpoints for log collection and local running of containers and commands. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enables server endpoints for log collection and local running of containers and commands. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--enable-server Default: true
-
Enable the Kubelet's server. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Enable the Kubelet's server. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--enforce-node-allocatable strings Default: pods
-
A comma separated list of levels of node allocatable enforcement to be enforced by kubelet. Acceptable options are none, pods, system-reserved, and kube-reserved. If the latter two options are specified, --system-reserved-cgroup and --kube-reserved-cgroup must also be set, respectively. If none is specified, no additional options should be set. See https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ for more details. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A comma separated list of levels of node allocatable enforcement to be enforced by kubelet. Acceptable options are none, pods, system-reserved, and kube-reserved. If the latter two options are specified, --system-reserved-cgroup and --kube-reserved-cgroup must also be set, respectively. If none is specified, no additional options should be set. See here for more details. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--event-burst int32 Default: 10
-
Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding --event-qps. The number must be >= 0. If 0 will use default burst (10). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding --event-qps. The number must be >= 0. If 0 will use default burst (10). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--event-qps int32 Default: 5
-
QPS to limit event creations. The number must be >= 0. If 0 will use default QPS (5). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
QPS to limit event creations. The number must be >= 0. If 0 will use default QPS (5). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction. On a Linux node, the default value also includes nodefs.inodesFree<5%. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction. On a Linux node, the default value also includes nodefs.inodesFree<5%. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--eviction-max-pod-grace-period int32
-
Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. If negative, defer to pod specified value. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met. If negative, defer to pod specified value. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--eviction-minimum-reclaim mapStringString
-
A set of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A set of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--eviction-soft mapStringString
-
A set of eviction thresholds (e.g. memory.available<1.5Gi) that if met over a corresponding grace period would trigger a pod eviction. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A set of eviction thresholds (e.g. memory.available<1.5Gi) that if met over a corresponding grace period would trigger a pod eviction. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--eviction-soft-grace-period mapStringString
-
A set of eviction grace periods (e.g. memory.available=1m30s) that correspond to how long a soft eviction threshold must hold before triggering a pod eviction. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A set of eviction grace periods (e.g. memory.available=1m30s) that correspond to how long a soft eviction threshold must hold before triggering a pod eviction. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
When set to true, hard eviction thresholds will be ignored while calculating node allocatable. See https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ for more details. (DEPRECATED: will be removed in 1.24 or later)
+
When set to true, hard eviction thresholds will be ignored while calculating node allocatable. See here for more details. (DEPRECATED: will be removed in 1.24 or later)
@@ -409,14 +409,14 @@ kubelet [flags]
--experimental-kernel-memcg-notification
-
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 --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
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 --config flag. See kubelet-config-file for more information.)
--experimental-log-sanitization bool
-
[Experimental] When enabled, prevents logging of fields tagged as sensitive (passwords, keys, tokens). Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
[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 --config flag. See kubelet-config-file for more information.)
@@ -430,7 +430,7 @@ kubelet [flags]
--fail-swap-on Default: true
-
Makes the Kubelet fail to start if swap is enabled on the node. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Makes the Kubelet fail to start if swap is enabled on the node. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
@@ -548,35 +548,35 @@ WinDSR=true|false (ALPHA - default=false)
WinOverlay=true|false (BETA - default=true)
WindowsHostProcessContainers=true|false (BETA - default=true)
csiMigrationRBD=true|false (ALPHA - default=false)
-(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--file-check-frequency duration Default: 20s
-
Duration between checking config files for new data. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Duration between checking config files for new data. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--hairpin-mode string Default: promiscuous-bridge
-
How should the kubelet setup hairpin NAT. This allows endpoints of a Service to load balance back to themselves if they should try to access their own Service. Valid values are promiscuous-bridge, hairpin-veth and none. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
How should the kubelet setup hairpin NAT. This allows endpoints of a Service to load balance back to themselves if they should try to access their own Service. Valid values are promiscuous-bridge, hairpin-veth and none. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--healthz-bind-address string Default: 127.0.0.1
-
The IP address for the healthz server to serve on (set to 0.0.0.0 or :: for listening in all interfaces and IP families). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The IP address for the healthz server to serve on (set to 0.0.0.0 or :: for listening in all interfaces and IP families). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--healthz-port int32 Default: 10248
-
The port of the localhost healthz endpoint (set to 0 to disable). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The port of the localhost healthz endpoint (set to 0 to disable). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Duration between checking HTTP for new data. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Duration between checking HTTP for new data. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The percent of disk usage after which image garbage collection is always run. Values must be within the range [0, 100], To disable image garbage collection, set to 100. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The percent of disk usage after which image garbage collection is always run. Values must be within the range [0, 100], To disable image garbage collection, set to 100. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--image-gc-low-threshold int32 Default: 80
-
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 --image-gc-high-threshold. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
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 --image-gc-high-threshold. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The bit of the fwmark space to mark packets for dropping. Must be within the range [0, 31]. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The bit of the fwmark space to mark packets for dropping. Must be within the range [0, 31]. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--iptables-masquerade-bit int32 Default: 14
-
The bit of the fwmark space to mark packets for SNAT. Must be within the range [0, 31]. Please match this parameter with corresponding parameter in kube-proxy. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The bit of the fwmark space to mark packets for SNAT. Must be within the range [0, 31]. Please match this parameter with corresponding parameter in kube-proxy. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--kube-api-burst int32 Default: 10
-
Burst to use while talking with kubernetes API server. The number must be >= 0. If 0 will use default burst (10). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Burst to use while talking with kubernetes API server. The number must be >= 0. If 0 will use default burst (10). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Content type of requests sent to apiserver. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Content type of requests sent to apiserver. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--kube-api-qps int32 Default: 5
-
QPS to use while talking with kubernetes API server. The number must be >= 0. If 0 will use default QPS (5). Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
QPS to use while talking with kubernetes API server. The number must be >= 0. If 0 will use default QPS (5). Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--kube-reserved mapStringString Default: <None>
-
A set of <resource name>=<resource quantity> (e.g. cpu=200m,memory=500Mi,ephemeral-storage=1Gi,pid='100') pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local ephemeral-storage for root file system are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A set of <resource name>=<resource quantity> (e.g. cpu=200m,memory=500Mi,ephemeral-storage=1Gi,pid='100') pairs that describe resources reserved for kubernetes system components. Currently cpu, memory and local ephemeral-storage for root file system are supported. See here for more detail. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--kube-reserved-cgroup string Default: ''
-
Absolute name of the top level cgroup that is used to manage kubernetes components for which compute resources were reserved via --kube-reserved flag. Ex. /kube-reserved. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Absolute name of the top level cgroup that is used to manage kubernetes components for which compute resources were reserved via --kube-reserved flag. Ex. /kube-reserved. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Optional absolute name of cgroups to create and run the Kubelet in. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Optional absolute name of cgroups to create and run the Kubelet in. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--log-backtrace-at <A string of format 'file:line'> Default: ":0"
-
When logging hits line :, emit a stack trace. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
When logging hits line :, emit a stack trace. (DEPRECATED: will be removed in a future release, see here.)
--log-dir string
-
If non-empty, write log files in this directory. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
If non-empty, write log files in this directory. (DEPRECATED: will be removed in a future release, see here.)
--log-file string
-
If non-empty, use this log file. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
If non-empty, use this log file. (DEPRECATED: will be removed in a future release, see here.)
--log-file-max-size uint Default: 1800
-
Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (DEPRECATED: will be removed in a future release, see here.)
[Experimental] In JSON format with split output streams, the info messages can be buffered for a while to increase performance. The default value of zero bytes disables buffering. The size can be specified as number of bytes (512), multiples of 1000 (1K), multiples of 1024 (2Ki), or powers of those (3M, 4G, 5Mi, 6Gi). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
[Experimental] In JSON format with split output streams, the info messages can be buffered for a while to increase performance. The default value of zero bytes disables buffering. The size can be specified as number of bytes (512), multiples of 1000 (1K), multiples of 1024 (2Ki), or powers of those (3M, 4G, 5Mi, 6Gi). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--log-json-split-stream
-
[Experimental] In JSON format, write error messages to stderr and info messages to stdout. The default is to write a single stream to stdout. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
[Experimental] In JSON format, write error messages to stderr and info messages to stdout. The default is to write a single stream to stdout. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--logging-format string Default: text
-
Sets the log format. Permitted formats: text, json. Non-default formats don't honor these flags: --add-dir-header, --alsologtostderr, --log-backtrace-at, --log-dir, --log-file, --log-file-max-size, --logtostderr, --skip_headers, --skip_log_headers, --stderrthreshold, --log-flush-frequency. Non-default choices are currently alpha and subject to change without warning. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Sets the log format. Permitted formats: text, json. Non-default formats don't honor these flags: --add-dir-header, --alsologtostderr, --log-backtrace-at, --log-dir, --log-file, --log-file-max-size, --logtostderr, --skip_headers, --skip_log_headers, --stderrthreshold, --log-flush-frequency. Non-default choices are currently alpha and subject to change without warning. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--logtostderr Default: true
-
log to standard error instead of files. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
log to standard error instead of files. (DEPRECATED: will be removed in a future release, see here.)
--make-iptables-util-chains Default: true
-
If true, kubelet will ensure iptables utility rules are present on host. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
If true, kubelet will ensure iptables utility rules are present on host. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--manifest-url string
-
URL for accessing additional Pod specifications to run (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
URL for accessing additional Pod specifications to run (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--manifest-url-header string
-
Comma-separated list of HTTP headers to use when accessing the URL provided to --manifest-url. Multiple headers with the same name will be added in the same order provided. This flag can be repeatedly invoked. For example: --manifest-url-header 'a:hello,b:again,c:world' --manifest-url-header 'b:beautiful' (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Comma-separated list of HTTP headers to use when accessing the URL provided to --manifest-url. Multiple headers with the same name will be added in the same order provided. This flag can be repeatedly invoked. For example: --manifest-url-header 'a:hello,b:again,c:world' --manifest-url-header 'b:beautiful' (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Number of files that can be opened by Kubelet process. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Number of files that can be opened by Kubelet process. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--max-pods int32 Default: 110
-
Number of Pods that can run on this Kubelet. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Number of Pods that can run on this Kubelet. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Memory Manager policy to use. Possible values: 'None', 'Static'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Memory Manager policy to use. Possible values: 'None', 'Static'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Minimum age for an unused image before it is garbage collected. Examples: '300ms', '10s' or '2h45m'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Minimum age for an unused image before it is garbage collected. Examples: '300ms', '10s' or '2h45m'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The maximum number of images to report in node.status.images. If -1 is specified, no cap will be applied. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The maximum number of images to report in node.status.images. If -1 is specified, no cap will be applied. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in Node controller. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in Node controller. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
If true, only write logs to their native severity level (vs also writing to each lower severity level). (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
If true, only write logs to their native severity level (vs also writing to each lower severity level). (DEPRECATED: will be removed in a future release, see here.)
--oom-score-adj int32 Default: -999
-
The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The oom-score-adj value for kubelet process. Values must be within the range [-1000, 1000]. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--pod-cidr string
-
The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. For IPv6, the maximum number of IP's allocated is 65536 (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master. For IPv6, the maximum number of IP's allocated is 65536 (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Path to the directory containing static pod files to run, or the path to a single static pod file. Files starting with dots will be ignored. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Path to the directory containing static pod files to run, or the path to a single static pod file. Files starting with dots will be ignored. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--pod-max-pids int Default: -1
-
Set the maximum number of processes per pod. If -1, the kubelet defaults to the node allocatable PID capacity. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Set the maximum number of processes per pod. If -1, the kubelet defaults to the node allocatable PID capacity. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--pods-per-core int32
-
Number of Pods per core that can run on this kubelet. The total number of pods on this kubelet cannot exceed --max-pods, so --max-pods will be used if this calculation results in a larger number of pods allowed on the kubelet. A value of 0 disables this limit. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Number of Pods per core that can run on this kubelet. The total number of pods on this kubelet cannot exceed --max-pods, so --max-pods will be used if this calculation results in a larger number of pods allowed on the kubelet. A value of 0 disables this limit. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--port int32 Default: 10250
-
The port for the kubelet to serve on. (DEPRECATED: This parameter should be set via the config file specified by the kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The port for the kubelet to serve on. (DEPRECATED: This parameter should be set via the config file specified by the kubelet's --config flag. See kubelet-config-file for more information.)
--protect-kernel-defaults
-
Default kubelet behaviour for kernel tuning. If set, kubelet errors if any of kernel tunables is different than kubelet defaults. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Default kubelet behaviour for kernel tuning. If set, kubelet errors if any of kernel tunables is different than kubelet defaults. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--provider-id string
-
Unique identifier for identifying the node in a machine database, i.e cloud provider. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Unique identifier for identifying the node in a machine database, i.e cloud provider. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--qos-reserved mapStringString
-
<Warning: Alpha feature> A set of <resource name>=<percentage> (e.g. memory=50%) pairs that describe how pod resource requests are reserved at the QoS level. Currently only memory is supported. Requires the QOSReserved feature gate to be enabled. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
<Warning: Alpha feature> A set of <resource name>=<percentage> (e.g. memory=50%) pairs that describe how pod resource requests are reserved at the QoS level. Currently only memory is supported. Requires the QOSReserved feature gate to be enabled. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--read-only-port int32 Default: 10255
-
The read-only port for the kubelet to serve on with no authentication/authorization (set to 0 to disable). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The read-only port for the kubelet to serve on with no authentication/authorization (set to 0 to disable). (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Register the node with the API server. If --kubeconfig is not provided, this flag is irrelevant, as the Kubelet won't have an API server to register with. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Register the node with the API server. If --kubeconfig is not provided, this flag is irrelevant, as the Kubelet won't have an API server to register with. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Register the node with the given list of taints (comma separated <key>=<value>:<effect>). No-op if --register-node is false. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Register the node with the given list of taints (comma separated <key>=<value>:<effect>). No-op if --register-node is false. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--registry-burst int32 Default: 10
-
Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding --registry-qps. Only used if --registry-qps is greater than 0. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding --registry-qps. Only used if --registry-qps is greater than 0. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--registry-qps int32 Default: 5
-
If > 0, limit registry pull QPS to this value. If 0, unlimited. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
If > 0, limit registry pull QPS to this value. If 0, unlimited. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--reserved-cpus string
-
A comma-separated list of CPUs or CPU ranges that are reserved for system and kubernetes usage. This specific list will supersede cpu counts in --system-reserved and --kube-reserved. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A comma-separated list of CPUs or CPU ranges that are reserved for system and kubernetes usage. This specific list will supersede cpu counts in --system-reserved and --kube-reserved. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--reserved-memory string
-
A comma-separated list of memory reservations for NUMA nodes. (e.g. --reserved-memory 0:memory=1Gi,hugepages-1M=2Gi --reserved-memory 1:memory=2Gi). The total sum for each memory type should be equal to the sum of --kube-reserved, --system-reserved and --eviction-threshold. See https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#reserved-memory-flag for more details. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A comma-separated list of memory reservations for NUMA nodes. (e.g. --reserved-memory 0:memory=1Gi,hugepages-1M=2Gi --reserved-memory 1:memory=2Gi). The total sum for each memory type should be equal to the sum of --kube-reserved, --system-reserved and --eviction-threshold. See here for more details. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--resolv-conf string Default: /etc/resolv.conf
-
Resolver configuration file used as the basis for the container DNS resolution configuration. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Resolver configuration file used as the basis for the container DNS resolution configuration. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
<Warning: Beta feature> Auto rotate the kubelet client certificates by requesting new certificates from the kube-apiserver when the certificate expiration approaches. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
<Warning: Beta feature> Auto rotate the kubelet client certificates by requesting new certificates from the kube-apiserver when the certificate expiration approaches. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--rotate-server-certificates
-
Auto-request and rotate the kubelet serving certificates by requesting new certificates from the kube-apiserver when the certificate expiration approaches. Requires the RotateKubeletServerCertificate feature gate to be enabled, and approval of the submitted CertificateSigningRequest objects. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Auto-request and rotate the kubelet serving certificates by requesting new certificates from the kube-apiserver when the certificate expiration approaches. Requires the RotateKubeletServerCertificate feature gate to be enabled, and approval of the submitted CertificateSigningRequest objects. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--runonce
-
If true, exit after spawning pods from local manifests or remote urls. Exclusive with --enable-server (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
If true, exit after spawning pods from local manifests or remote urls. Exclusive with --enable-server (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Timeout of all runtime requests except long running request - pull, logs, exec and attach. When timeout exceeded, kubelet will cancel the request, throw out an error and retry later. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Timeout of all runtime requests except long running request - pull, logs, exec and attach. When timeout exceeded, kubelet will cancel the request, throw out an error and retry later. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an aufs storage backend. Issue #10959 has more details. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an aufs storage backend. Issue #10959 has more details. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--skip-headers
-
If true, avoid header prefixes in the log messages. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
If true, avoid header prefixes in the log messages. (DEPRECATED: will be removed in a future release, see here.)
--skip-log-headers
-
If true, avoid headers when opening log files. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
If true, avoid headers when opening log files. (DEPRECATED: will be removed in a future release, see here.)
--stderrthreshold int Default: 2
-
logs at or above this threshold go to stderr. (DEPRECATED: will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components)
+
logs at or above this threshold go to stderr. (DEPRECATED: will be removed in a future release, see here.)
Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: 5m. Note: All connections to the kubelet server have a maximum duration of 4 hours. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Maximum time a streaming connection can be idle before the connection is automatically closed. 0 indicates no timeout. Example: 5m. Note: All connections to the kubelet server have a maximum duration of 4 hours. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--sync-frequency duration Default: 1m0s
-
Max period between synchronizing running containers and config. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Max period between synchronizing running containers and config. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--system-cgroups string
-
Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under '/'. Empty for no container. Rolling back the flag requires a reboot. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under '/'. Empty for no container. Rolling back the flag requires a reboot. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--system-reserved mapStringString Default: <none>
-
A set of <resource name>=<resource quantity> (e.g. cpu=200m,memory=500Mi,ephemeral-storage=1Gi,pid='100') pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See http://kubernetes.io/docs/user-guide/compute-resources for more detail. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
A set of <resource name>=<resource quantity> (e.g. cpu=200m,memory=500Mi,ephemeral-storage=1Gi,pid='100') pairs that describe resources reserved for non-kubernetes components. Currently only cpu and memory are supported. See here for more detail. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--system-reserved-cgroup string Default: ''
-
Absolute name of the top level cgroup that is used to manage non-kubernetes components for which compute resources were reserved via --system-reserved flag. Ex. /system-reserved. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Absolute name of the top level cgroup that is used to manage non-kubernetes components for which compute resources were reserved via --system-reserved flag. Ex. /system-reserved. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--tls-cert-file string
-
File containing x509 Certificate used for serving HTTPS (with intermediate certs, if any, concatenated after server cert). If --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to --cert-dir. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
File containing x509 Certificate used for serving HTTPS (with intermediate certs, if any, concatenated after server cert). If --tls-cert-file and --tls-private-key-file are not provided, a self-signed certificate and key are generated for the public address and saved to the directory passed to --cert-dir. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
@@ -1190,21 +1190,21 @@ 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
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 https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--tls-min-version string
-
Minimum TLS version supported. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Minimum TLS version supported. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--tls-private-key-file string
-
File containing x509 private key matching --tls-cert-file. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
File containing x509 private key matching --tls-cert-file. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Topology Manager policy to use. Possible values: 'none', 'best-effort', 'restricted', 'single-numa-node'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Topology Manager policy to use. Possible values: 'none', 'best-effort', 'restricted', 'single-numa-node'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
Scope to which topology hints applied. Topology Manager collects hints from Hint Providers and applies them to defined scope to ensure the pod admission. Possible values: 'container', 'pod'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Scope to which topology hints applied. Topology Manager collects hints from Hint Providers and applies them to defined scope to ensure the pod admission. Possible values: 'container', 'pod'. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
The full path of the directory in which to search for additional third party volume plugins. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
The full path of the directory in which to search for additional third party volume plugins. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
--volume-stats-agg-period duration Default: 1m0s
-
Specifies interval for kubelet to calculate and cache the volume disk usage for all pods and volumes. To disable volume calculations, set to 0. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+
Specifies interval for kubelet to calculate and cache the volume disk usage for all pods and volumes. To disable volume calculations, set to 0. (DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
limits are the limits to place on event queries received.
+Limits can be placed on events received server-wide, per namespace,
+per user, and per source+object.
+At least one limit is required.
type is the type of limit to which this configuration applies
+
+
+
qps[Required]
+int32
+
+
+
qps is the number of event queries per second that are allowed for this
+type of limit. The qps and burst fields are used together to determine if
+a particular event query is accepted. The qps determines how many queries
+are accepted once the burst amount of queries has been exhausted.
+
+
+
burst[Required]
+int32
+
+
+
burst is the burst number of event queries that are allowed for this type
+of limit. The qps and burst fields are used together to determine if a
+particular event query is accepted. The burst determines the maximum size
+of the allowance granted for a particular bucket. For example, if the burst
+is 10 and the qps is 3, then the admission control will accept 10 queries
+before blocking any queries. Every second, 3 more queries will be allowed.
+If some of that allowance is not used, then it will roll over to the next
+second, until the maximum allowance of 10 is reached.
+
+
+
cacheSize
+int32
+
+
+
cacheSize is the size of the LRU cache for this type of limit. If a bucket
+is evicted from the cache, then the allowance for that bucket is reset. If
+more queries are later received for an evicted bucket, then that bucket
+will re-enter the cache with a clean slate, giving that bucket a full
+allowance of burst queries.
+
The default cache size is 4096.
+
If limitType is 'server', then cacheSize is ignored.
Containers is a list of a subset of the information in each container of the Pod being created.
+
+
+
annotations
+map[string]string
+
+
+
Annotations is a list of key-value pairs extracted from the Pod's annotations.
+It only includes keys which match the pattern *.image-policy.k8s.io/*.
+It is up to each webhook backend to determine how to interpret these annotations, if at all.
+
+
+
namespace
+string
+
+
+
Namespace is the namespace the pod is being created in.
ImageReviewStatus is the result of the review for the pod creation request.
+
+
+
+
Field
Description
+
+
+
+
allowed[Required]
+bool
+
+
+
Allowed indicates that all images were allowed to be run.
+
+
+
reason
+string
+
+
+
Reason should be empty unless Allowed is false in which case it
+may contain a short description of what is wrong. Kubernetes
+may truncate excessively long errors when displaying to the user.
+
+
+
auditAnnotations
+map[string]string
+
+
+
AuditAnnotations will be added to the attributes object of the
+admission controller request using 'AddAnnotation'. The keys should
+be prefix-less (i.e., the admission controller will add an
+appropriate prefix).
+
+
+
+
+
\ No newline at end of file
diff --git a/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md b/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md
index 5d75df5b53..377ac021b6 100644
--- a/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md
+++ b/content/en/docs/reference/config-api/kubeadm-config.v1beta2.md
@@ -143,7 +143,7 @@ configuration types to be used during a kubeadm init run.
tlsBootstrapToken is a token used for TLS bootstrapping.
-If bootstrapToken is set, this field is defaulted to .bootstrapToken.token, but can be overridden. If file is set, this field must be set in case the KubeConfigFile does not
+If bootstrapToken is set, this field is defaulted to .bootstrapToken.token,
+but can be overridden.
+If file is set, this field must be set in case the KubeConfigFile does not
contain any other authentication information.
@@ -1267,7 +1269,7 @@ Defaults to the hostname of the node if not provided.
string
-
criSocket is used to retrieve container runtime information. This information will
+
criSocket is used to retrieve container runtime information. This information will
be annotated to the Node API object, for later re-use.
@@ -1276,9 +1278,9 @@ be annotated to the Node API object, for later re-use.
taints specifies the taints the Node API object should be registered with.
-If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted to
-'node-role.kubernetes.io/master=""'. If you don't want to taint your control-plane node,
-set this field to an empty list, i.e. taints: [] in the YAML file. This field is
+If this field is unset, i.e. nil, in the kubeadm init 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, i.e. taints: [], in the YAML file. This field is
solely used for Node registration.
diff --git a/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md b/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md
index ca7ef7c287..75fc7c1ecf 100644
--- a/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md
+++ b/content/en/docs/reference/config-api/kubeadm-config.v1beta3.md
@@ -152,7 +152,7 @@ configuration types to be used during a kubeadm init run.
criSocket:"/var/run/dockershim.sock"taints:- key:"kubeadmNode"
-value:"master"
+value:"someValue"effect:"NoSchedule"kubeletExtraArgs:v:4
@@ -1160,9 +1160,9 @@ This information will be annotated to the Node API object, for later re-use
tains specifies the taints the Node API object should be registered with.
-If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted to
-taints: ["node-role.kubernetes.io/master:""].
-If you don't want to taint your control-plane node, set this field to an empty slice,
+If this field is unset, i.e. nil, in the kubeadm init 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,
i.e. taints: [] in the YAML file. This field is solely used for Node registration.
diff --git a/content/en/docs/reference/kubectl/cheatsheet.md b/content/en/docs/reference/kubectl/cheatsheet.md
index e1711ea542..3412175285 100644
--- a/content/en/docs/reference/kubectl/cheatsheet.md
+++ b/content/en/docs/reference/kubectl/cheatsheet.md
@@ -280,7 +280,7 @@ kubectl patch deployment valid-deployment --type json -p='[{"op": "remove", "
# Add a new element to a positional array
kubectl patch sa default --type='json' -p='[{"op": "add", "path": "/secrets/1", "value": {"name": "whatever" } }]'
-# Update a deployment's replicas count by patching it's scale subresource
+# Update a deployment's replica count by patching its scale subresource
kubectl patch deployment nginx-deployment --subresource='scale' --type='merge' -p '{"spec":{"replicas":2}}'
```
diff --git a/content/en/docs/reference/labels-annotations-taints/_index.md b/content/en/docs/reference/labels-annotations-taints/_index.md
index e68cb668d3..6622c63941 100644
--- a/content/en/docs/reference/labels-annotations-taints/_index.md
+++ b/content/en/docs/reference/labels-annotations-taints/_index.md
@@ -334,6 +334,24 @@ Used on: Service
Kubernetes uses this label to differentiate multiple Services. Used currently for `ELB`(Elastic Load Balancer) only.
+### kubernetes.io/service-account.name
+
+Example: `kubernetes.io/service-account.name: "sa-name"`
+
+Used on: Secret
+
+This annotation records the {{< glossary_tooltip term_id="name" text="name">}} of the
+ServiceAccount that the token (stored in the Secret of type `kubernetes.io/service-account-token`) represents.
+
+### kubernetes.io/service-account.uid
+
+Example: `kubernetes.io/service-account.uid: da68f9c6-9d26-11e7-b84e-002dc52800da`
+
+Used on: Secret
+
+This annotation records the {{< glossary_tooltip term_id="uid" text="unique ID" >}} of the
+ServiceAccount that the token (stored in the Secret of type `kubernetes.io/service-account-token`) represents.
+
### endpointslice.kubernetes.io/managed-by {#endpointslicekubernetesiomanaged-by}
Example: `endpointslice.kubernetes.io/managed-by="controller"`
diff --git a/content/en/docs/reference/using-api/deprecation-guide.md b/content/en/docs/reference/using-api/deprecation-guide.md
index b72b60fb5a..d448344504 100644
--- a/content/en/docs/reference/using-api/deprecation-guide.md
+++ b/content/en/docs/reference/using-api/deprecation-guide.md
@@ -110,8 +110,10 @@ The **policy/v1beta1** API version of PodDisruptionBudget will no longer be serv
PodSecurityPolicy in the **policy/v1beta1** API version will no longer be served in v1.25, and the PodSecurityPolicy admission controller will be removed.
-PodSecurityPolicy replacements are still under discussion, but current use can be migrated to
-[3rd-party admission webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/) now.
+Migrate to [Pod Security Admission](/docs/concepts/security/pod-security-admission/)
+or a [3rd party admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/).
+For a migration guide, see [Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller](/docs/tasks/configure-pod-container/migrate-from-psp/).
+For more information on the deprecation, see [PodSecurityPolicy Deprecation: Past, Present, and Future](/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/).
#### RuntimeClass {#runtimeclass-v125}
diff --git a/content/en/docs/reference/using-api/server-side-apply.md b/content/en/docs/reference/using-api/server-side-apply.md
index 6b932278dc..e9f951a76a 100644
--- a/content/en/docs/reference/using-api/server-side-apply.md
+++ b/content/en/docs/reference/using-api/server-side-apply.md
@@ -125,7 +125,8 @@ this occurs, the applier has 3 options to resolve the conflicts:
* **Overwrite value, become sole manager:** If overwriting the value was
intentional (or if the applier is an automated process like a controller) the
- applier should set the `force` query parameter to true and make the request
+ applier should set the `force` query parameter to true (in kubectl, it can be done by
+ using the `--force-conflicts` flag with the apply command) and make the request
again. This forces the operation to succeed, changes the value of the field,
and removes the field from all other managers' entries in managedFields.
diff --git a/content/en/docs/setup/production-environment/container-runtimes.md b/content/en/docs/setup/production-environment/container-runtimes.md
index 6f9b174631..e373de5dbf 100644
--- a/content/en/docs/setup/production-environment/container-runtimes.md
+++ b/content/en/docs/setup/production-environment/container-runtimes.md
@@ -167,15 +167,12 @@ using the (deprecated) v1alpha2 API instead.
{{% thirdparty-content %}}
-
### containerd
This section outlines the necessary steps to use containerd as CRI runtime.
Use the following commands to install Containerd on your system:
-
-
Follow the instructions for [getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md). Return to this step once you've created a valid configuration file, `config.toml`.
{{< tabs name="Finding your config.toml file" >}}
@@ -200,6 +197,14 @@ To use the `systemd` cgroup driver in `/etc/containerd/config.toml` with `runc`,
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
```
+{{< note >}}
+If you installed containerd from a package (for example, RPM or `.deb`), you may find
+that the CRI integration plugin is disabled by default.
+
+You need CRI support enabled to use containerd with Kubernetes. Make sure that `cri`
+is not included in the`disabled_plugins` list within `/etc/containerd/config.toml`;
+if you made changes to that file, also restart `containerd`.
+{{< /note >}}
If you apply this change, make sure to restart containerd:
@@ -208,7 +213,7 @@ sudo systemctl restart containerd
```
When using kubeadm, manually configure the
-[cgroup driver for kubelet](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-control-plane-node).
+[cgroup driver for kubelet](/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/#configuring-the-kubelet-cgroup-driver).
### CRI-O
diff --git a/content/en/docs/setup/production-environment/windows/intro-windows-in-kubernetes.md b/content/en/docs/setup/production-environment/windows/intro-windows-in-kubernetes.md
deleted file mode 100644
index 687d544c91..0000000000
--- a/content/en/docs/setup/production-environment/windows/intro-windows-in-kubernetes.md
+++ /dev/null
@@ -1,917 +0,0 @@
----
-reviewers:
-- jayunit100
-- jsturtevant
-- marosset
-- perithompson
-title: Windows containers in Kubernetes
-content_type: concept
-weight: 65
----
-
-
-
-Windows applications constitute a large portion of the services and applications that
-run in many organizations. [Windows containers](https://aka.ms/windowscontainers)
-provide a way to encapsulate processes and package dependencies, making it easier
-to use DevOps practices and follow cloud native patterns for Windows applications.
-
-Organizations with investments in Windows-based applications and Linux-based
-applications don't have to look for separate orchestrators to manage their workloads,
-leading to increased operational efficiencies across their deployments, regardless
-of operating system.
-
-
-
-## Windows nodes in Kubernetes
-
-To enable the orchestration of Windows containers in Kubernetes, include Windows nodes
-in your existing Linux cluster. Scheduling Windows containers in
-{{< glossary_tooltip text="Pods" term_id="pod" >}} on Kubernetes is similar to
-scheduling Linux-based containers.
-
-In order to run Windows containers, your Kubernetes cluster must include
-multiple operating systems.
-While you can only run the {{< glossary_tooltip text="control plane" term_id="control-plane" >}} on Linux, you can deploy worker nodes running either Windows or Linux depending on your workload needs.
-
-Windows {{< glossary_tooltip text="nodes" term_id="node" >}} are
-[supported](#windows-os-version-support) provided that the operating system is
-Windows Server 2019.
-
-This document uses the term *Windows containers* to mean Windows containers with
-process isolation. Kubernetes does not support running Windows containers with
-[Hyper-V isolation](https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container).
-
-## Compatibility and limitations {#limitations}
-
-Some node features are only available if you use a specific
-[container runtime](#container-runtime); others are not available on Windows nodes,
-including:
-
-* HugePages: not supported for Windows containers
-* Privileged containers: not supported for Windows containers
-* TerminationGracePeriod: requires containerD
-
-Not all features of shared namespaces are supported. See [API compatibility](#api)
-for more details.
-
-See [Windows OS version compatibility](#windows-os-version-support) for details on
-the Windows versions that Kubernetes is tested against.
-
-From an API and kubectl perspective, Windows containers behave in much the same
-way as Linux-based containers. However, there are some notable differences in key
-functionality which are outlined in this section.
-
-### Comparison with Linux {#compatibility-linux-similarities}
-
-Key Kubernetes elements work the same way in Windows as they do in Linux. This
-section refers to several key workload enablers and how they map to Windows.
-
-* [Pods](/docs/concepts/workloads/pods/)
-
- A Pod is the basic building block of Kubernetes–the smallest and simplest unit in
- the Kubernetes object model that you create or deploy. You may not deploy Windows and
- Linux containers in the same Pod. All containers in a Pod are scheduled onto a single
- Node where each Node represents a specific platform and architecture. The following
- Pod capabilities, properties and events are supported with Windows containers:
-
- * Single or multiple containers per Pod with process isolation and volume sharing
- * Pod `status` fields
- * Readiness and Liveness probes
- * postStart & preStop container lifecycle events
- * ConfigMap, Secrets: as environment variables or volumes
- * `emptyDir` volumes
- * Named pipe host mounts
- * Resource limits
- * OS field:
-
- The `.spec.os.name` field should be set to `windows` to indicate that the current Pod uses Windows containers.
- The `IdentifyPodOS` feature gate needs to be enabled for this field to be recognized and used by control plane
- components and kubelet.
-
- {{< note >}}
- Starting from 1.24, the `IdentifyPodOS` feature gate is in Beta stage and defaults to be enabled.
- {{< /note >}}
-
- If the `IdentifyPodOS` feature gate is enabled and you set the `.spec.os.name` field to `windows`,
- you must not set the following fields in the `.spec` of that Pod:
-
- * `spec.hostPID`
- * `spec.hostIPC`
- * `spec.securityContext.seLinuxOptions`
- * `spec.securityContext.seccompProfile`
- * `spec.securityContext.fsGroup`
- * `spec.securityContext.fsGroupChangePolicy`
- * `spec.securityContext.sysctls`
- * `spec.shareProcessNamespace`
- * `spec.securityContext.runAsUser`
- * `spec.securityContext.runAsGroup`
- * `spec.securityContext.supplementalGroups`
- * `spec.containers[*].securityContext.seLinuxOptions`
- * `spec.containers[*].securityContext.seccompProfile`
- * `spec.containers[*].securityContext.capabilities`
- * `spec.containers[*].securityContext.readOnlyRootFilesystem`
- * `spec.containers[*].securityContext.privileged`
- * `spec.containers[*].securityContext.allowPrivilegeEscalation`
- * `spec.containers[*].securityContext.procMount`
- * `spec.containers[*].securityContext.runAsUser`
- * `spec.containers[*].securityContext.runAsGroup`
-
- In the above list, wildcards (`*`) indicate all elements in a list.
- For example, `spec.containers[*].securityContext` refers to the SecurityContext object
- for all containers. If any of these fields is specified, the Pod will
- not be admited by the API server.
-
-* [Workload resources](/docs/concepts/workloads/controllers/) including:
- * ReplicaSet
- * Deployments
- * StatefulSets
- * DaemonSet
- * Job
- * CronJob
- * ReplicationController
-* {{< glossary_tooltip text="Services" term_id="service" >}}
- See [Load balancing and Services](#load-balancing-and-services) for more details.
-
-Pods, workload resources, and Services are critical elements to managing Windows
-workloads on Kubernetes. However, on their own they are not enough to enable
-the proper lifecycle management of Windows workloads in a dynamic cloud native
-environment. Kubernetes also supports:
-
-* `kubectl exec`
-* Pod and container metrics
-* {{< glossary_tooltip text="Horizontal pod autoscaling" term_id="horizontal-pod-autoscaler" >}}
-* {{< glossary_tooltip text="Resource quotas" term_id="resource-quota" >}}
-* Scheduler preemption
-
-
-### Networking on Windows nodes {#compatibility-networking}
-
-Networking for Windows containers is exposed through
-[CNI plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/).
-Windows containers function similarly to virtual machines in regards to
-networking. Each container has a virtual network adapter (vNIC) which is connected
-to a Hyper-V virtual switch (vSwitch). The Host Networking Service (HNS) and the
-Host Compute Service (HCS) work together to create containers and attach container
-vNICs to networks. HCS is responsible for the management of containers whereas HNS
-is responsible for the management of networking resources such as:
-
-* Virtual networks (including creation of vSwitches)
-* Endpoints / vNICs
-* Namespaces
-* Policies including packet encapsulations, load-balancing rules, ACLs, and NAT rules.
-
-#### Container networking {#networking}
-
-The Windows HNS and vSwitch implement namespacing and can
-create virtual NICs as needed for a pod or container. However, many configurations such
-as DNS, routes, and metrics are stored in the Windows registry database rather than as
-files inside `/etc`, which is how Linux stores those configurations. The Windows registry for the container
-is separate from that of the host, so concepts like mapping `/etc/resolv.conf` from
-the host into a container don't have the same effect they would on Linux. These must
-be configured using Windows APIs run in the context of that container. Therefore
-CNI implementations need to call the HNS instead of relying on file mappings to pass
-network details into the pod or container.
-
-The following networking functionality is _not_ supported on Windows nodes:
-
-* Host networking mode
-* Local NodePort access from the node itself (works for other nodes or external clients)
-* More than 64 backend pods (or unique destination addresses) for a single Service
-* IPv6 communication between Windows pods connected to overlay networks
-* Local Traffic Policy in non-DSR mode
-* Outbound communication using the ICMP protocol via the `win-overlay`, `win-bridge`, or using the Azure-CNI plugin.\
- Specifically, the Windows data plane ([VFP](https://www.microsoft.com/en-us/research/project/azure-virtual-filtering-platform/)) doesn't support ICMP packet transpositions, and this means:
- * ICMP packets directed to destinations within the same network (such as pod to pod communication via ping) work as expected and without any limitations;
- * TCP/UDP packets work as expected and without any limitations;
- * ICMP packets directed to pass through a remote network (e.g. pod to external internet communication via ping) cannot be transposed and thus will not be routed back to their source;
- * Since TCP/UDP packets can still be transposed, you can substitute `ping ` with `curl ` to get some debugging insight into connectivity with the outside world.
-
-Overlay networking support in kube-proxy is a beta feature. In addition, it requires
-[KB4482887](https://support.microsoft.com/en-us/help/4482887/windows-10-update-kb4482887)
-to be installed on Windows Server 2019.
-
-#### Network modes
-
-Windows supports five different networking drivers/modes: L2bridge, L2tunnel,
-Overlay (beta), Transparent, and NAT. In a heterogeneous cluster with Windows and Linux
-worker nodes, you need to select a networking solution that is compatible on both
-Windows and Linux. The following out-of-tree plugins are supported on Windows,
-with recommendations on when to use each CNI:
-
-| Network Driver | Description | Container Packet Modifications | Network Plugins | Network Plugin Characteristics |
-| -------------- | ----------- | ------------------------------ | --------------- | ------------------------------ |
-| L2bridge | Containers are attached to an external vSwitch. Containers are attached to the underlay network, although the physical network doesn't need to learn the container MACs because they are rewritten on ingress/egress. | MAC is rewritten to host MAC, IP may be rewritten to host IP using HNS OutboundNAT policy. | [win-bridge](https://github.com/containernetworking/plugins/tree/master/plugins/main/windows/win-bridge), [Azure-CNI](https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md), Flannel host-gateway uses win-bridge | win-bridge uses L2bridge network mode, connects containers to the underlay of hosts, offering best performance. Requires user-defined routes (UDR) for inter-node connectivity. |
-| L2Tunnel | This is a special case of l2bridge, but only used on Azure. All packets are sent to the virtualization host where SDN policy is applied. | MAC rewritten, IP visible on the underlay network | [Azure-CNI](https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md) | Azure-CNI allows integration of containers with Azure vNET, and allows them to leverage the set of capabilities that [Azure Virtual Network provides](https://azure.microsoft.com/en-us/services/virtual-network/). For example, securely connect to Azure services or use Azure NSGs. See [azure-cni for some examples](https://docs.microsoft.com/en-us/azure/aks/concepts-network#azure-cni-advanced-networking) |
-| Overlay (Overlay networking for Windows in Kubernetes is in *alpha* stage) | Containers are given a vNIC connected to an external vSwitch. Each overlay network gets its own IP subnet, defined by a custom IP prefix.The overlay network driver uses VXLAN encapsulation. | Encapsulated with an outer header. | [win-overlay](https://github.com/containernetworking/plugins/tree/master/plugins/main/windows/win-overlay), Flannel VXLAN (uses win-overlay) | win-overlay should be used when virtual container networks are desired to be isolated from underlay of hosts (e.g. for security reasons). Allows for IPs to be re-used for different overlay networks (which have different VNID tags) if you are restricted on IPs in your datacenter. This option requires [KB4489899](https://support.microsoft.com/help/4489899) on Windows Server 2019. |
-| Transparent (special use case for [ovn-kubernetes](https://github.com/openvswitch/ovn-kubernetes)) | Requires an external vSwitch. Containers are attached to an external vSwitch which enables intra-pod communication via logical networks (logical switches and routers). | Packet is encapsulated either via [GENEVE](https://datatracker.ietf.org/doc/draft-gross-geneve/) or [STT](https://datatracker.ietf.org/doc/draft-davie-stt/) tunneling to reach pods which are not on the same host. Packets are forwarded or dropped via the tunnel metadata information supplied by the ovn network controller. NAT is done for north-south communication. | [ovn-kubernetes](https://github.com/openvswitch/ovn-kubernetes) | [Deploy via ansible](https://github.com/openvswitch/ovn-kubernetes/tree/master/contrib). Distributed ACLs can be applied via Kubernetes policies. IPAM support. Load-balancing can be achieved without kube-proxy. NATing is done without using iptables/netsh. |
-| NAT (*not used in Kubernetes*) | Containers are given a vNIC connected to an internal vSwitch. DNS/DHCP is provided using an internal component called [WinNAT](https://techcommunity.microsoft.com/t5/virtualization/windows-nat-winnat-capabilities-and-limitations/ba-p/382303) | MAC and IP is rewritten to host MAC/IP. | [nat](https://github.com/Microsoft/windows-container-networking/tree/master/plugins/nat) | Included here for completeness |
-
-As outlined above, the [Flannel](https://github.com/coreos/flannel)
-CNI [meta plugin](https://github.com/containernetworking/plugins/tree/master/plugins/meta/flannel)
-is also [supported](https://github.com/containernetworking/plugins/tree/master/plugins/meta/flannel#windows-support-experimental) on Windows via the
-[VXLAN network backend](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#vxlan) (**alpha support** ; delegates to win-overlay)
-and [host-gateway network backend](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#host-gw) (stable support; delegates to win-bridge).
-
-This plugin supports delegating to one of the reference CNI plugins (win-overlay,
-win-bridge), to work in conjunction with Flannel daemon on Windows (Flanneld) for
-automatic node subnet lease assignment and HNS network creation. This plugin reads
-in its own configuration file (cni.conf), and aggregates it with the environment
-variables from the FlannelD generated subnet.env file. It then delegates to one of
-the reference CNI plugins for network plumbing, and sends the correct configuration
-containing the node-assigned subnet to the IPAM plugin (for example: `host-local`).
-
-For Node, Pod, and Service objects, the following network flows are supported for
-TCP/UDP traffic:
-
-* Pod → Pod (IP)
-* Pod → Pod (Name)
-* Pod → Service (Cluster IP)
-* Pod → Service (PQDN, but only if there are no ".")
-* Pod → Service (FQDN)
-* Pod → external (IP)
-* Pod → external (DNS)
-* Node → Pod
-* Pod → Node
-
-#### CNI plugin limitations
-
-* Windows reference network plugins win-bridge and win-overlay do not implement
- [CNI spec](https://github.com/containernetworking/cni/blob/master/SPEC.md) v0.4.0,
- due to a missing `CHECK` implementation.
-* The Flannel VXLAN CNI plugin has the following limitations on Windows:
-
-1. Node-pod connectivity isn't possible by design. It's only possible for local pods with Flannel v0.12.0 (or higher).
-2. Flannel is restricted to using VNI 4096 and UDP port 4789. See the official
- [Flannel VXLAN](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#vxlan)
- backend docs for more details on these parameters.
-
-#### IP address management (IPAM) {#ipam}
-
-The following IPAM options are supported on Windows:
-
-* [host-local](https://github.com/containernetworking/plugins/tree/master/plugins/ipam/host-local)
-* HNS IPAM (Inbox platform IPAM, this is a fallback when no IPAM is set)
-* [azure-vnet-ipam](https://github.com/Azure/azure-container-networking/blob/master/docs/ipam.md) (for azure-cni only)
-
-#### Load balancing and Services
-
-A Kubernetes {{< glossary_tooltip text="Service" term_id="service" >}} is an abstraction
-that defines a logical set of Pods and a means to access them over a network.
-In a cluster that includes Windows nodes, you can use the following types of Service:
-
- * `NodePort`
- * `ClusterIP`
- * `LoadBalancer`
- * `ExternalName`
-
-{{< warning >}}
-There are known issue with NodePort services on overlay networking, if the target destination node is running Windows Server 2022.
-To avoid the issue entirely, you can configure the service with `externalTrafficPolicy: Local`.
-
-There are known issues with pod to pod connectivity on l2bridge network on Windows Server 2022 with KB5005619 or higher installed.
-To workaround the issue and restore pod-pod connectivity, you can disable the WinDSR feature in kube-proxy.
-
-These issues require OS fixes.
-Please follow https://github.com/microsoft/Windows-Containers/issues/204 for updates.
-{{< /warning >}}
-
-Windows container networking differs in some important ways from Linux networking.
-The [Microsoft documentation for Windows Container Networking](https://docs.microsoft.com/en-us/virtualization/windowscontainers/container-networking/architecture) provides
-additional details and background.
-
-On Windows, you can use the following settings to configure Services and load
-balancing behavior:
-
-{{< table caption="Windows Service Settings" >}}
-| Feature | Description | Supported Kubernetes version | Supported Windows OS build | How to enable |
-| ------- | ----------- | ----------------------------- | -------------------------- | ------------- |
-| Session affinity | Ensures that connections from a particular client are passed to the same Pod each time. | v1.20+ | [Windows Server vNext Insider Preview Build 19551](https://blogs.windows.com/windowsexperience/2020/01/28/announcing-windows-server-vnext-insider-preview-build-19551/) (or higher) | Set `service.spec.sessionAffinity` to "ClientIP" |
-| Direct Server Return (DSR) | Load balancing mode where the IP address fixups and the LBNAT occurs at the container vSwitch port directly; service traffic arrives with the source IP set as the originating pod IP. | v1.20+ | Windows Server 2019 | Set the following flags in kube-proxy: `--feature-gates="WinDSR=true" --enable-dsr=true` |
-| Preserve-Destination | Skips DNAT of service traffic, thereby preserving the virtual IP of the target service in packets reaching the backend Pod. Also disables node-node forwarding. | v1.20+ | Windows Server, version 1903 (or higher) | Set `"preserve-destination": "true"` in service annotations and enable DSR in kube-proxy. |
-| IPv4/IPv6 dual-stack networking | Native IPv4-to-IPv4 in parallel with IPv6-to-IPv6 communications to, from, and within a cluster | v1.19+ | Windows Server, version 2019 | See [IPv4/IPv6 dual-stack](#ipv4ipv6-dual-stack) |
-| Client IP preservation | Ensures that source IP of incoming ingress traffic gets preserved. Also disables node-node forwarding. | v1.20+ | Windows Server, version 2019 | Set `service.spec.externalTrafficPolicy` to "Local" and enable DSR in kube-proxy |
-{{< /table >}}
-
-##### Session affinity
-
-Setting the maximum session sticky time for Windows services using
-`service.spec.sessionAffinityConfig.clientIP.timeoutSeconds` is not supported.
-
-#### DNS {#dns-limitations}
-
-* ClusterFirstWithHostNet is not supported for DNS. Windows treats all names with a
- `.` as a FQDN and skips FQDN resolution
-* On Linux, you have a DNS suffix list, which is used when trying to resolve PQDNs. On
- Windows, you can only have 1 DNS suffix, which is the DNS suffix associated with that
- pod's namespace (mydns.svc.cluster.local for example). Windows can resolve FQDNs
- and services or names resolvable with just that suffix. For example, a pod spawned
- in the default namespace, will have the DNS suffix **default.svc.cluster.local**.
- Inside a Windows pod, you can resolve both **kubernetes.default.svc.cluster.local**
- and **kubernetes**, but not the in-betweens, like **kubernetes.default** or
- **kubernetes.default.svc**.
-* On Windows, there are multiple DNS resolvers that can be used. As these come with
- slightly different behaviors, using the `Resolve-DNSName` utility for name query
- resolutions is recommended.
-
-#### IPv6 networking
-
-Kubernetes on Windows does not support single-stack "IPv6-only" networking. However,
-dual-stack IPv4/IPv6 networking for pods and nodes with single-family services
-is supported.
-
-You can use IPv4/IPv6 dual-stack networking with `l2bridge` networks. See [configure IPv4/IPv6 dual stack](/docs/concepts/services-networking/dual-stack#configure-ipv4-ipv6-dual-stack) for more details.
-
-{{< note >}}
-Overlay (VXLAN) networks on Windows do not support dual-stack networking.
-{{< /note >}}
-
-### Persistent storage {#compatibility-storage}
-
-Windows has a layered filesystem driver to mount container layers and create a copy
-filesystem based on NTFS. All file paths in the container are resolved only within
-the context of that container.
-
-* With Docker, volume mounts can only target a directory in the container, and not
- an individual file. This limitation does not exist with CRI-containerD runtime.
-* Volume mounts cannot project files or directories back to the host filesystem.
-* Read-only filesystems are not supported because write access is always required
- for the Windows registry and SAM database. However, read-only volumes are supported.
-* Volume user-masks and permissions are not available. Because the SAM is not shared
- between the host & container, there's no mapping between them. All permissions are
- resolved within the context of the container.
-
-As a result, the following storage functionality is not supported on Windows nodes:
-
-* Volume subpath mounts: only the entire volume can be mounted in a Windows container
-* Subpath volume mounting for Secrets
-* Host mount projection
-* Read-only root filesystem (mapped volumes still support `readOnly`)
-* Block device mapping
-* Memory as the storage medium (for example, `emptyDir.medium` set to `Memory`)
-* File system features like uid/gid; per-user Linux filesystem permissions
-* DefaultMode (due to UID/GID dependency)
-* NFS based storage/volume support
-* Expanding the mounted volume (resizefs)
-
-Kubernetes {{< glossary_tooltip text="volumes" term_id="volume" >}} enable complex
-applications, with data persistence and Pod volume sharing requirements, to be deployed
-on Kubernetes. Management of persistent volumes associated with a specific storage
-back-end or protocol includes actions such as provisioning/de-provisioning/resizing
-of volumes, attaching/detaching a volume to/from a Kubernetes node and
-mounting/dismounting a volume to/from individual containers in a pod that needs to
-persist data.
-
-The code implementing these volume management actions for a specific storage back-end
-or protocol is shipped in the form of a Kubernetes volume
-[plugin](/docs/concepts/storage/volumes/#types-of-volumes).
-The following broad classes of Kubernetes volume plugins are supported on Windows:
-
-##### In-tree volume plugins
-
-Code associated with in-tree volume plugins ship as part of the core Kubernetes code
-base. Deployment of in-tree volume plugins do not require installation of additional
-scripts or deployment of separate containerized plugin components. These plugins can
-handle provisioning/de-provisioning and resizing of volumes in the storage backend,
-attaching/detaching of volumes to/from a Kubernetes node and mounting/dismounting a
-volume to/from individual containers in a pod. The following in-tree plugins support
-persistent storage on Windows nodes:
-
-* [`awsElasticBlockStore`](/docs/concepts/storage/volumes/#awselasticblockstore)
-* [`azureDisk`](/docs/concepts/storage/volumes/#azuredisk)
-* [`azureFile`](/docs/concepts/storage/volumes/#azurefile)
-* [`gcePersistentDisk`](/docs/concepts/storage/volumes/#gcepersistentdisk)
-* [`vsphereVolume`](/docs/concepts/storage/volumes/#vspherevolume)
-
-#### FlexVolume plugins
-
-Code associated with [FlexVolume](/docs/concepts/storage/volumes/#flexVolume)
-plugins ship as out-of-tree scripts or binaries that need to be deployed directly
-on the host. FlexVolume plugins handle attaching/detaching of volumes to/from a
-Kubernetes node and mounting/dismounting a volume to/from individual containers
-in a pod. Provisioning/De-provisioning of persistent volumes associated
-with FlexVolume plugins may be handled through an external provisioner that
-is typically separate from the FlexVolume plugins. The following FlexVolume
-[plugins](https://github.com/Microsoft/K8s-Storage-Plugins/tree/master/flexvolume/windows),
-deployed as PowerShell scripts on the host, support Windows nodes:
-
-* [SMB](https://github.com/microsoft/K8s-Storage-Plugins/tree/master/flexvolume/windows/plugins/microsoft.com~smb.cmd)
-* [iSCSI](https://github.com/microsoft/K8s-Storage-Plugins/tree/master/flexvolume/windows/plugins/microsoft.com~iscsi.cmd)
-
-#### CSI plugins
-
-{{< feature-state for_k8s_version="v1.19" state="beta" >}}
-
-Code associated with {{< glossary_tooltip text="CSI" term_id="csi" >}} plugins ship
-as out-of-tree scripts and binaries that are typically distributed as container
-images and deployed using standard Kubernetes constructs like DaemonSets and
-StatefulSets.
-CSI plugins handle a wide range of volume management actions in Kubernetes:
-provisioning/de-provisioning/resizing of volumes, attaching/detaching of volumes
-to/from a Kubernetes node and mounting/dismounting a volume to/from individual
-containers in a pod, backup/restore of persistent data using snapshots and cloning.
-CSI plugins typically consist of node plugins (that run on each node as a DaemonSet)
-and controller plugins.
-
-CSI node plugins (especially those associated with persistent volumes exposed as
-either block devices or over a shared file-system) need to perform various privileged
-operations like scanning of disk devices, mounting of file systems, etc. These
-operations differ for each host operating system. For Linux worker nodes, containerized
-CSI node plugins are typically deployed as privileged containers. For Windows worker
-nodes, privileged operations for containerized CSI node plugins is supported using
-[csi-proxy](https://github.com/kubernetes-csi/csi-proxy), a community-managed,
-stand-alone binary that needs to be pre-installed on each Windows node.
-
-For more details, refer to the deployment guide of the CSI plugin you wish to deploy.
-
-### Command line options for the kubelet {#kubelet-compatibility}
-
-The behavior of some kubelet command line options behave differently on Windows, as described below:
-
-* The `--windows-priorityclass` lets you set the scheduling priority of the kubelet process (see [CPU resource management](/docs/concepts/configuration/windows-resource-management/#resource-management-cpu))
-* The `--kubelet-reserve`, `--system-reserve` , and `--eviction-hard` flags update [NodeAllocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)
-* Eviction by using `--enforce-node-allocable` is not implemented
-* Eviction by using `--eviction-hard` and `--eviction-soft` are not implemented
-* A kubelet running on a Windows node does not have memory
- restrictions. `--kubelet-reserve` and `--system-reserve` do not set limits on
- kubelet or processes running on the host. This means kubelet or a process on the host
- could cause memory resource starvation outside the node-allocatable and scheduler.
-* The `MemoryPressure` Condition is not implemented
-* The kubelet does not take OOM eviction actions
-
-### API compatibility {#api}
-
-There are no differences in how most of the Kubernetes APIs work for Windows. The
-subtleties around what's different come down to differences in the OS and container
-runtime. In certain situations, some properties on workload resources were designed
-under the assumption that they would be implemented on Linux, and fail to run on Windows.
-
-At a high level, these OS concepts are different:
-
-* Identity - Linux uses userID (UID) and groupID (GID) which
- are represented as integer types. User and group names
- are not canonical - they are just an alias in `/etc/groups`
- or `/etc/passwd` back to UID+GID. Windows uses a larger binary
- [security identifier](https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/security-identifiers) (SID)
- which is stored in the Windows Security Access Manager (SAM) database. This
- database is not shared between the host and containers, or between containers.
-* File permissions - Windows uses an access control list based on (SIDs), whereas
- POSIX systems such as Linux use a bitmask based on object permissions and UID+GID,
- plus _optional_ access control lists.
-* File paths - the convention on Windows is to use `\` instead of `/`. The Go IO
- libraries typically accept both and just make it work, but when you're setting a
- path or command line that's interpreted inside a container, `\` may be needed.
-* Signals - Windows interactive apps handle termination differently, and can
- implement one or more of these:
- * A UI thread handles well-defined messages including `WM_CLOSE`.
- * Console apps handle Ctrl-C or Ctrl-break using a Control Handler.
- * Services register a Service Control Handler function that can accept
- `SERVICE_CONTROL_STOP` control codes.
-
-Container exit codes follow the same convention where 0 is success, and nonzero is failure.
-The specific error codes may differ across Windows and Linux. However, exit codes
-passed from the Kubernetes components (kubelet, kube-proxy) are unchanged.
-
-##### Field compatibility for container specifications {#compatibility-v1-pod-spec-containers}
-
-The following list documents differences between how Pod container specifications
-work between Windows and Linux:
-
-* Huge pages are not implemented in the Windows container
- runtime, and are not available. They require [asserting a user
- privilege](https://docs.microsoft.com/en-us/windows/desktop/Memory/large-page-support)
- that's not configurable for containers.
-* `requests.cpu` and `requests.memory` - requests are subtracted
- from node available resources, so they can be used to avoid overprovisioning a
- node. However, they cannot be used to guarantee resources in an overprovisioned
- node. They should be applied to all containers as a best practice if the operator
- wants to avoid overprovisioning entirely.
-* `securityContext.allowPrivilegeEscalation` -
- not possible on Windows; none of the capabilities are hooked up
-* `securityContext.capabilities` -
- POSIX capabilities are not implemented on Windows
-* `securityContext.privileged` -
- Windows doesn't support privileged containers
-* `securityContext.procMount` -
- Windows doesn't have a `/proc` filesystem
-* `securityContext.readOnlyRootFilesystem` -
- not possible on Windows; write access is required for registry & system
- processes to run inside the container
-* `securityContext.runAsGroup` -
- not possible on Windows as there is no GID support
-* `securityContext.runAsNonRoot` -
- this setting will prevent containers from running as `ContainerAdministrator`
- which is the closest equivalent to a root user on Windows.
-* `securityContext.runAsUser` -
- use [`runAsUserName`](/docs/tasks/configure-pod-container/configure-runasusername)
- instead
-* `securityContext.seLinuxOptions` -
- not possible on Windows as SELinux is Linux-specific
-* `terminationMessagePath` -
- this has some limitations in that Windows doesn't support mapping single files. The
- default value is `/dev/termination-log`, which does work because it does not
- exist on Windows by default.
-
-##### Field compatibility for Pod specifications {#compatibility-v1-pod}
-
-The following list documents differences between how Pod specifications work between Windows and Linux:
-
-* `hostIPC` and `hostpid` - host namespace sharing is not possible on Windows
-* `hostNetwork` - There is no Windows OS support to share the host network
-* `dnsPolicy` - setting the Pod `dnsPolicy` to `ClusterFirstWithHostNet` is
- not supported on Windows because host networking is not provided. Pods always
- run with a container network.
-* `podSecurityContext` (see below)
-* `shareProcessNamespace` - this is a beta feature, and depends on Linux namespaces
- which are not implemented on Windows. Windows cannot share process namespaces or
- the container's root filesystem. Only the network can be shared.
-* `terminationGracePeriodSeconds` - this is not fully implemented in Docker on Windows,
- see the [GitHub issue](https://github.com/moby/moby/issues/25982).
- The behavior today is that the ENTRYPOINT process is sent CTRL_SHUTDOWN_EVENT,
- then Windows waits 5 seconds by default, and finally shuts down
- all processes using the normal Windows shutdown behavior. The 5
- second default is actually in the Windows registry
- [inside the container](https://github.com/moby/moby/issues/25982#issuecomment-426441183),
- so it can be overridden when the container is built.
-* `volumeDevices` - this is a beta feature, and is not implemented on Windows.
- Windows cannot attach raw block devices to pods.
-* `volumes`
- * If you define an `emptyDir` volume, you cannot set its volume source to `memory`.
-* You cannot enable `mountPropagation` for volume mounts as this is not
- supported on Windows.
-
-##### Field compatibility for Pod security context {#compatibility-v1-pod-spec-containers-securitycontext}
-
-None of the Pod [`securityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) fields work on Windows.
-
-### Node problem detector
-
-The node problem detector (see
-[Monitor Node Health](/docs/tasks/debug/debug-cluster/monitor-node-health/))
-is not compatible with Windows.
-
-### Pause container
-
-In a Kubernetes Pod, an infrastructure or “pause” container is first created
-to host the container. In Linux, the cgroups and namespaces that make up a pod
-need a process to maintain their continued existence; the pause process provides
-this. Containers that belong to the same pod, including infrastructure and worker
-containers, share a common network endpoint (same IPv4 and / or IPv6 address, same
-network port spaces). Kubernetes uses pause containers to allow for worker containers
-crashing or restarting without losing any of the networking configuration.
-
-Kubernetes maintains a multi-architecture image that includes support for Windows.
-For Kubernetes v{{< skew currentVersion >}} the recommended pause image is `k8s.gcr.io/pause:3.6`.
-The [source code](https://github.com/kubernetes/kubernetes/tree/master/build/pause)
-is available on GitHub.
-
-Microsoft maintains a different multi-architecture image, with Linux and Windows
-amd64 support, that you can find as `mcr.microsoft.com/oss/kubernetes/pause:3.6`.
-This image is built from the same source as the Kubernetes maintained image but
-all of the Windows binaries are [authenticode signed](https://docs.microsoft.com/en-us/windows-hardware/drivers/install/authenticode) by Microsoft.
-The Kubernetes project recommends using the Microsoft maintained image if you are
-deploying to a production or production-like environment that requires signed
-binaries.
-
-### Container runtimes {#container-runtime}
-
-You need to install a
-{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
-into each node in the cluster so that Pods can run there.
-
-The following container runtimes work with Windows:
-
-{{% thirdparty-content %}}
-
-#### cri-containerd
-
-{{< feature-state for_k8s_version="v1.20" state="stable" >}}
-
-You can use {{< glossary_tooltip term_id="containerd" text="ContainerD" >}} 1.4.0+
-as the container runtime for Kubernetes nodes that run Windows.
-
-Learn how to [install ContainerD on a Windows node](/docs/setup/production-environment/container-runtimes/#install-containerd).
-
-{{< note >}}
-There is a [known limitation](/docs/tasks/configure-pod-container/configure-gmsa/#gmsa-limitations)
-when using GMSA with containerd to access Windows network shares, which requires a
-kernel patch.
-{{< /note >}}
-
-#### Mirantis Container Runtime {#mcr}
-
-[Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html) (MCR) is available as a container runtime for all Windows Server 2019 and later versions.
-
-See [Install MCR on Windows Servers](https://docs.mirantis.com/mcr/20.10/install/mcr-windows.html) for more information.
-
-## Windows OS version compatibility {#windows-os-version-support}
-
-On Windows nodes, strict compatibility rules apply where the host OS version must
-match the container base image OS version. Only Windows containers with a container
-operating system of Windows Server 2019 are fully supported.
-
-For Kubernetes v{{< skew currentVersion >}}, operating system compatibility for Windows nodes (and Pods)
-is as follows:
-
-Windows Server LTSC release
-: Windows Server 2019
-: Windows Server 2022
-
-Windows Server SAC release
-: Windows Server version 20H2
-
-The Kubernetes [version-skew policy](/docs/setup/release/version-skew-policy/) also applies.
-
-## Getting help and troubleshooting {#troubleshooting}
-
-Your main source of help for troubleshooting your Kubernetes cluster should start
-with the [Troubleshooting](/docs/tasks/debug/)
-page.
-
-Some additional, Windows-specific troubleshooting help is included
-in this section. Logs are an important element of troubleshooting
-issues in Kubernetes. Make sure to include them any time you seek
-troubleshooting assistance from other contributors. Follow the
-instructions in the
-SIG Windows [contributing guide on gathering logs](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#gathering-logs).
-
-### Node-level troubleshooting {#troubleshooting-node}
-
-1. How do I know `start.ps1` completed successfully?
-
- You should see kubelet, kube-proxy, and (if you chose Flannel as your networking
- solution) flanneld host-agent processes running on your node, with running logs
- being displayed in separate PowerShell windows. In addition to this, your Windows
- node should be listed as "Ready" in your Kubernetes cluster.
-
-1. Can I configure the Kubernetes node processes to run in the background as services?
-
- The kubelet and kube-proxy are already configured to run as native Windows Services,
- offering resiliency by re-starting the services automatically in the event of
- failure (for example a process crash). You have two options for configuring these
- node components as services.
-
- 1. As native Windows Services
-
- You can run the kubelet and kube-proxy as native Windows Services using `sc.exe`.
-
- ```powershell
- # Create the services for kubelet and kube-proxy in two separate commands
- sc.exe create binPath= " --service "
-
- # Please note that if the arguments contain spaces, they must be escaped.
- sc.exe create kubelet binPath= "C:\kubelet.exe --service --hostname-override 'minion' "
-
- # Start the services
- Start-Service kubelet
- Start-Service kube-proxy
-
- # Stop the service
- Stop-Service kubelet (-Force)
- Stop-Service kube-proxy (-Force)
-
- # Query the service status
- Get-Service kubelet
- Get-Service kube-proxy
- ```
-
- 1. Using `nssm.exe`
-
- You can also always use alternative service managers like
- [nssm.exe](https://nssm.cc/) to run these processes (flanneld,
- kubelet & kube-proxy) in the background for you. You can use this
- [sample script](https://github.com/Microsoft/SDN/tree/master/Kubernetes/flannel/register-svc.ps1),
- leveraging nssm.exe to register kubelet, kube-proxy, and flanneld.exe to run
- as Windows services in the background.
-
- ```powershell
- register-svc.ps1 -NetworkMode -ManagementIP -ClusterCIDR -KubeDnsServiceIP -LogDir
-
- # NetworkMode = The network mode l2bridge (flannel host-gw, also the default value) or overlay (flannel vxlan) chosen as a network solution
- # ManagementIP = The IP address assigned to the Windows node. You can use ipconfig to find this
- # ClusterCIDR = The cluster subnet range. (Default value 10.244.0.0/16)
- # KubeDnsServiceIP = The Kubernetes DNS service IP (Default value 10.96.0.10)
- # LogDir = The directory where kubelet and kube-proxy logs are redirected into their respective output files (Default value C:\k)
- ```
-
- If the above referenced script is not suitable, you can manually configure
- `nssm.exe` using the following examples.
-
- ```powershell
- # Register flanneld.exe
- nssm install flanneld C:\flannel\flanneld.exe
- nssm set flanneld AppParameters --kubeconfig-file=c:\k\config --iface= --ip-masq=1 --kube-subnet-mgr=1
- nssm set flanneld AppEnvironmentExtra NODE_NAME=
- nssm set flanneld AppDirectory C:\flannel
- nssm start flanneld
-
- # Register kubelet.exe
- # Microsoft releases the pause infrastructure container at mcr.microsoft.com/oss/kubernetes/pause:3.6
- nssm install kubelet C:\k\kubelet.exe
- nssm set kubelet AppParameters --hostname-override= --v=6 --pod-infra-container-image=mcr.microsoft.com/oss/kubernetes/pause:3.6 --resolv-conf="" --allow-privileged=true --enable-debugging-handlers --cluster-dns= --cluster-domain=cluster.local --kubeconfig=c:\k\config --hairpin-mode=promiscuous-bridge --image-pull-progress-deadline=20m --cgroups-per-qos=false --log-dir= --logtostderr=false --enforce-node-allocatable="" --network-plugin=cni --cni-bin-dir=c:\k\cni --cni-conf-dir=c:\k\cni\config
- nssm set kubelet AppDirectory C:\k
- nssm start kubelet
-
- # Register kube-proxy.exe (l2bridge / host-gw)
- nssm install kube-proxy C:\k\kube-proxy.exe
- nssm set kube-proxy AppDirectory c:\k
- nssm set kube-proxy AppParameters --v=4 --proxy-mode=kernelspace --hostname-override=--kubeconfig=c:\k\config --enable-dsr=false --log-dir= --logtostderr=false
- nssm.exe set kube-proxy AppEnvironmentExtra KUBE_NETWORK=cbr0
- nssm set kube-proxy DependOnService kubelet
- nssm start kube-proxy
-
- # Register kube-proxy.exe (overlay / vxlan)
- nssm install kube-proxy C:\k\kube-proxy.exe
- nssm set kube-proxy AppDirectory c:\k
- nssm set kube-proxy AppParameters --v=4 --proxy-mode=kernelspace --feature-gates="WinOverlay=true" --hostname-override= --kubeconfig=c:\k\config --network-name=vxlan0 --source-vip= --enable-dsr=false --log-dir= --logtostderr=false
- nssm set kube-proxy DependOnService kubelet
- nssm start kube-proxy
- ```
-
- For initial troubleshooting, you can use the following flags in [nssm.exe](https://nssm.cc/) to redirect stdout and stderr to a output file:
-
- ```powershell
- nssm set AppStdout C:\k\mysvc.log
- nssm set AppStderr C:\k\mysvc.log
- ```
-
- For additional details, see [NSSM - the Non-Sucking Service Manager](https://nssm.cc/usage).
-
-1. My Pods are stuck at "Container Creating" or restarting over and over
-
- Check that your pause image is compatible with your OS version. The
- [instructions](https://docs.microsoft.com/en-us/virtualization/windowscontainers/kubernetes/deploying-resources)
- assume that both the OS and the containers are version 1803. If you have a later
- version of Windows, such as an Insider build, you need to adjust the images
- accordingly. See [Pause container](#pause-container) for more details.
-
-### Network troubleshooting {#troubleshooting-network}
-
-1. My Windows Pods do not have network connectivity
-
- If you are using virtual machines, ensure that MAC spoofing is **enabled** on all
- the VM network adapter(s).
-
-1. My Windows Pods cannot ping external resources
-
- Windows Pods do not have outbound rules programmed for the ICMP protocol. However,
- TCP/UDP is supported. When trying to demonstrate connectivity to resources
- outside of the cluster, substitute `ping ` with corresponding
- `curl ` commands.
-
- If you are still facing problems, most likely your network configuration in
- [cni.conf](https://github.com/Microsoft/SDN/blob/master/Kubernetes/flannel/l2bridge/cni/config/cni.conf)
- deserves some extra attention. You can always edit this static file. The
- configuration update will apply to any new Kubernetes resources.
-
- One of the Kubernetes networking requirements
- (see [Kubernetes model](/docs/concepts/cluster-administration/networking/)) is
- for cluster communication to occur without
- NAT internally. To honor this requirement, there is an
- [ExceptionList](https://github.com/Microsoft/SDN/blob/master/Kubernetes/flannel/l2bridge/cni/config/cni.conf#L20)
- for all the communication where you do not want outbound NAT to occur. However,
- this also means that you need to exclude the external IP you are trying to query
- from the `ExceptionList`. Only then will the traffic originating from your Windows
- pods be SNAT'ed correctly to receive a response from the outside world. In this
- regard, your `ExceptionList` in `cni.conf` should look as follows:
-
- ```conf
- "ExceptionList": [
- "10.244.0.0/16", # Cluster subnet
- "10.96.0.0/12", # Service subnet
- "10.127.130.0/24" # Management (host) subnet
- ]
- ```
-
-1. My Windows node cannot access `NodePort` type Services
-
- Local NodePort access from the node itself fails. This is a known
- limitation. NodePort access works from other nodes or external clients.
-
-1. vNICs and HNS endpoints of containers are being deleted
-
- This issue can be caused when the `hostname-override` parameter is not passed to
- [kube-proxy](/docs/reference/command-line-tools-reference/kube-proxy/). To resolve
- it, users need to pass the hostname to kube-proxy as follows:
-
- ```powershell
- C:\k\kube-proxy.exe --hostname-override=$(hostname)
- ```
-
-1. With flannel, my nodes are having issues after rejoining a cluster
-
- Whenever a previously deleted node is being re-joined to the cluster, flannelD
- tries to assign a new pod subnet to the node. Users should remove the old pod
- subnet configuration files in the following paths:
-
- ```powershell
- Remove-Item C:\k\SourceVip.json
- Remove-Item C:\k\SourceVipRequest.json
- ```
-
-1. After launching `start.ps1`, flanneld is stuck in "Waiting for the Network to be created"
-
- There are numerous reports of this [issue](https://github.com/coreos/flannel/issues/1066); most likely it is a timing issue for when the management IP of the flannel network is set. A workaround is to relaunch `start.ps1` or relaunch it manually as follows:
-
- ```powershell
- [Environment]::SetEnvironmentVariable("NODE_NAME", "")
- C:\flannel\flanneld.exe --kubeconfig-file=c:\k\config --iface= --ip-masq=1 --kube-subnet-mgr=1
- ```
-
-1. My Windows Pods cannot launch because of missing `/run/flannel/subnet.env`
-
- This indicates that Flannel didn't launch correctly. You can either try
- to restart `flanneld.exe` or you can copy the files over manually from
- `/run/flannel/subnet.env` on the Kubernetes master to `C:\run\flannel\subnet.env`
- on the Windows worker node and modify the `FLANNEL_SUBNET` row to a different
- number. For example, if node subnet 10.244.4.1/24 is desired:
-
- ```env
- FLANNEL_NETWORK=10.244.0.0/16
- FLANNEL_SUBNET=10.244.4.1/24
- FLANNEL_MTU=1500
- FLANNEL_IPMASQ=true
- ```
-
-1. My Windows node cannot access my services using the service IP
-
- This is a known limitation of the networking stack on Windows. However, Windows Pods can access the Service IP.
-
-1. No network adapter is found when starting the kubelet
-
- The Windows networking stack needs a virtual adapter for Kubernetes networking to work. If the following commands return no results (in an admin shell), virtual network creation — a necessary prerequisite for the kubelet to work — has failed:
-
- ```powershell
- Get-HnsNetwork | ? Name -ieq "cbr0"
- Get-NetAdapter | ? Name -Like "vEthernet (Ethernet*"
- ```
-
- Often it is worthwhile to modify the [InterfaceName](https://github.com/microsoft/SDN/blob/master/Kubernetes/flannel/start.ps1#L7) parameter of the start.ps1 script, in cases where the host's network adapter isn't "Ethernet". Otherwise, consult the output of the `start-kubelet.ps1` script to see if there are errors during virtual network creation.
-
-1. DNS resolution is not properly working
-
- Check the DNS limitations for Windows in this [section](#dns-limitations).
-
-1. `kubectl port-forward` fails with "unable to do port forwarding: wincat not found"
-
- This was implemented in Kubernetes 1.15 by including `wincat.exe` in the pause infrastructure container `mcr.microsoft.com/oss/kubernetes/pause:3.6`. Be sure to use a supported version of Kubernetes.
- If you would like to build your own pause infrastructure container be sure to include [wincat](https://github.com/kubernetes/kubernetes/tree/master/build/pause/windows/wincat).
-
-1. My Kubernetes installation is failing because my Windows Server node is behind a proxy
-
- If you are behind a proxy, the following PowerShell environment variables must be defined:
-
- ```PowerShell
- [Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://proxy.example.com:80/", [EnvironmentVariableTarget]::Machine)
- [Environment]::SetEnvironmentVariable("HTTPS_PROXY", "http://proxy.example.com:443/", [EnvironmentVariableTarget]::Machine)
- ```
-
-### Further investigation
-
-If these steps don't resolve your problem, you can get help running Windows containers on Windows nodes in Kubernetes through:
-
-* StackOverflow [Windows Server Container](https://stackoverflow.com/questions/tagged/windows-server-container) topic
-* Kubernetes Official Forum [discuss.kubernetes.io](https://discuss.kubernetes.io/)
-* Kubernetes Slack [#SIG-Windows Channel](https://kubernetes.slack.com/messages/sig-windows)
-
-### Reporting issues and feature requests
-
-If you have what looks like a bug, or you would like to
-make a feature request, please use the
-[GitHub issue tracking system](https://github.com/kubernetes/kubernetes/issues).
-You can open issues on
-[GitHub](https://github.com/kubernetes/kubernetes/issues/new/choose) and assign
-them to SIG-Windows. You should first search the list of issues in case it was
-reported previously and comment with your experience on the issue and add additional
-logs. SIG-Windows Slack is also a great avenue to get some initial support and
-troubleshooting ideas prior to creating a ticket.
-
-If filing a bug, please include detailed information about how to reproduce the problem, such as:
-
-* Kubernetes version: output from `kubectl version`
-* Environment details: Cloud provider, OS distro, networking choice and configuration, and Docker version
-* Detailed steps to reproduce the problem
-* [Relevant logs](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#gathering-logs)
-
-It helps if you tag the issue as **sig/windows**, by commenting on the issue with `/sig windows`. This helps to bring
-the issue to a SIG Windows member's attention
-
-
-## {{% heading "whatsnext" %}}
-
-### Deployment tools
-
-The kubeadm tool helps you to deploy a Kubernetes cluster, providing the control
-plane to manage the cluster it, and nodes to run your workloads.
-[Adding Windows nodes](/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/)
-explains how to deploy Windows nodes to your cluster using kubeadm.
-
-The Kubernetes [cluster API](https://cluster-api.sigs.k8s.io/) project also provides means to automate deployment of Windows nodes.
-
-### Windows distribution channels
-
-For a detailed explanation of Windows distribution channels see the [Microsoft documentation](https://docs.microsoft.com/en-us/windows-server/get-started-19/servicing-channels-19).
-
-Information on the different Windows Server servicing channels
-including their support models can be found at
-[Windows Server servicing channels](https://docs.microsoft.com/en-us/windows-server/get-started/servicing-channels-comparison).
diff --git a/content/en/docs/tasks/access-application-cluster/access-cluster-services.md b/content/en/docs/tasks/access-application-cluster/access-cluster-services.md
index 262071094c..456662692e 100644
--- a/content/en/docs/tasks/access-application-cluster/access-cluster-services.md
+++ b/content/en/docs/tasks/access-application-cluster/access-cluster-services.md
@@ -64,17 +64,17 @@ kubectl cluster-info
The output is similar to this:
```
-Kubernetes master is running at https://104.197.5.247
-elasticsearch-logging is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy
-kibana-logging is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/kibana-logging/proxy
-kube-dns is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/kube-dns/proxy
-grafana is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
-heapster is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy
+Kubernetes master is running at https://192.0.2.1
+elasticsearch-logging is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy
+kibana-logging is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/kibana-logging/proxy
+kube-dns is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/kube-dns/proxy
+grafana is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
+heapster is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy
```
This shows the proxy-verb URL for accessing each service.
For example, this cluster has cluster-level logging enabled (using Elasticsearch), which can be reached
-at `https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/` if suitable credentials are passed, or through a kubectl proxy at, for example:
+at `https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/` if suitable credentials are passed, or through a kubectl proxy at, for example:
`http://localhost:8080/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`.
{{< note >}}
@@ -104,13 +104,13 @@ The supported formats for the `` segment of the URL are:
* To access the Elasticsearch service endpoint `_search?q=user:kimchy`, you would use:
```
- http://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_search?q=user:kimchy
+ http://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_search?q=user:kimchy
```
* To access the Elasticsearch cluster health information `_cluster/health?pretty=true`, you would use:
```
- https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_cluster/health?pretty=true
+ https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_cluster/health?pretty=true
```
The health information is similar to this:
@@ -133,7 +133,7 @@ The supported formats for the `` segment of the URL are:
* To access the *https* Elasticsearch service health information `_cluster/health?pretty=true`, you would use:
```
- https://104.197.5.247/api/v1/namespaces/kube-system/services/https:elasticsearch-logging/proxy/_cluster/health?pretty=true
+ https://192.0.2.1/api/v1/namespaces/kube-system/services/https:elasticsearch-logging:/proxy/_cluster/health?pretty=true
```
#### Using web browsers to access services running on the cluster
diff --git a/content/en/docs/tasks/access-application-cluster/access-cluster.md b/content/en/docs/tasks/access-application-cluster/access-cluster.md
index aae96d3e96..f20fe407e8 100644
--- a/content/en/docs/tasks/access-application-cluster/access-cluster.md
+++ b/content/en/docs/tasks/access-application-cluster/access-cluster.md
@@ -233,7 +233,7 @@ There are several different proxies you may encounter when using Kubernetes:
- locates apiserver
- adds authentication headers
-1. The [apiserver proxy](#discovering-builtin-services):
+1. The [apiserver proxy](/docs/tasks/access-application-cluster/access-cluster-services/#discovering-builtin-services):
- is a bastion built into the apiserver
- connects a user outside of the cluster to cluster IPs which otherwise might not be reachable
diff --git a/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md b/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
index 8b79d7042f..fe8beeacad 100644
--- a/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
+++ b/content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
@@ -115,7 +115,7 @@ kubectl config --kubeconfig=config-demo view
The output shows the two clusters, two users, and three contexts:
-```shell
+```yaml
apiVersion: v1
clusters:
- cluster:
diff --git a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
index ba8f7b1244..3b2648f943 100644
--- a/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
+++ b/content/en/docs/tasks/access-application-cluster/port-forward-access-application-cluster.md
@@ -11,180 +11,169 @@ This page shows how to use `kubectl port-forward` to connect to a MongoDB
server running in a Kubernetes cluster. This type of connection can be useful
for database debugging.
-
-
-
## {{% heading "prerequisites" %}}
-
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
-
* Install [MongoDB Shell](https://www.mongodb.com/try/download/shell).
-
-
-
## Creating MongoDB deployment and service
1. Create a Deployment that runs MongoDB:
- ```shell
- kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-deployment.yaml
- ```
+ ```shell
+ kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-deployment.yaml
+ ```
- The output of a successful command verifies that the deployment was created:
+ The output of a successful command verifies that the deployment was created:
- ```
- deployment.apps/mongo created
- ```
+ ```
+ deployment.apps/mongo created
+ ```
- View the pod status to check that it is ready:
+ View the pod status to check that it is ready:
- ```shell
- kubectl get pods
- ```
+ ```shell
+ kubectl get pods
+ ```
- The output displays the pod created:
+ The output displays the pod created:
- ```
- NAME READY STATUS RESTARTS AGE
- mongo-75f59d57f4-4nd6q 1/1 Running 0 2m4s
- ```
+ ```
+ NAME READY STATUS RESTARTS AGE
+ mongo-75f59d57f4-4nd6q 1/1 Running 0 2m4s
+ ```
- View the Deployment's status:
+ View the Deployment's status:
- ```shell
- kubectl get deployment
- ```
+ ```shell
+ kubectl get deployment
+ ```
- The output displays that the Deployment was created:
+ The output displays that the Deployment was created:
- ```
- NAME READY UP-TO-DATE AVAILABLE AGE
- mongo 1/1 1 1 2m21s
- ```
+ ```
+ NAME READY UP-TO-DATE AVAILABLE AGE
+ mongo 1/1 1 1 2m21s
+ ```
- The Deployment automatically manages a ReplicaSet.
- View the ReplicaSet status using:
+ The Deployment automatically manages a ReplicaSet.
+ View the ReplicaSet status using:
- ```shell
- kubectl get replicaset
- ```
+ ```shell
+ kubectl get replicaset
+ ```
- The output displays that the ReplicaSet was created:
-
- ```
- NAME DESIRED CURRENT READY AGE
- mongo-75f59d57f4 1 1 1 3m12s
- ```
+ The output displays that the ReplicaSet was created:
+ ```
+ NAME DESIRED CURRENT READY AGE
+ mongo-75f59d57f4 1 1 1 3m12s
+ ```
2. Create a Service to expose MongoDB on the network:
- ```shell
- kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-service.yaml
- ```
+ ```shell
+ kubectl apply -f https://k8s.io/examples/application/mongodb/mongo-service.yaml
+ ```
- The output of a successful command verifies that the Service was created:
+ The output of a successful command verifies that the Service was created:
- ```
- service/mongo created
- ```
+ ```
+ service/mongo created
+ ```
- Check the Service created:
+ Check the Service created:
- ```shell
- kubectl get service mongo
- ```
+ ```shell
+ kubectl get service mongo
+ ```
- The output displays the service created:
+ The output displays the service created:
- ```
- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
- mongo ClusterIP 10.96.41.183 27017/TCP 11s
- ```
+ ```
+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
+ mongo ClusterIP 10.96.41.183 27017/TCP 11s
+ ```
3. Verify that the MongoDB server is running in the Pod, and listening on port 27017:
- ```shell
- # Change mongo-75f59d57f4-4nd6q to the name of the Pod
- kubectl get pod mongo-75f59d57f4-4nd6q --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'
- ```
+ ```shell
+ # Change mongo-75f59d57f4-4nd6q to the name of the Pod
+ kubectl get pod mongo-75f59d57f4-4nd6q --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'
+ ```
- The output displays the port for MongoDB in that Pod:
+ The output displays the port for MongoDB in that Pod:
- ```
- 27017
- ```
+ ```
+ 27017
+ ```
- (this is the TCP port allocated to MongoDB on the internet).
+ 27017 is the TCP port allocated to MongoDB on the internet.
## Forward a local port to a port on the Pod
-1. `kubectl port-forward` allows using resource name, such as a pod name, to select a matching pod to port forward to.
+1. `kubectl port-forward` allows using resource name, such as a pod name, to select a matching pod to port forward to.
- ```shell
- # Change mongo-75f59d57f4-4nd6q to the name of the Pod
- kubectl port-forward mongo-75f59d57f4-4nd6q 28015:27017
- ```
+ ```shell
+ # Change mongo-75f59d57f4-4nd6q to the name of the Pod
+ kubectl port-forward mongo-75f59d57f4-4nd6q 28015:27017
+ ```
- which is the same as
+ which is the same as
- ```shell
- kubectl port-forward pods/mongo-75f59d57f4-4nd6q 28015:27017
- ```
+ ```shell
+ kubectl port-forward pods/mongo-75f59d57f4-4nd6q 28015:27017
+ ```
- or
+ or
- ```shell
- kubectl port-forward deployment/mongo 28015:27017
- ```
+ ```shell
+ kubectl port-forward deployment/mongo 28015:27017
+ ```
- or
+ or
- ```shell
- kubectl port-forward replicaset/mongo-75f59d57f4 28015:27017
- ```
+ ```shell
+ kubectl port-forward replicaset/mongo-75f59d57f4 28015:27017
+ ```
- or
+ or
- ```shell
- kubectl port-forward service/mongo 28015:27017
- ```
+ ```shell
+ kubectl port-forward service/mongo 28015:27017
+ ```
- Any of the above commands works. The output is similar to this:
+ Any of the above commands works. The output is similar to this:
- ```
- Forwarding from 127.0.0.1:28015 -> 27017
- Forwarding from [::1]:28015 -> 27017
- ```
+ ```
+ Forwarding from 127.0.0.1:28015 -> 27017
+ Forwarding from [::1]:28015 -> 27017
+ ```
-{{< note >}}
+ {{< note >}}
+ `kubectl port-forward` does not return. To continue with the exercises, you will need to open another terminal.
+ {{< /note >}}
-`kubectl port-forward` does not return. To continue with the exercises, you will need to open another terminal.
+2. Start the MongoDB command line interface:
-{{< /note >}}
+ ```shell
+ mongosh --port 28015
+ ```
-2. Start the MongoDB command line interface:
+3. At the MongoDB command line prompt, enter the `ping` command:
- ```shell
- mongosh --port 28015
- ```
+ ```
+ db.runCommand( { ping: 1 } )
+ ```
-3. At the MongoDB command line prompt, enter the `ping` command:
+ A successful ping request returns:
- ```
- db.runCommand( { ping: 1 } )
- ```
-
- A successful ping request returns:
-
- ```
- { ok: 1 }
- ```
+ ```
+ { ok: 1 }
+ ```
### Optionally let _kubectl_ choose the local port {#let-kubectl-choose-local-port}
@@ -204,7 +193,6 @@ Forwarding from 127.0.0.1:63753 -> 27017
Forwarding from [::1]:63753 -> 27017
```
-
## Discussion
@@ -219,9 +207,7 @@ The support for UDP protocol is tracked in
[issue 47862](https://github.com/kubernetes/kubernetes/issues/47862).
{{< /note >}}
-
-
-
## {{% heading "whatsnext" %}}
Learn more about [kubectl port-forward](/docs/reference/generated/kubectl/kubectl-commands/#port-forward).
+
diff --git a/content/en/docs/tasks/administer-cluster/certificates.md b/content/en/docs/tasks/administer-cluster/certificates.md
index 2338b0cdc7..44effe9340 100644
--- a/content/en/docs/tasks/administer-cluster/certificates.md
+++ b/content/en/docs/tasks/administer-cluster/certificates.md
@@ -1,5 +1,5 @@
---
-title: Certificates
+title: Generate Certificates Manually
content_type: task
weight: 20
---
diff --git a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md
index bf5ddd8f5f..be77074dc1 100644
--- a/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md
+++ b/content/en/docs/tasks/administer-cluster/configure-upgrade-etcd.md
@@ -150,7 +150,7 @@ access to clients with the certificate `k8sclient.cert`.
Once etcd is configured correctly, only clients with valid certificates can
access it. To give Kubernetes API servers the access, configure them with the
-flags `--etcd-certfile=k8sclient.cert`,`--etcd-keyfile=k8sclient.key` and
+flags `--etcd-certfile=k8sclient.cert`, `--etcd-keyfile=k8sclient.key` and
`--etcd-cafile=ca.cert`.
{{< note >}}
@@ -319,7 +319,7 @@ employed to recover the data of a failed cluster.
Before starting the restore operation, a snapshot file must be present. It can
either be a snapshot file from a previous backup operation, or from a remaining
-[data directory]( https://etcd.io/docs/current/op-guide/configuration/#--data-dir).
+[data directory](https://etcd.io/docs/current/op-guide/configuration/#--data-dir).
Here is an example:
```shell
diff --git a/content/en/docs/tasks/administer-cluster/encrypt-data.md b/content/en/docs/tasks/administer-cluster/encrypt-data.md
index c48f9ee2da..d510caff81 100644
--- a/content/en/docs/tasks/administer-cluster/encrypt-data.md
+++ b/content/en/docs/tasks/administer-cluster/encrypt-data.md
@@ -88,8 +88,8 @@ Name | Encryption | Strength | Speed | Key Length | Other Considerations
`identity` | None | N/A | N/A | N/A | Resources written as-is without encryption. When set as the first provider, the resource will be decrypted as new values are written.
`secretbox` | XSalsa20 and Poly1305 | Strong | Faster | 32-byte | A newer standard and may not be considered acceptable in environments that require high levels of review.
`aesgcm` | AES-GCM with random nonce | Must be rotated every 200k writes | Fastest | 16, 24, or 32-byte | Is not recommended for use except when an automated key rotation scheme is implemented.
-`aescbc` | AES-CBC with PKCS#7 padding | Weak | Fast | 32-byte | Not recommended due to CBC's vulnerability to padding oracle attacks.
-`kms` | Uses envelope encryption scheme: Data is encrypted by data encryption keys (DEKs) using AES-CBC with PKCS#7 padding, DEKs are encrypted by key encryption keys (KEKs) according to configuration in Key Management Service (KMS) | Strongest | Fast | 32-bytes | The recommended choice for using a third party tool for key management. Simplifies key rotation, with a new DEK generated for each encryption, and KEK rotation controlled by the user. [Configure the KMS provider](/docs/tasks/administer-cluster/kms-provider/)
+`aescbc` | AES-CBC with [PKCS#7](https://datatracker.ietf.org/doc/html/rfc2315) padding | Weak | Fast | 32-byte | Not recommended due to CBC's vulnerability to padding oracle attacks.
+`kms` | Uses envelope encryption scheme: Data is encrypted by data encryption keys (DEKs) using AES-CBC with [PKCS#7](https://datatracker.ietf.org/doc/html/rfc2315) padding, DEKs are encrypted by key encryption keys (KEKs) according to configuration in Key Management Service (KMS) | Strongest | Fast | 32-bytes | The recommended choice for using a third party tool for key management. Simplifies key rotation, with a new DEK generated for each encryption, and KEK rotation controlled by the user. [Configure the KMS provider](/docs/tasks/administer-cluster/kms-provider/)
Each provider supports multiple keys - the keys are tried in order for decryption, and if the provider
is the first provider, the first key is used for encryption.
diff --git a/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md b/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
index 8040e1185f..e366f136bc 100644
--- a/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
+++ b/content/en/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
@@ -29,7 +29,7 @@ The upgrade workflow at high level is the following:
## {{% heading "prerequisites" %}}
-- Make sure you read the [release notes]({{< latest-release-notes >}}) carefully.
+- Make sure you read the [release notes](https://git.k8s.io/kubernetes/CHANGELOG) carefully.
- The cluster should use a static control plane and etcd pods or external etcd.
- Make sure to back up any important components, such as app-level state stored in a database.
`kubeadm upgrade` does not touch your workloads, only components internal to Kubernetes, but backups are always a best practice.
diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md
index 6c52dea6e1..e0255eb2bd 100644
--- a/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md
+++ b/content/en/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace.md
@@ -27,7 +27,7 @@ in the namespace.
You must have access to create namespaces in your cluster.
-Your cluster must have at least 1.0 CPU available for use to run the task examples.
+Each node in your cluster must have at least 1.0 CPU available for Pods.
See [meaning of CPU](/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu)
to learn what Kubernetes means by “1 CPU”.
@@ -45,7 +45,7 @@ kubectl create namespace constraints-cpu-example
## Create a LimitRange and a Pod
-Here's an example manifest for a LimitRange:
+Here's a manifest for an example {{< glossary_tooltip text="LimitRange" term_id="limitrange" >}}:
{{< codenew file="admin/resource/cpu-constraints.yaml" >}}
@@ -96,7 +96,7 @@ on these resources, the two values must be the same.
Here's a manifest for a Pod that has one container. The container manifest
specifies a CPU request of 500 millicpu and a CPU limit of 800 millicpu. These satisfy the
-minimum and maximum CPU constraints imposed by the LimitRange.
+minimum and maximum CPU constraints imposed by the LimitRange for this namespace.
{{< codenew file="admin/resource/cpu-constraints-pod.yaml" >}}
@@ -214,7 +214,10 @@ applied the
[default CPU request and limit](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)
from the LimitRange for this namespace.
-At this point, your Pod might be running or it might not be running. Recall that a prerequisite for this task is that your cluster must have at least 1 CPU available for use. If each of your Nodes has only 1 CPU, then there might not be enough allocatable CPU on any Node to accommodate a request of 800 millicpu. If you happen to be using Nodes with 2 CPU, then you probably have enough CPU to accommodate the 800 millicpu request.
+At this point, your Pod may or may not be running. Recall that a prerequisite for
+this task is that your Nodes must have at least 1 CPU available for use. If each of your Nodes has only 1 CPU,
+then there might not be enough allocatable CPU on any Node to accommodate a request of 800 millicpu.
+If you happen to be using Nodes with 2 CPU, then you probably have enough CPU to accommodate the 800 millicpu request.
Delete your Pod:
diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md
index 3efd899075..9d2d707cb0 100644
--- a/content/en/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md
+++ b/content/en/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md
@@ -11,8 +11,9 @@ description: >-
This page shows how to set minimum and maximum values for memory used by containers
-running in a namespace. You specify minimum and maximum memory values in a
-[LimitRange](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#limitrange-v1-core)
+running in a {{< glossary_tooltip text="namespace" term_id="namespace" >}}.
+You specify minimum and maximum memory values in a
+[LimitRange](/docs/reference/kubernetes-api/policy-resources/limit-range-v1/)
object. If a Pod does not meet the constraints imposed by the LimitRange,
it cannot be created in the namespace.
@@ -76,8 +77,8 @@ file for the LimitRange, they were created automatically.
Now whenever you define a Pod within the constraints-mem-example namespace, Kubernetes
performs these steps:
-* If any container in that Pod does not specify its own memory request and limit, assign
-the default memory request and limit to that container.
+* If any container in that Pod does not specify its own memory request and limit,
+the control plane assigns the default memory request and limit to that container.
* Verify that every container in that Pod requests at least 500 MiB of memory.
diff --git a/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md b/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md
index 025277127d..1013800e44 100644
--- a/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md
+++ b/content/en/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md
@@ -172,7 +172,7 @@ resources:
If your namespace has a memory {{< glossary_tooltip text="resource quota" term_id="resource-quota" >}}
configured,
it is helpful to have a default value in place for memory limit.
-Here are two of the restrictions that a resource quota imposes on a namespace:
+Here are three of the restrictions that a resource quota imposes on a namespace:
* For every Pod that runs in the namespace, the Pod and each of its containers must have a memory limit.
(If you specify a memory limit for every container in a Pod, Kubernetes can infer the Pod-level memory
diff --git a/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/_index.md b/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/_index.md
index f54be498d4..d4a915914b 100644
--- a/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/_index.md
+++ b/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/_index.md
@@ -16,7 +16,7 @@ installations. Our [Dockershim Removal FAQ](/blog/2022/02/17/dockershim-faq/) is
to understand the problem better.
Dockershim was removed from Kubernetes with the release of v1.24.
-If you use Docker via dockershim as your container runtime, and wish to upgrade to v1.24,
+If you use Docker Engine via dockershim as your container runtime, and wish to upgrade to v1.24,
it is recommended that you either migrate to another runtime or find an alternative means to obtain Docker Engine support.
Check out [container runtimes](/docs/setup/production-environment/container-runtimes/)
section to know your options. Make sure to
diff --git a/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md b/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
index b4074a1385..3d79e5d4f7 100644
--- a/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
+++ b/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
@@ -44,7 +44,7 @@ for detailed steps to install containerd.
1. Install the `containerd.io` package from the official Docker repositories.
Instructions for setting up the Docker repository for your respective Linux distribution and
installing the `containerd.io` package can be found at
- [Install Docker Engine](https://docs.docker.com/engine/install/#server).
+ [Getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md).
1. Configure containerd:
diff --git a/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md b/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md
index dbfe02d9e6..c4247f085a 100644
--- a/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md
+++ b/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md
@@ -41,7 +41,7 @@ node-2 Ready v1.16.15 docker://19.3.1
node-3 Ready v1.16.15 docker://19.3.1
```
If your runtime shows as Docker Engine, you still might not be affected by the
-removal of dockershim in Kubernetes 1.24. [Check the runtime
+removal of dockershim in Kubernetes v1.24. [Check the runtime
endpoint](#which-endpoint) to see if you use dockershim. If you don't use
dockershim, you aren't affected.
@@ -64,7 +64,7 @@ The container runtime talks to the kubelet over a Unix socket using the [CRI
protocol](/docs/concepts/architecture/cri/), which is based on the gRPC
framework. The kubelet acts as a client, and the runtime acts as the server.
In some cases, you might find it useful to know which socket your nodes use. For
-example, with the removal of dockershim in Kubernetes 1.24 and later, you might
+example, with the removal of dockershim in Kubernetes v1.24 and later, you might
want to know whether you use Docker Engine with dockershim.
{{}}
@@ -93,6 +93,7 @@ nodes.
name to find out which runtime you use. For example,
`unix:///run/containerd/containerd.sock` is the containerd endpoint.
-If you use Docker Engine with the dockershim, [migrate to a different runtime](/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/),
-or, if you want to continue using Docker Engine in v1.24 and later, migrate to a
+If you want to change the Container Runtime on a Node from Docker Engine to containerd,
+you can find out more information on [migrating from Docker Engine to containerd](/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/),
+or, if you want to continue using Docker Engine in Kubernetes v1.24 and later, migrate to a
CRI-compatible adapter like [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd).
\ No newline at end of file
diff --git a/content/en/docs/tasks/administer-cluster/quota-api-object.md b/content/en/docs/tasks/administer-cluster/quota-api-object.md
index 11592d2152..ad38f102d4 100644
--- a/content/en/docs/tasks/administer-cluster/quota-api-object.md
+++ b/content/en/docs/tasks/administer-cluster/quota-api-object.md
@@ -89,7 +89,7 @@ kubectl get persistentvolumeclaims --namespace=quota-object-example
The output shows that the PersistentVolumeClaim exists and has status Pending:
-```shell
+```
NAME STATUS
pvc-quota-demo Pending
```
diff --git a/content/en/docs/tasks/administer-cluster/reconfigure-kubelet.md b/content/en/docs/tasks/administer-cluster/reconfigure-kubelet.md
index 82a501e5d4..e1effd8f05 100644
--- a/content/en/docs/tasks/administer-cluster/reconfigure-kubelet.md
+++ b/content/en/docs/tasks/administer-cluster/reconfigure-kubelet.md
@@ -29,7 +29,7 @@ Please find documentation on this feature in [earlier versions of documentation]
There is no recommended replacement for this feature that works generically
across various Kubernetes distributions. If you are using managed Kubernetes
version, please consult with the vendor hosting Kubernetes for the best
-practices for customizing your Kubernetes. If you are using KubeAdm, refer to
+practices for customizing your Kubernetes. If you are using `kubeadm`, refer to
[Configuring each kubelet in your cluster using kubeadm](/docs/setup/production-environment/tools/kubeadm/kubelet-integration/).
In order to migrate off the Dynamic Kubelet Configuration feature, the
diff --git a/content/en/docs/tasks/administer-cluster/topology-manager.md b/content/en/docs/tasks/administer-cluster/topology-manager.md
index e8d2e7c19d..4002537f0c 100644
--- a/content/en/docs/tasks/administer-cluster/topology-manager.md
+++ b/content/en/docs/tasks/administer-cluster/topology-manager.md
@@ -20,7 +20,7 @@ An increasing number of systems leverage a combination of CPUs and hardware acce
In order to extract the best performance, optimizations related to CPU isolation, memory and device locality are required. However, in Kubernetes, these optimizations are handled by a disjoint set of components.
-_Topology Manager_ is a Kubelet component that aims to co-ordinate the set of components that are responsible for these optimizations.
+_Topology Manager_ is a Kubelet component that aims to coordinate the set of components that are responsible for these optimizations.
@@ -267,4 +267,4 @@ Using this information the Topology Manager calculates the optimal hint for the
### Known Limitations
1. The maximum number of NUMA nodes that Topology Manager allows is 8. With more than 8 NUMA nodes there will be a state explosion when trying to enumerate the possible NUMA affinities and generating their hints.
-2. The scheduler is not topology-aware, so it is possible to be scheduled on a node and then fail on the node due to the Topology Manager.
\ No newline at end of file
+2. The scheduler is not topology-aware, so it is possible to be scheduled on a node and then fail on the node due to the Topology Manager.
diff --git a/content/en/docs/tasks/configure-pod-container/assign-memory-resource.md b/content/en/docs/tasks/configure-pod-container/assign-memory-resource.md
index 137571d8e8..d923d6356c 100644
--- a/content/en/docs/tasks/configure-pod-container/assign-memory-resource.md
+++ b/content/en/docs/tasks/configure-pod-container/assign-memory-resource.md
@@ -171,7 +171,7 @@ kubectl get pod memory-demo-2 --output=yaml --namespace=mem-example
The output shows that the Container was killed because it is out of memory (OOM):
-```shell
+```yaml
lastState:
terminated:
containerID: 65183c1877aaec2e8427bc95609cc52677a454b56fcb24340dbd22917c23b10f
@@ -278,7 +278,7 @@ kubectl describe pod memory-demo-3 --namespace=mem-example
The output shows that the Container cannot be scheduled because of insufficient memory on the Nodes:
-```shell
+```
Events:
... Reason Message
------ -------
@@ -291,8 +291,8 @@ The memory resource is measured in bytes. You can express memory as a plain inte
fixed-point integer with one of these suffixes: E, P, T, G, M, K, Ei, Pi, Ti, Gi, Mi, Ki.
For example, the following represent approximately the same value:
-```shell
-128974848, 129e6, 129M , 123Mi
+```
+128974848, 129e6, 129M, 123Mi
```
Delete your Pod:
diff --git a/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md b/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
index 62b334e068..8dc36c5e39 100644
--- a/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
+++ b/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
@@ -10,7 +10,7 @@ card:
Many applications rely on configuration which is used during either application initialization or runtime.
Most of the times there is a requirement to adjust values assigned to configuration parameters.
-ConfigMaps is the kubernetes way to inject application pods with configuration data.
+ConfigMaps is the kubernetes way to inject application pods with configuration data.
ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps.
@@ -461,35 +461,35 @@ configmap/special-config-2-c92b5mmcf2 created
### Define a container environment variable with data from a single ConfigMap
-1. Define an environment variable as a key-value pair in a ConfigMap:
+1. Define an environment variable as a key-value pair in a ConfigMap:
- ```shell
- kubectl create configmap special-config --from-literal=special.how=very
- ```
+ ```shell
+ kubectl create configmap special-config --from-literal=special.how=very
+ ```
-2. Assign the `special.how` value defined in the ConfigMap to the `SPECIAL_LEVEL_KEY` environment variable in the Pod specification.
+2. Assign the `special.how` value defined in the ConfigMap to the `SPECIAL_LEVEL_KEY` environment variable in the Pod specification.
{{< codenew file="pods/pod-single-configmap-env-variable.yaml" >}}
Create the Pod:
- ```shell
- kubectl create -f https://kubernetes.io/examples/pods/pod-single-configmap-env-variable.yaml
- ```
+ ```shell
+ kubectl create -f https://kubernetes.io/examples/pods/pod-single-configmap-env-variable.yaml
+ ```
Now, the Pod's output includes environment variable `SPECIAL_LEVEL_KEY=very`.
### Define container environment variables with data from multiple ConfigMaps
- * As with the previous example, create the ConfigMaps first.
+* As with the previous example, create the ConfigMaps first.
- {{< codenew file="configmap/configmaps.yaml" >}}
+ {{< codenew file="configmap/configmaps.yaml" >}}
- Create the ConfigMap:
+ Create the ConfigMap:
- ```shell
- kubectl create -f https://kubernetes.io/examples/configmap/configmaps.yaml
- ```
+ ```shell
+ kubectl create -f https://kubernetes.io/examples/configmap/configmaps.yaml
+ ```
* Define the environment variables in the Pod specification.
@@ -497,9 +497,9 @@ configmap/special-config-2-c92b5mmcf2 created
Create the Pod:
- ```shell
- kubectl create -f https://kubernetes.io/examples/pods/pod-multiple-configmap-env-variable.yaml
- ```
+ ```shell
+ kubectl create -f https://kubernetes.io/examples/pods/pod-multiple-configmap-env-variable.yaml
+ ```
Now, the Pod's output includes environment variables `SPECIAL_LEVEL_KEY=very` and `LOG_LEVEL=INFO`.
@@ -515,21 +515,21 @@ This functionality is available in Kubernetes v1.6 and later.
Create the ConfigMap:
- ```shell
- kubectl create -f https://kubernetes.io/examples/configmap/configmap-multikeys.yaml
- ```
+ ```shell
+ kubectl create -f https://kubernetes.io/examples/configmap/configmap-multikeys.yaml
+ ```
* Use `envFrom` to define all of the ConfigMap's data as container environment variables. The key from the ConfigMap becomes the environment variable name in the Pod.
- {{< codenew file="pods/pod-configmap-envFrom.yaml" >}}
+ {{< codenew file="pods/pod-configmap-envFrom.yaml" >}}
- Create the Pod:
+ Create the Pod:
- ```shell
- kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-envFrom.yaml
- ```
+ ```shell
+ kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-envFrom.yaml
+ ```
- Now, the Pod's output includes environment variables `SPECIAL_LEVEL=very` and `SPECIAL_TYPE=charm`.
+ Now, the Pod's output includes environment variables `SPECIAL_LEVEL=very` and `SPECIAL_TYPE=charm`.
## Use ConfigMap-defined environment variables in Pod commands
@@ -548,7 +548,7 @@ kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-env-var-valu
produces the following output in the `test-container` container:
-```shell
+```
very charm
```
@@ -582,7 +582,7 @@ kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-volume.yaml
When the pod runs, the command `ls /etc/config/` produces the output below:
-```shell
+```
SPECIAL_LEVEL
SPECIAL_TYPE
```
@@ -610,7 +610,7 @@ kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-volume-speci
When the pod runs, the command `cat /etc/config/keys` produces the output below:
-```shell
+```
very
```
@@ -680,15 +680,15 @@ data:
- If you use `envFrom` to define environment variables from ConfigMaps, keys that are considered invalid will be skipped. The pod will be allowed to start, but the invalid names will be recorded in the event log (`InvalidVariableNames`). The log message lists each skipped key. For example:
- ```shell
- kubectl get events
- ```
+ ```shell
+ kubectl get events
+ ```
- The output is similar to this:
- ```
- LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE
- 0s 0s 1 dapi-test-pod Pod Warning InvalidEnvironmentVariableNames {kubelet, 127.0.0.1} Keys [1badkey, 2alsobad] from the EnvFrom configMap default/myconfig were skipped since they are considered invalid environment variable names.
- ```
+ The output is similar to this:
+ ```
+ LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE
+ 0s 0s 1 dapi-test-pod Pod Warning InvalidEnvironmentVariableNames {kubelet, 127.0.0.1} Keys [1badkey, 2alsobad] from the EnvFrom configMap default/myconfig were skipped since they are considered invalid environment variable names.
+ ```
- ConfigMaps reside in a specific {{< glossary_tooltip term_id="namespace" >}}. A ConfigMap can only be referenced by pods residing in the same namespace.
@@ -699,4 +699,3 @@ data:
## {{% heading "whatsnext" %}}
* Follow a real world example of [Configuring Redis using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/).
-
diff --git a/content/en/docs/tasks/configure-pod-container/configure-runasusername.md b/content/en/docs/tasks/configure-pod-container/configure-runasusername.md
index 9ddcac270f..58028f9c89 100644
--- a/content/en/docs/tasks/configure-pod-container/configure-runasusername.md
+++ b/content/en/docs/tasks/configure-pod-container/configure-runasusername.md
@@ -57,7 +57,7 @@ echo $env:USERNAME
The output should be:
-```shell
+```
ContainerUser
```
@@ -97,7 +97,7 @@ echo $env:USERNAME
The output should be:
-```shell
+```
ContainerAdministrator
```
@@ -120,7 +120,7 @@ For more information about these limtations, check [here](https://support.micros
## {{% heading "whatsnext" %}}
-* [Guide for scheduling Windows containers in Kubernetes](/docs/setup/production-environment/windows/user-guide-windows-containers/)
-* [Managing Workload Identity with Group Managed Service Accounts (GMSA)](/docs/setup/production-environment/windows/user-guide-windows-containers/#managing-workload-identity-with-group-managed-service-accounts)
+* [Guide for scheduling Windows containers in Kubernetes](/docs/concepts/windows/user-guide/)
+* [Managing Workload Identity with Group Managed Service Accounts (GMSA)](/docs/concepts/windows/user-guide/#managing-workload-identity-with-group-managed-service-accounts)
* [Configure GMSA for Windows pods and containers](/docs/tasks/configure-pod-container/configure-gmsa/)
diff --git a/content/en/docs/tasks/debug/debug-cluster/local-debugging.md b/content/en/docs/tasks/debug/debug-cluster/local-debugging.md
index f556deaa39..1d97a4134d 100644
--- a/content/en/docs/tasks/debug/debug-cluster/local-debugging.md
+++ b/content/en/docs/tasks/debug/debug-cluster/local-debugging.md
@@ -24,7 +24,7 @@ This document describes using `telepresence` to develop and debug services runni
## Connecting your local machine to a remote Kubernetes cluster
-After installing `telepresence`, run `telepresence connect` to launch it's Daemon and connect your local workstation to the cluster.
+After installing `telepresence`, run `telepresence connect` to launch its Daemon and connect your local workstation to the cluster.
```
$ telepresence connect
diff --git a/content/en/docs/tasks/debug/debug-cluster/windows.md b/content/en/docs/tasks/debug/debug-cluster/windows.md
new file mode 100644
index 0000000000..ccd6cf4434
--- /dev/null
+++ b/content/en/docs/tasks/debug/debug-cluster/windows.md
@@ -0,0 +1,170 @@
+---
+reviewers:
+- aravindhp
+- jayunit100
+- jsturtevant
+- marosset
+title: Windows debugging tips
+content_type: concept
+---
+
+
+
+
+
+## Node-level troubleshooting {#troubleshooting-node}
+
+1. My Pods are stuck at "Container Creating" or restarting over and over
+
+ Ensure that your pause image is compatible with your Windows OS version.
+ See [Pause container](/docs/setup/production-environment/windows/intro-windows-in-kubernetes#pause-container)
+ to see the latest / recommended pause image and/or get more information.
+
+ {{< note >}}
+ If using containerd as your container runtime the pause image is specified in the
+ `plugins.plugins.cri.sandbox_image` field of the of config.toml configration file.
+ {{< /note >}}
+
+1. My pods show status as `ErrImgPull` or `ImagePullBackOff`
+
+ Ensure that your Pod is getting scheduled to a [compatable](https://docs.microsoft.com/virtualization/windowscontainers/deploy-containers/version-compatibility) Windows Node.
+
+ More information on how to specify a compatable node for your Pod can be found in [this guide](/docs/setup/production-environment/windows/user-guide-windows-containers/#ensuring-os-specific-workloads-land-on-the-appropriate-container-host).
+
+## Network troubleshooting {#troubleshooting-network}
+
+1. My Windows Pods do not have network connectivity
+
+ If you are using virtual machines, ensure that MAC spoofing is **enabled** on all
+ the VM network adapter(s).
+
+1. My Windows Pods cannot ping external resources
+
+ Windows Pods do not have outbound rules programmed for the ICMP protocol. However,
+ TCP/UDP is supported. When trying to demonstrate connectivity to resources
+ outside of the cluster, substitute `ping ` with corresponding
+ `curl ` commands.
+
+ If you are still facing problems, most likely your network configuration in
+ [cni.conf](https://github.com/Microsoft/SDN/blob/master/Kubernetes/flannel/l2bridge/cni/config/cni.conf)
+ deserves some extra attention. You can always edit this static file. The
+ configuration update will apply to any new Kubernetes resources.
+
+ One of the Kubernetes networking requirements
+ (see [Kubernetes model](/docs/concepts/cluster-administration/networking/)) is
+ for cluster communication to occur without
+ NAT internally. To honor this requirement, there is an
+ [ExceptionList](https://github.com/Microsoft/SDN/blob/master/Kubernetes/flannel/l2bridge/cni/config/cni.conf#L20)
+ for all the communication where you do not want outbound NAT to occur. However,
+ this also means that you need to exclude the external IP you are trying to query
+ from the `ExceptionList`. Only then will the traffic originating from your Windows
+ pods be SNAT'ed correctly to receive a response from the outside world. In this
+ regard, your `ExceptionList` in `cni.conf` should look as follows:
+
+ ```conf
+ "ExceptionList": [
+ "10.244.0.0/16", # Cluster subnet
+ "10.96.0.0/12", # Service subnet
+ "10.127.130.0/24" # Management (host) subnet
+ ]
+ ```
+
+1. My Windows node cannot access `NodePort` type Services
+
+ Local NodePort access from the node itself fails. This is a known
+ limitation. NodePort access works from other nodes or external clients.
+
+1. vNICs and HNS endpoints of containers are being deleted
+
+ This issue can be caused when the `hostname-override` parameter is not passed to
+ [kube-proxy](/docs/reference/command-line-tools-reference/kube-proxy/). To resolve
+ it, users need to pass the hostname to kube-proxy as follows:
+
+ ```powershell
+ C:\k\kube-proxy.exe --hostname-override=$(hostname)
+ ```
+
+1. My Windows node cannot access my services using the service IP
+
+ This is a known limitation of the networking stack on Windows. However, Windows Pods can access the Service IP.
+
+1. No network adapter is found when starting the kubelet
+
+ The Windows networking stack needs a virtual adapter for Kubernetes networking to work.
+ If the following commands return no results (in an admin shell),
+ virtual network creation — a necessary prerequisite for the kubelet to work — has failed:
+
+ ```powershell
+ Get-HnsNetwork | ? Name -ieq "cbr0"
+ Get-NetAdapter | ? Name -Like "vEthernet (Ethernet*"
+ ```
+
+ Often it is worthwhile to modify the [InterfaceName](https://github.com/microsoft/SDN/blob/master/Kubernetes/flannel/start.ps1#L7) parameter of the `start.ps1` script,
+ in cases where the host's network adapter isn't "Ethernet".
+ Otherwise, consult the output of the `start-kubelet.ps1` script to see if there are errors during virtual network creation.
+
+1. DNS resolution is not properly working
+
+ Check the DNS limitations for Windows in this [section](#dns-limitations).
+
+1. `kubectl port-forward` fails with "unable to do port forwarding: wincat not found"
+
+ This was implemented in Kubernetes 1.15 by including `wincat.exe` in the pause infrastructure container `mcr.microsoft.com/oss/kubernetes/pause:3.6`.
+ Be sure to use a supported version of Kubernetes.
+ If you would like to build your own pause infrastructure container be sure to include [wincat](https://github.com/kubernetes/kubernetes/tree/master/build/pause/windows/wincat).
+
+1. My Kubernetes installation is failing because my Windows Server node is behind a proxy
+
+ If you are behind a proxy, the following PowerShell environment variables must be defined:
+
+ ```PowerShell
+ [Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://proxy.example.com:80/", [EnvironmentVariableTarget]::Machine)
+ [Environment]::SetEnvironmentVariable("HTTPS_PROXY", "http://proxy.example.com:443/", [EnvironmentVariableTarget]::Machine)
+ ```
+
+### Flannel troubleshooting
+
+1. With Flannel, my nodes are having issues after rejoining a cluster
+
+ Whenever a previously deleted node is being re-joined to the cluster, flannelD
+ tries to assign a new pod subnet to the node. Users should remove the old pod
+ subnet configuration files in the following paths:
+
+ ```powershell
+ Remove-Item C:\k\SourceVip.json
+ Remove-Item C:\k\SourceVipRequest.json
+ ```
+
+1. Flanneld is stuck in "Waiting for the Network to be created"
+
+ There are numerous reports of this [issue](https://github.com/coreos/flannel/issues/1066);
+ most likely it is a timing issue for when the management IP of the flannel network is set.
+ A workaround is to relaunch `start.ps1` or relaunch it manually as follows:
+
+ ```powershell
+ [Environment]::SetEnvironmentVariable("NODE_NAME", "")
+ C:\flannel\flanneld.exe --kubeconfig-file=c:\k\config --iface= --ip-masq=1 --kube-subnet-mgr=1
+ ```
+
+1. My Windows Pods cannot launch because of missing `/run/flannel/subnet.env`
+
+ This indicates that Flannel didn't launch correctly. You can either try
+ to restart `flanneld.exe` or you can copy the files over manually from
+ `/run/flannel/subnet.env` on the Kubernetes master to `C:\run\flannel\subnet.env`
+ on the Windows worker node and modify the `FLANNEL_SUBNET` row to a different
+ number. For example, if node subnet 10.244.4.1/24 is desired:
+
+ ```env
+ FLANNEL_NETWORK=10.244.0.0/16
+ FLANNEL_SUBNET=10.244.4.1/24
+ FLANNEL_MTU=1500
+ FLANNEL_IPMASQ=true
+ ```
+
+### Further investigation
+
+If these steps don't resolve your problem, you can get help running Windows containers on Windows nodes in Kubernetes through:
+
+* StackOverflow [Windows Server Container](https://stackoverflow.com/questions/tagged/windows-server-container) topic
+* Kubernetes Official Forum [discuss.kubernetes.io](https://discuss.kubernetes.io/)
+* Kubernetes Slack [#SIG-Windows Channel](https://kubernetes.slack.com/messages/sig-windows)
\ No newline at end of file
diff --git a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
index fdcc276a45..6857f1a4d5 100644
--- a/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
+++ b/content/en/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning.md
@@ -444,7 +444,7 @@ spec:
served: true
# One and only one version must be marked as the storage version.
storage: true
- # Each version can define it's own schema when there is no top-level
+ # Each version can define its own schema when there is no top-level
# schema is defined.
schema:
openAPIV3Schema:
@@ -512,7 +512,7 @@ spec:
served: true
# One and only one version must be marked as the storage version.
storage: true
- # Each version can define it's own schema when there is no top-level
+ # Each version can define its own schema when there is no top-level
# schema is defined.
schema:
openAPIV3Schema:
diff --git a/content/en/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md b/content/en/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md
index d50b3e91a5..fb6085980b 100644
--- a/content/en/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md
+++ b/content/en/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information.md
@@ -69,7 +69,7 @@ kubectl logs kubernetes-downwardapi-volume-example
The output shows the contents of the `labels` file and the `annotations` file:
-```shell
+```
cluster="test-cluster1"
rack="rack-22"
zone="us-est-coast"
@@ -155,7 +155,7 @@ file for a Pod that has one Container:
{{< codenew file="pods/inject/dapi-volume-resources.yaml" >}}
In the configuration file, you can see that the Pod has a
-[`downwardAPI` volume](/concepts/storage/volumes/#downwardapi),
+[`downwardAPI` volume](/docs/concepts/storage/volumes/#downwardapi),
and the Container mounts the volume at `/etc/podinfo`.
Look at the `items` array under `downwardAPI`. Each element of the array is a
diff --git a/content/en/docs/tasks/manage-daemon/update-daemon-set.md b/content/en/docs/tasks/manage-daemon/update-daemon-set.md
index e435f392fe..d6d6b68f19 100644
--- a/content/en/docs/tasks/manage-daemon/update-daemon-set.md
+++ b/content/en/docs/tasks/manage-daemon/update-daemon-set.md
@@ -79,7 +79,7 @@ kubectl apply -f https://k8s.io/examples/controllers/fluentd-daemonset.yaml --dr
The output from both commands should be:
-```shell
+```
RollingUpdate
```
diff --git a/content/en/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch.md b/content/en/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch.md
index 7b38703c74..ad2fc41173 100644
--- a/content/en/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch.md
+++ b/content/en/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch.md
@@ -82,7 +82,7 @@ kubectl get deployment patch-demo --output yaml
The output shows that the PodSpec in the Deployment has two Containers:
-```shell
+```yaml
containers:
- image: redis
imagePullPolicy: Always
@@ -309,7 +309,7 @@ kubectl patch deployment retainkeys-demo --type merge --patch-file patch-file-no
In the output, you can see that it is not possible to set `type` as `Recreate` when a value is defined for `spec.strategy.rollingUpdate`:
-```shell
+```
The Deployment "retainkeys-demo" is invalid: spec.strategy.rollingUpdate: Forbidden: may not be specified when strategy `type` is 'Recreate'
```
@@ -341,7 +341,7 @@ kubectl get deployment retainkeys-demo --output yaml
The output shows that the strategy object in the Deployment does not contain the `rollingUpdate` key anymore:
-```shell
+```yaml
spec:
strategy:
type: Recreate
diff --git a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md
index e9a446287c..1f655ea535 100644
--- a/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md
+++ b/content/en/docs/tasks/run-application/horizontal-pod-autoscale.md
@@ -400,7 +400,7 @@ scaling in that direction.
### Stabilization window
The stabilization window is used to restrict the [flapping](#flapping) of
-replicas count when the metrics used for scaling keep fluctuating. The autoscaling algorithm
+replica count when the metrics used for scaling keep fluctuating. The autoscaling algorithm
uses this window to infer a previous desired state and avoid unwanted changes to workload
scale.
diff --git a/content/en/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive.html b/content/en/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive.html
index bb926a1d19..fd3db09a42 100644
--- a/content/en/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive.html
+++ b/content/en/docs/tutorials/configuration/configure-java-microservice/configure-java-microservice-interactive.html
@@ -11,7 +11,7 @@ weight: 20
-
+{{< katacoda-tutorial >}}
diff --git a/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md b/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md
index ec6edb9cc7..d95e752208 100644
--- a/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md
+++ b/content/en/docs/tutorials/configuration/configure-redis-using-configmap.md
@@ -8,7 +8,7 @@ content_type: tutorial
-This page provides a real world example of how to configure Redis using a ConfigMap and builds upon the [Configure Containers Using a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/) task.
+This page provides a real world example of how to configure Redis using a ConfigMap and builds upon the [Configure a Pod to Use a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/) task.
@@ -27,7 +27,7 @@ This page provides a real world example of how to configure Redis using a Config
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
* The example shown on this page works with `kubectl` 1.14 and above.
-* Understand [Configure Containers Using a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/).
+* Understand [Configure a Pod to Use a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/).
@@ -78,7 +78,7 @@ kubectl get pod/redis configmap/example-redis-config
You should see the following output:
-```shell
+```
NAME READY STATUS RESTARTS AGE
pod/redis 1/1 Running 0 8s
diff --git a/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive.html b/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive.html
index 5301c6b7a1..2649ce4f94 100644
--- a/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive.html
+++ b/content/en/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive.html
@@ -11,7 +11,7 @@ weight: 20
-
+{{< katacoda-tutorial >}}
diff --git a/content/en/docs/tutorials/services/source-ip.md b/content/en/docs/tutorials/services/source-ip.md
index bb9a622c98..9eab7538d4 100644
--- a/content/en/docs/tutorials/services/source-ip.md
+++ b/content/en/docs/tutorials/services/source-ip.md
@@ -206,19 +206,8 @@ Note that these are not the correct client IPs, they're cluster internal IPs. Th
Visually:
-{{< mermaid >}}
-graph LR;
- client(client)-->node2[Node 2];
- node2-->client;
- node2-. SNAT .->node1[Node 1];
- node1-. SNAT .->node2;
- node1-->endpoint(Endpoint);
+{{< figure src="/docs/images/tutor-service-nodePort-fig01.svg" alt="source IP nodeport figure 01" class="diagram-large" caption="Figure. Source IP Type=NodePort using SNAT" link="https://mermaid.live/edit#pako:eNqNkV9rwyAUxb-K3LysYEqS_WFYKAzat9GHdW9zDxKvi9RoMIZtlH732ZjSbE970cu5v3s86hFqJxEYfHjRNeT5ZcUtIbXRaMNN2hZ5vrYRqt52cSXV-4iMSuwkZiYtyX739EqWaahMQ-V1qPxDVLNOvkYrO6fj2dupWMR2iiT6foOKdEZoS5Q2hmVSStoH7w7IMqXUVOefWoaG3XVftHbGeZYVRbH6ZXJ47CeL2-qhxvt_ucTe1SUlpuMN6CX12XeGpLdJiaMMFFr0rdAyvvfxjHEIDbbIgcVSohKDCRy4PUV06KQIuJU6OA9MCdMjBTEEt_-2NbDgB7xAGy3i97VJPP0ABRmcqg" >}}
- classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
- classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
- class node1,node2,endpoint k8s;
- class client plain;
-{{ mermaid >}}
To avoid this, Kubernetes has a feature to
[preserve the client source IP](/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip).
@@ -262,20 +251,8 @@ This is what happens:
Visually:
-{{< mermaid >}}
-graph TD;
- client --> node1[Node 1];
- client(client) --x node2[Node 2];
- node1 --> endpoint(endpoint);
- endpoint --> node1;
-
- classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
- classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
- class node1,node2,endpoint k8s;
- class client plain;
-{{ mermaid >}}
-
+{{< figure src="/docs/images/tutor-service-nodePort-fig02.svg" alt="source IP nodeport figure 02" class="diagram-large" caption="Figure. Source IP Type=NodePort preserves client source IP address" link="" >}}
## Source IP for Services with `Type=LoadBalancer`
diff --git a/content/en/releases/patch-releases.md b/content/en/releases/patch-releases.md
index 144e74676b..d0f56d19c3 100644
--- a/content/en/releases/patch-releases.md
+++ b/content/en/releases/patch-releases.md
@@ -78,10 +78,10 @@ releases may also occur in between these.
| Monthly Patch Release | Cherry Pick Deadline | Target date |
| --------------------- | -------------------- | ----------- |
-| May 2022 | 2022-05-20 | 2022-05-24 |
| June 2022 | 2022-06-10 | 2022-06-15 |
| July 2022 | 2022-07-08 | 2022-07-13 |
-| August 2022 | 2022-08-12 | 2022-08-16 |
+| August 2022 | 2022-08-12 | 2022-08-17 |
+| September 2022 | 2022-09-09 | 2022-09-14 |
## Detailed Release History for Active Branches
@@ -93,6 +93,7 @@ End of Life for **1.24** is **2023-09-29**
| PATCH RELEASE | CHERRY PICK DEADLINE | TARGET DATE | NOTE |
|---------------|----------------------|-------------|------|
+| 1.24.2 | 2022-06-10 | 2022-06-15 | |
| 1.24.1 | 2022-05-20 | 2022-05-24 | |
### 1.23
@@ -103,11 +104,12 @@ End of Life for **1.23** is **2023-02-28**.
| Patch Release | Cherry Pick Deadline | Target Date | Note |
|---------------|----------------------|-------------|------|
+| 1.23.8 | 2022-06-10 | 2022-06-15 | |
| 1.23.7 | 2022-05-20 | 2022-05-24 | |
| 1.23.6 | 2022-04-08 | 2022-04-13 | |
| 1.23.5 | 2022-03-11 | 2022-03-16 | |
| 1.23.4 | 2022-02-11 | 2022-02-16 | |
-| 1.23.3 | 2022-01-24 | 2022-01-25 | [Out-of-Band Release](https://groups.google.com/u/2/a/kubernetes.io/g/dev/c/Xl1sm-CItaY) |
+| 1.23.3 | 2022-01-24 | 2022-01-25 | [Out-of-Band Release](https://groups.google.com/a/kubernetes.io/g/dev/c/Xl1sm-CItaY) |
| 1.23.2 | 2022-01-14 | 2022-01-19 | |
| 1.23.1 | 2021-12-14 | 2021-12-16 | |
@@ -119,6 +121,7 @@ End of Life for **1.22** is **2022-10-28**
| Patch Release | Cherry Pick Deadline | Target Date | Note |
|---------------|----------------------|-------------|------|
+| 1.22.11 | 2022-06-10 | 2022-06-15 | |
| 1.22.10 | 2022-05-20 | 2022-05-24 | |
| 1.22.9 | 2022-04-08 | 2022-04-13 | |
| 1.22.8 | 2022-03-11 | 2022-03-16 | |
@@ -137,20 +140,21 @@ End of Life for **1.22** is **2022-10-28**
End of Life for **1.21** is **2022-06-28**
| Patch Release | Cherry Pick Deadline | Target Date | Note |
-| ------------- | -------------------- | ----------- | ---------------------------------------------------------------------- |
-| 1.21.13 | 2022-05-20 | 2022-05-24 | |
-| 1.21.12 | 2022-04-08 | 2022-04-13 | |
-| 1.21.11 | 2022-03-11 | 2022-03-16 | |
-| 1.21.10 | 2022-02-11 | 2022-02-16 | |
-| 1.21.9 | 2022-01-14 | 2022-01-19 | |
-| 1.21.8 | 2021-12-10 | 2021-12-15 | |
-| 1.21.7 | 2021-11-12 | 2021-11-17 | |
-| 1.21.6 | 2021-10-22 | 2021-10-27 | |
-| 1.21.5 | 2021-09-10 | 2021-09-15 | |
-| 1.21.4 | 2021-08-07 | 2021-08-11 | |
-| 1.21.3 | 2021-07-10 | 2021-07-14 | |
-| 1.21.2 | 2021-06-12 | 2021-06-16 | |
-| 1.21.1 | 2021-05-07 | 2021-05-12 | [Regression](https://groups.google.com/g/kubernetes-dev/c/KuF8s2zueFs) |
+| ------------- | -------------------- | ----------- | ------------------------------------------------------------------------ |
+| 1.21.14 | 2022-06-10 | 2022-06-15 | If there is any critical issues to be released otherwise will be skipped |
+| 1.21.13 | 2022-05-20 | 2022-05-24 | |
+| 1.21.12 | 2022-04-08 | 2022-04-13 | |
+| 1.21.11 | 2022-03-11 | 2022-03-16 | |
+| 1.21.10 | 2022-02-11 | 2022-02-16 | |
+| 1.21.9 | 2022-01-14 | 2022-01-19 | |
+| 1.21.8 | 2021-12-10 | 2021-12-15 | |
+| 1.21.7 | 2021-11-12 | 2021-11-17 | |
+| 1.21.6 | 2021-10-22 | 2021-10-27 | |
+| 1.21.5 | 2021-09-10 | 2021-09-15 | |
+| 1.21.4 | 2021-08-07 | 2021-08-11 | |
+| 1.21.3 | 2021-07-10 | 2021-07-14 | |
+| 1.21.2 | 2021-06-12 | 2021-06-16 | |
+| 1.21.1 | 2021-05-07 | 2021-05-12 | [Regression](https://groups.google.com/g/kubernetes-dev/c/KuF8s2zueFs) |
## Non-Active Branch History
diff --git a/content/en/releases/version-skew-policy.md b/content/en/releases/version-skew-policy.md
index 87f6cf2c62..f59ab71ad8 100644
--- a/content/en/releases/version-skew-policy.md
+++ b/content/en/releases/version-skew-policy.md
@@ -26,7 +26,7 @@ For more information, see [Kubernetes Release Versioning](https://github.com/kub
The Kubernetes project maintains release branches for the most recent three minor releases ({{< skew latestVersion >}}, {{< skew prevMinorVersion >}}, {{< skew oldestMinorVersion >}}). Kubernetes 1.19 and newer receive approximately 1 year of patch support. Kubernetes 1.18 and older received approximately 9 months of patch support.
Applicable fixes, including security fixes, may be backported to those three release branches, depending on severity and feasibility.
-Patch releases are cut from those branches at a [regular cadence](https://git.k8s.io/sig-release/releases/patch-releases.md#cadence), plus additional urgent releases, when required.
+Patch releases are cut from those branches at a [regular cadence](https://kubernetes.io/releases/patch-releases/#cadence), plus additional urgent releases, when required.
The [Release Managers](/releases/release-managers/) group owns this decision.
diff --git a/content/es/docs/concepts/workloads/pods/init-containers.md b/content/es/docs/concepts/workloads/pods/init-containers.md
index fad0220899..fafb6ae2f6 100644
--- a/content/es/docs/concepts/workloads/pods/init-containers.md
+++ b/content/es/docs/concepts/workloads/pods/init-containers.md
@@ -338,4 +338,4 @@ Kubernetes, consulta la documentación de la versión que estás utilizando.
## {{% heading "whatsnext" %}}
* Lee acerca de [creando un Pod que tiene un contenedor de inicialización](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
-* Aprende cómo [depurar contenedores de inicialización](/docs/tasks/debug-application-cluster/debug-init-containers/)
+* Aprende cómo [depurar contenedores de inicialización](/docs/tasks/debug/debug-application/debug-init-containers/)
diff --git a/content/fr/docs/concepts/workloads/pods/init-containers.md b/content/fr/docs/concepts/workloads/pods/init-containers.md
index fb4b6f3270..2af4306b0b 100644
--- a/content/fr/docs/concepts/workloads/pods/init-containers.md
+++ b/content/fr/docs/concepts/workloads/pods/init-containers.md
@@ -325,6 +325,6 @@ redémarrage du conteneur d'application.
* Lire à propos de la [création d'un Pod ayant un init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#creating-a-pod-that-has-an-init-container)
-* Apprendre à [debugger les init containers](/docs/tasks/debug-application-cluster/debug-init-containers/)
+* Apprendre à [debugger les init containers](/docs/tasks/debug/debug-application/debug-init-containers/)
diff --git a/content/fr/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/fr/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
index 5902ca926d..2aa904144f 100644
--- a/content/fr/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
+++ b/content/fr/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
@@ -37,7 +37,7 @@ Le champ `periodSeconds` spécifie que le Kubelet doit effectuer un check de liv
Au démarrage, le conteneur exécute cette commande :
```shell
-/bin/sh -c "touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600"
+/bin/sh -c "touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600"
```
Pour les 30 premières secondes de la vie du conteneur, il y a un fichier `/tmp/healthy`.
diff --git a/content/fr/examples/pods/probe/exec-liveness.yaml b/content/fr/examples/pods/probe/exec-liveness.yaml
index 07bf75f85c..6a9c9b3213 100644
--- a/content/fr/examples/pods/probe/exec-liveness.yaml
+++ b/content/fr/examples/pods/probe/exec-liveness.yaml
@@ -11,7 +11,7 @@ spec:
args:
- /bin/sh
- -c
- - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
+ - touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
diff --git a/content/id/docs/concepts/workloads/pods/disruptions.md b/content/id/docs/concepts/workloads/pods/disruptions.md
index 7a09eed3a5..f466bc6300 100644
--- a/content/id/docs/concepts/workloads/pods/disruptions.md
+++ b/content/id/docs/concepts/workloads/pods/disruptions.md
@@ -67,7 +67,7 @@ Kubernetes menawarkan fitur-fitur untuk membantu menjalankan aplikasi-aplikasi d
Pemilik aplikasi dapat membuat objek `PodDisruptionBudget` (PDB) untuk setiap aplikasi. Sebuah PDB membatasi jumlah Pod yang boleh mati secara bersamaan pada aplikasi yang direplikasi dikarenakan disrupsi yang disengaja.
Misalnya, sebuah aplikasi yang bekerja secara _quorum_ mau memastikan bahwa jumlah replika yang berjalan tidak jatuh ke bawah yang dibutuhkan untuk membentuk sebuah _quorum_. Contoh lainnya, sebuah _front-end_ web mungkin perlu memastikan bahwa jumlah replika yang melayani trafik tidak pernah turun ke total persentase yang telah ditentukan.
-Administrator klaster dan penyedia layanan Kubernetes sebaiknya menggunakan alat-alat yang menghormati PDB dengan cara berkomunikasi dengan [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api) dari pada menghapus Pod atau Deployment secara langsung. Contohnya adalah perintah `kubectl drain` dan skrip pembaruan Kubernets-on-GCE (`cluster/gce/upgrade.sh`)
+Administrator klaster dan penyedia layanan Kubernetes sebaiknya menggunakan alat-alat yang menghormati PDB dengan cara berkomunikasi dengan [Eviction API](/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api) dari pada menghapus Pod atau Deployment secara langsung. Contohnya adalah perintah `kubectl drain` dan skrip pembaruan Kubernetes-on-GCE (`cluster/gce/upgrade.sh`)
Saat seorang administrator klaster ingin melakukan _drain_ terhadap sebuah node, ia akan menggunakan perintah `kubectl drain`. Alat tersebut mencoba untuk "mengusir" semua Pod di node tersebut. Permintaan untuk mengusir Pod tersebut mungkin ditolak untuk sementara, dan alat tersebut akan mencoba ulang permintaannya secara periodik hingga semua Pod dihapus, atau hingga batas waktu yang ditentukan telah dicapai.
diff --git a/content/id/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/id/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
index 934f6178cd..96b08d1aca 100644
--- a/content/id/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
+++ b/content/id/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
@@ -59,7 +59,7 @@ kode selain 0, maka kubelet akan mematikan Container dan mengulangnya kembali.
Saat dimulai, Container akan menjalankan perintah berikut:
```shell
-/bin/sh -c "touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600"
+/bin/sh -c "touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600"
```
Container memiliki berkas `/tmp/healthy` pada saat 30 detik pertama setelah dijalankan.
diff --git a/content/id/docs/tutorials/kubernetes-basics/explore/explore-intro.html b/content/id/docs/tutorials/kubernetes-basics/explore/explore-intro.html
index a6381b3275..1b3b494b1a 100644
--- a/content/id/docs/tutorials/kubernetes-basics/explore/explore-intro.html
+++ b/content/id/docs/tutorials/kubernetes-basics/explore/explore-intro.html
@@ -76,9 +76,9 @@ weight: 10
Node
Sebuah Pod selalu berjalan dalam sebuah Node. Node merupakan sebuah mesin pekerja (worker) di Kubernetes dan mungkin merupakan mesin virtual ataupun fisik, tergantung dari klaster. Tiap Node dikelola oleh control plane. Satu Node dapat memiliki beberapa Pod, dan control plane Kubernetes yang otomatis menangani penjadwalan pod seluruh Node-Node dalam klaster. Penjadwalan otomatis oleh control plane memperhitungkan tersedianya sumber daya tiap Node.
-
Tiap Node Kuberbetes menjalankan setidaknya:
+
Tiap Node Kubernetes menjalankan setidaknya:
-
Kubelet, satu proses yang bertanggung jawab untuk berkomunikasi antara control plane Kuberneter dan Node; ini juga mengelola Pod-Pod dan kontainer-kontainer yang berjalan di sebuah mesin.
+
Kubelet, satu proses yang bertanggung jawab untuk berkomunikasi antara control plane Kubernetes dan Node; ini juga mengelola Pod-Pod dan kontainer-kontainer yang berjalan di sebuah mesin.
Satu container runtime, seperti Docker, bertanggung jawab untuk menarik image kontainer dari register, membuka kontainer, dan menjalankan aplikasi.
diff --git a/content/id/examples/pods/probe/exec-liveness.yaml b/content/id/examples/pods/probe/exec-liveness.yaml
index 07bf75f85c..6a9c9b3213 100644
--- a/content/id/examples/pods/probe/exec-liveness.yaml
+++ b/content/id/examples/pods/probe/exec-liveness.yaml
@@ -11,7 +11,7 @@ spec:
args:
- /bin/sh
- -c
- - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
+ - touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
diff --git a/content/ja/docs/concepts/scheduling-eviction/api-eviction.md b/content/ja/docs/concepts/scheduling-eviction/api-eviction.md
new file mode 100644
index 0000000000..5092c96b19
--- /dev/null
+++ b/content/ja/docs/concepts/scheduling-eviction/api-eviction.md
@@ -0,0 +1,92 @@
+---
+title: APIを起点とした退避
+content_type: concept
+weight: 70
+---
+
+{{< glossary_definition term_id="api-eviction" length="short" >}}
+
+Eviction APIを直接呼び出すか、`kubectl drain`コマンドのように{{}}のクライアントを使って退避を要求することが可能です。これにより、`Eviction`オブジェクトを作成し、APIサーバーにPodを終了させます。
+
+APIを起点とした退避は[`PodDisruptionBudgets`](/docs/tasks/run-application/configure-pdb/)と[`terminationGracePeriodSeconds`](/ja/docs/concepts/workloads/pods/pod-lifecycle#pod-termination)の設定を優先します。
+
+APIを使用してPodのEvictionオブジェクトを作成することは、Podに対してポリシー制御された[`DELETE`操作](/docs/reference/kubernetes-api/workload-resources/pod-v1/#delete-delete-a-pod)を実行することに似ています。
+
+## Eviction APIの実行 {#calling-the-eviction-api}
+
+Kubernetes APIへアクセスして`Eviction`オブジェクトを作るために[Kubernetesのプログラミング言語のクライアント](/docs/tasks/administer-cluster/access-cluster-api/#programmatic-access-to-the-api)を使用できます。
+そのためには、次の例のようなデータをPOSTすることで操作を試みることができます。
+
+{{< tabs name="Eviction_example" >}}
+{{% tab name="policy/v1" %}}
+{{< note >}}
+`policy/v1`においてEvictionはv1.22以上で利用可能です。それ以前のリリースでは、`policy/v1beta1`を使用してください。
+{{< /note >}}
+
+```json
+{
+ "apiVersion": "policy/v1",
+ "kind": "Eviction",
+ "metadata": {
+ "name": "quux",
+ "namespace": "default"
+ }
+}
+```
+{{% /tab %}}
+{{% tab name="policy/v1beta1" %}}
+{{< note >}}
+v1.22で非推奨となり、`policy/v1`が採用されました。
+{{< /note >}}
+
+```json
+{
+ "apiVersion": "policy/v1beta1",
+ "kind": "Eviction",
+ "metadata": {
+ "name": "quux",
+ "namespace": "default"
+ }
+}
+```
+{{% /tab %}}
+{{< /tabs >}}
+
+また、以下の例のように`curl`や`wget`を使ってAPIにアクセスすることで、操作を試みることもできます。
+
+```bash
+curl -v -H 'Content-type: application/json' https://your-cluster-api-endpoint.example/api/v1/namespaces/default/pods/quux/eviction -d @eviction.json
+```
+
+## APIを起点とした退避の仕組み {#how-api-initiated-eviction-works}
+
+APIを使用して退去を要求した場合、APIサーバーはアドミッションチェックを行い、以下のいずれかを返します。
+
+* `200 OK`:この場合、退去が許可されると`Eviction`サブリソースが作成され、PodのURLに`DELETE`リクエストを送るのと同じように、Podが削除されます。
+* `429 Too Many Requests`:{{}}の設定により、現在退去が許可されていないことを示します。しばらく時間を空けてみてください。また、APIのレート制限のため、このようなレスポンスが表示されることもあります。
+* `500 Internal Server Error`:複数のPodDisruptionBudgetが同じPodを参照している場合など、設定に誤りがあり退去が許可されないことを示します。
+
+退去させたいPodがPodDisruptionBudgetを持つワークロードの一部でない場合、APIサーバーは常に`200 OK`を返して退去を許可します。
+
+APIサーバーが退去を許可した場合、以下の流れでPodが削除されます。
+
+1. APIサーバーの`Pod`リソースの削除タイムスタンプが更新され、APIサーバーは`Pod`リソースが終了したと見なします。また`Pod`リソースは、設定された猶予期間が設けられます。
+1. ローカルのPodが動作しているNodeの{{}}は、`Pod`リソースが終了するようにマークされていることに気付き、Podの適切なシャットダウンを開始します。
+1. kubeletがPodをシャットダウンしている間、コントロールプレーンは{{}}オブジェクトからPodを削除します。その結果、コントローラーはPodを有効なオブジェクトと見なさないようになります。
+1. Podの猶予期間が終了すると、kubeletはローカルPodを強制的に終了します。
+1. kubeletはAPIサーバーに`Pod`リソースを削除するように指示します。
+1. APIサーバーは`Pod`リソースを削除します。
+
+## トラブルシューティング {#troubleshooting-stuck-evictions}
+
+場合によっては、アプリケーションが壊れた状態になり、対処しない限りEviction APIが`429`または`500`レスポンスを返すだけとなることがあります。例えば、ReplicaSetがアプリケーション用のPodを作成しても、新しいPodが`Ready`状態にならない場合などです。また、最後に退去したPodの終了猶予期間が長い場合にも、この事象が見られます。
+
+退去が進まない場合は、以下の解決策を試してみてください。
+
+* 問題を引き起こしている自動化された操作を中止または一時停止し、操作を再開する前に、スタックしているアプリケーションを調査を行ってください。
+* しばらく待ってから、Eviction APIを使用する代わりに、クラスターのコントロールプレーンから直接Podを削除してください。
+
+## {{% heading "whatsnext" %}}
+* [Pod Disruption Budget](/docs/tasks/run-application/configure-pdb/)でアプリケーションを保護する方法について学ぶ
+* [Node不足による退避](/docs/concepts/scheduling-eviction/node-pressure-eviction/)について学ぶ
+* [Podの優先度とプリエンプション](/docs/concepts/scheduling-eviction/pod-priority-preemption/)について学ぶ
diff --git a/content/ja/docs/concepts/workloads/pods/ephemeral-containers.md b/content/ja/docs/concepts/workloads/pods/ephemeral-containers.md
index beb92b3b88..b99d193308 100644
--- a/content/ja/docs/concepts/workloads/pods/ephemeral-containers.md
+++ b/content/ja/docs/concepts/workloads/pods/ephemeral-containers.md
@@ -42,7 +42,7 @@ weight: 80
エフェメラルコンテナを利用する場合には、他のコンテナ内のプロセスにアクセスできるように、[プロセス名前空間の共有](/ja/docs/tasks/configure-pod-container/share-process-namespace/)を有効にすると便利です。
-エフェメラルコンテナを利用してトラブルシューティングを行う例については、[デバッグ用のエフェメラルコンテナを使用してデバッグする](/docs/tasks/debug-application-cluster/debug-running-pod/#ephemeral-container)を参照してください。
+エフェメラルコンテナを利用してトラブルシューティングを行う例については、[デバッグ用のエフェメラルコンテナを使用してデバッグする](/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container)を参照してください。
## Ephemeral containers API
diff --git a/content/ja/docs/reference/glossary/api-eviction.md b/content/ja/docs/reference/glossary/api-eviction.md
new file mode 100644
index 0000000000..25677032b9
--- /dev/null
+++ b/content/ja/docs/reference/glossary/api-eviction.md
@@ -0,0 +1,23 @@
+---
+title: APIを起点とした退避
+id: api-eviction
+date: 2021-04-27
+full_link: /ja/docs/concepts/scheduling-eviction/api-eviction/
+short_description: >
+ APIを起点とした退避は、Eviction APIを使用してEvictionオブジェクトを作成し、Podの正常終了を起動させるプロセスです。
+aka:
+tags:
+- operation
+---
+APIを起点とした退避は、[Eviction API](/docs/reference/generated/kubernetes-api/{{}}/#create-eviction-pod-v1-core)を使用して退避オブジェクトを作成し、Podの正常終了を起動させるプロセスです。
+
+
+
+
+`kubectl drain`コマンドのようなkube-apiserverのクライアントを使用し、Eviction APIを直接呼び出すことで、退避を要求することができます。`Eviction`オブジェクトが生成された時、APIサーバーは対象のPodを終了させます。
+
+APIを起点とした退避は[`PodDisruptionBudgets`](/docs/tasks/run-application/configure-pdb/)と[`terminationGracePeriodSeconds`](/ja/docs/concepts/workloads/pods/pod-lifecycle#pod-termination)の設定を優先します。
+
+APIを起点とした退避は、[Node不足による退避](/docs/concepts/scheduling-eviction/eviction/#kubelet-eviction)とは異なります。
+
+* 詳しくは[APIを起点とした退避](/ja/docs/concepts/scheduling-eviction/api-eviction/)をご覧ください。
diff --git a/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
index 08e48b9fa7..2ac539bf06 100644
--- a/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
+++ b/content/ja/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
@@ -51,7 +51,7 @@ Probeの動作としては、kubeletは`cat /tmp/healthy`を対象のコンテ
このコンテナは、起動すると次のコマンドを実行します:
```shell
-/bin/sh -c "touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600"
+/bin/sh -c "touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600"
```
コンテナが起動してから初めの30秒間は`/tmp/healthy`ファイルがコンテナ内に存在します。
diff --git a/content/ja/examples/pods/probe/exec-liveness.yaml b/content/ja/examples/pods/probe/exec-liveness.yaml
index 07bf75f85c..6a9c9b3213 100644
--- a/content/ja/examples/pods/probe/exec-liveness.yaml
+++ b/content/ja/examples/pods/probe/exec-liveness.yaml
@@ -11,7 +11,7 @@ spec:
args:
- /bin/sh
- -c
- - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
+ - touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
diff --git a/content/pt-br/docs/concepts/policy/_index.md b/content/pt-br/docs/concepts/policy/_index.md
new file mode 100644
index 0000000000..1b5e70aa9b
--- /dev/null
+++ b/content/pt-br/docs/concepts/policy/_index.md
@@ -0,0 +1,6 @@
+---
+title: "Políticas"
+weight: 90
+description: >
+ Políticas que você pode configurar e que afetam grupos de recursos.
+---
diff --git a/content/pt-br/docs/concepts/storage/_index.md b/content/pt-br/docs/concepts/storage/_index.md
new file mode 100644
index 0000000000..41cfbb3507
--- /dev/null
+++ b/content/pt-br/docs/concepts/storage/_index.md
@@ -0,0 +1,8 @@
+---
+title: "Armazenamento"
+weight: 70
+description: >
+ Formas de fornecer armazenamento temporário e de longa duração a Pods em seu
+ cluster.
+---
+
diff --git a/content/pt-br/docs/reference/glossary/applications.md b/content/pt-br/docs/reference/glossary/applications.md
new file mode 100644
index 0000000000..a00ca0ec6c
--- /dev/null
+++ b/content/pt-br/docs/reference/glossary/applications.md
@@ -0,0 +1,12 @@
+---
+title: Aplicações
+id: applications
+date: 2019-05-12
+full_link:
+short_description: >
+ A camada onde vários aplicativos em contêiner são executados.
+aka:
+tags:
+- fundamental
+---
+ A camada onde vários aplicativos em contêiner são executados.
diff --git a/content/pt-br/docs/reference/glossary/certificate.md b/content/pt-br/docs/reference/glossary/certificate.md
new file mode 100644
index 0000000000..d43ead1f32
--- /dev/null
+++ b/content/pt-br/docs/reference/glossary/certificate.md
@@ -0,0 +1,17 @@
+---
+title: Certificado
+id: certificate
+date: 2018-04-12
+full_link: /docs/tasks/tls/managing-tls-in-a-cluster/
+short_description: >
+ Um arquivo criptograficamente seguro usado para validar o acesso ao cluster Kubernetes.
+
+aka:
+tags:
+- security
+---
+ Um arquivo criptograficamente seguro usado para validar o acesso ao cluster Kubernetes.
+
+
+
+Os certificados permitem que aplicativos dentro de um cluster Kubernetes acessem a API do Kubernetes com segurança. Os certificados validam que os clientes têm permissão para acessar a API.
\ No newline at end of file
diff --git a/content/pt-br/docs/reference/glossary/cluster-architect.md b/content/pt-br/docs/reference/glossary/cluster-architect.md
new file mode 100644
index 0000000000..3aeb95e084
--- /dev/null
+++ b/content/pt-br/docs/reference/glossary/cluster-architect.md
@@ -0,0 +1,17 @@
+---
+title: Arquiteto de Cluster
+id: cluster-architect
+date: 2018-04-12
+full_link:
+short_description: >
+ Uma pessoa que projeta infraestrutura que envolve um ou mais clusters Kubernetes.
+
+aka:
+tags:
+- user-type
+---
+ Uma pessoa que projeta infraestrutura que envolve um ou mais clusters Kubernetes.
+
+
+
+Os arquitetos de clusters estão preocupados com as melhores práticas para sistemas distribuídos, por exemplo: alta disponibilidade e segurança.
\ No newline at end of file
diff --git a/content/pt-br/docs/reference/glossary/data-plane.md b/content/pt-br/docs/reference/glossary/data-plane.md
new file mode 100644
index 0000000000..2e7c9946f9
--- /dev/null
+++ b/content/pt-br/docs/reference/glossary/data-plane.md
@@ -0,0 +1,13 @@
+---
+title: Plano de Dados
+id: data-plane
+date: 2019-05-12
+full_link:
+short_description: >
+ A camada que fornece capacidade, tais como CPU, memória, rede e armazenamento, para que os contêineres possam ser executados e conectados a uma rede.
+
+aka:
+tags:
+- fundamental
+---
+ A camada que fornece capacidade, tais como CPU, memória, rede e armazenamento, para que os contêineres possam ser executados e conectados a uma rede.
diff --git a/content/pt-br/docs/setup/production-environment/turnkey-solutions.md b/content/pt-br/docs/setup/production-environment/turnkey-solutions.md
new file mode 100644
index 0000000000..d60a54a754
--- /dev/null
+++ b/content/pt-br/docs/setup/production-environment/turnkey-solutions.md
@@ -0,0 +1,12 @@
+---
+title: Soluções de Nuvem Prontas para uso
+content_type: concept
+weight: 30
+---
+
+
+Essa página fornece uma lista de provedores de soluções certificadas do Kubernetes. Na página de cada provedor, você pode aprender como instalar e configurar clusters prontos para produção.
+
+
+
+{{< cncf-landscape helpers=true category="certified-kubernetes-hosted" >}}
diff --git a/content/ru/docs/contribute/advanced.md b/content/ru/docs/contribute/advanced.md
index bb4ff9a35f..7ee4af13cf 100644
--- a/content/ru/docs/contribute/advanced.md
+++ b/content/ru/docs/contribute/advanced.md
@@ -63,7 +63,7 @@ weight: 30
{{< note >}}
-Бот [`fejta-bot`](https://github.com/fejta-bot) автоматически помечает заявки как устаревшие после 90 дней отсутствия активности, а затем закрывает их после ещё 30 дней простоя, когда они становятся тухлыми. Дежурные по PR должны закрывать заявки после 14-30 дней бездействия.
+Бот [`k8s-ci-robot`](https://github.com/k8s-ci-robot) автоматически помечает заявки как устаревшие после 90 дней отсутствия активности, а затем закрывает их после ещё 30 дней простоя, когда они становятся тухлыми. Дежурные по PR должны закрывать заявки после 14-30 дней бездействия.
{{< /note >}}
diff --git a/content/ru/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md b/content/ru/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
index c55819902a..fd99c78cd6 100644
--- a/content/ru/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
+++ b/content/ru/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes.md
@@ -59,7 +59,7 @@ kubelet исполняет команду `cat /tmp/healthy` в целевом
Когда контейнер запускается, он исполняет команду
```shell
-/bin/sh -c "touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600"
+/bin/sh -c "touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600"
```
Для первых 30 секунд жизни контейнера существует файл `/tmp/healthy`.
diff --git a/content/ru/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html b/content/ru/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
index 502beb23bd..738d2b0bc6 100644
--- a/content/ru/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
+++ b/content/ru/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
@@ -28,7 +28,7 @@ weight: 10
Развёртывания Kubernetes
-
Как только вы запустили кластер Kubernetes, вы можете развернуть свои контейнеризированные приложения в него. Для этого вам нужно создать конфигурацию развёртывания (Deployment) в Kubernetes. Развёртывание сообщает Kubernetes, как создавать и обновлять экземпляры вашего приложения. После создания развёртывания ведущий узел Kubernetes планирует запустить экземпляры приложения на отдельных узлах в кластере.
+
Как только вы запустили кластер Kubernetes, вы можете развернуть на нём свои контейнеризированные приложения. Для этого вам нужно создать конфигурацию развёртывания (Deployment) в Kubernetes. Развёртывание сообщает Kubernetes, как создавать и обновлять экземпляры вашего приложения. После создания развёртывания ведущий узел Kubernetes планирует запустить экземпляры приложения на отдельных узлах в кластере.
-
-
+
+
+
+"Wikimedia Tool Labs is vital for making sure wikis all around the world work as well as they possibly can. Because it's grown organically for almost 10 years, it has become an extremely challenging environment and difficult to maintain. It's like a big ball of mud — you really can't see through it. With Kubernetes, we're simplifying the environment and making it easier for developers to build the tools that make wikis run better."
+{{< /case-studies/quote >}}
+-->
+{{< case-studies/quote author="Yuvi Panda, Wikimedia 基金会和 Wikimedia 工具实验室的运维工程师">}}
-
-
-
-
@@ -1102,7 +1350,7 @@ It does not allow viewing roles or rolebindings.
This role does not allow viewing Secrets, since reading
the contents of Secrets enables access to ServiceAccount credentials
in the namespace, which would allow API access as any ServiceAccount
-in the namespace (a form of privilege escalation).
+in the namespace (a form of privilege escalation).
-->
此角色不允许查看 Secrets,因为读取 Secret 的内容意味着可以访问名字空间中
ServiceAccount 的凭据信息,进而允许利用名字空间中任何 ServiceAccount 的
@@ -1118,7 +1366,7 @@ ServiceAccount 的凭据信息,进而允许利用名字空间中任何 Service
### 核心组件角色 {#core-component-roles}
-
+
system:kube-scheduler 用户
-
允许访问 {{< glossary_tooltip term_id="kube-scheduler" text="scheduler" >}}
@@ -1148,8 +1396,8 @@ Allows access to the resources required by the {{< glossary_tooltip term_id="kub
system:volume-scheduler
-
system:kube-scheduler 用户
@@ -1161,23 +1409,23 @@ Allows access to the volume resources required by the kube-scheduler component.
@@ -1368,10 +1614,10 @@ Allows read access to control-plane monitoring endpoints
The Kubernetes {{< glossary_tooltip term_id="kube-controller-manager" text="controller manager" >}} runs
{{< glossary_tooltip term_id="controller" text="controllers" >}} that are built in to the Kubernetes
control plane.
-When invoked with `-use-service-account-credentials`, kube-controller-manager starts each controller
+When invoked with `--use-service-account-credentials`, kube-controller-manager starts each controller
using a separate service account.
Corresponding roles exist for each built-in controller, prefixed with `system:controller:`.
-If the controller manager is not started with `-use-service-account-credentials`, it runs all control loops
+If the controller manager is not started with `--use-service-account-credentials`, it runs all control loops
using its own credential, which must be granted all the relevant roles.
These roles include:
-->
@@ -1379,12 +1625,12 @@ These roles include:
Kubernetes {{< glossary_tooltip term_id="kube-controller-manager" text="控制器管理器" >}}
运行内建于 Kubernetes 控制面的{{< glossary_tooltip term_id="controller" text="控制器" >}}。
-当使用 `--use-service-account-credentials` 参数启动时, kube-controller-manager
+当使用 `--use-service-account-credentials` 参数启动时,kube-controller-manager
使用单独的服务账户来启动每个控制器。
每个内置控制器都有相应的、前缀为 `system:controller:` 的角色。
如果控制管理器启动时未设置 `--use-service-account-credentials`,
它使用自己的身份凭据来运行所有的控制器,该身份必须被授予所有相关的角色。
-这些角色包括:
+这些角色包括:
* `system:controller:attachdetach-controller`
* `system:controller:certificate-controller`
@@ -1415,12 +1661,12 @@ Kubernetes {{< glossary_tooltip term_id="kube-controller-manager" text="控制
* `system:controller:ttl-controller`
-## 初始化与预防权限提升
+## 初始化与预防权限提升 {#privilege-escalation-prevention-and-bootstrapping}
RBAC API 会阻止用户通过编辑角色或者角色绑定来提升权限。
由于这一点是在 API 级别实现的,所以在 RBAC 鉴权组件未启用的状态下依然可以正常工作。
@@ -1434,7 +1680,7 @@ You can only create/update a role if at least one of the following things is tru
(cluster-wide for a ClusterRole, within the same namespace or cluster-wide for a Role).
2. You are granted explicit permission to perform the `escalate` verb on the `roles` or `clusterroles` resource in the `rbac.authorization.k8s.io` API group.
-->
-### 对角色创建或更新的限制
+### 对角色创建或更新的限制 {#restrictions-on-role-creation-or-update}
只有在符合下列条件之一的情况下,你才能创建/更新角色:
@@ -1470,7 +1716,7 @@ You can only create/update a role binding if you already have all the permission
For example, if `user-1` does not have the ability to list Secrets cluster-wide, they cannot create a ClusterRoleBinding
to a role that grants that permission. To allow a user to create/update role bindings:
-->
-### 对角色绑定创建或更新的限制
+### 对角色绑定创建或更新的限制 {#restrictions-on-role-binding-creation-or-update}
只有你已经具有了所引用的角色中包含的全部权限时,或者你被授权在所引用的角色上执行 `bind`
动词时,你才可以创建或更新角色绑定。这里的权限与角色绑定的作用域相同。
@@ -1495,6 +1741,37 @@ For example, this ClusterRole and RoleBinding would allow `user-1` to grant othe
例如,下面的 ClusterRole 和 RoleBinding 将允许用户 `user-1` 把名字空间 `user-1-namespace`
中的 `admin`、`edit` 和 `view` 角色赋予其他用户:
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@@ -1529,33 +1806,32 @@ subjects:
When bootstrapping the first roles and role bindings, it is necessary for the initial user to grant permissions they do not yet have.
To bootstrap initial roles and role bindings:
-* Use a credential with the `system:masters` group, which is bound to the `cluster-admin` super-user role by the default bindings.
-* If your API server runs with the insecure port enabled (`-insecure-port`), you can also make API calls via that port, which does not enforce authentication or authorization.
+* Use a credential with the "system:masters" group, which is bound to the "cluster-admin" super-user role by the default bindings.
+* If your API server runs with the insecure port enabled (`--insecure-port`), you can also make API calls via that port, which does not enforce authentication or authorization.
-->
当启动引导第一个角色和角色绑定时,需要为初始用户授予他们尚未拥有的权限。
对初始角色和角色绑定进行初始化时需要:
* 使用用户组为 `system:masters` 的凭据,该用户组由默认绑定关联到 `cluster-admin`
这个超级用户角色。
-* 如果你的 API 服务器启动时启用了不安全端口(使用 `--insecure-port`), 你也可以通过
- 该端口调用 API ,这样的操作会绕过身份验证或鉴权。
+* 如果你的 API 服务器启动时启用了不安全端口(使用 `--insecure-port`),你也可以通过
+ 该端口调用 API,这样的操作会绕过身份验证或鉴权。
+## 一些命令行工具 {#command-line-utilities}
### `kubectl create role`
-Creates a `Role` object defining permissions within a single namespace. Examples:
+
-## 一些命令行工具
-
-### `kubectl create role`
-
创建 Role 对象,定义在某一名字空间中的权限。例如:
-* 创建名称为 "pod-reader" 的 Role 对象,允许用户对 Pods 执行 `get`、`watch` 和 `list` 操作:
+* 创建名称为 “pod-reader” 的 Role 对象,允许用户对 Pods 执行 `get`、`watch` 和 `list` 操作:
```shell
kubectl create role pod-reader --verb=get --verb=list --verb=watch --resource=pods
@@ -1564,16 +1840,16 @@ Creates a `Role` object defining permissions within a single namespace. Examples
-* 创建名称为 "pod-reader" 的 Role 对象并指定 `resourceNames`:
+* 创建名称为 “pod-reader” 的 Role 对象并指定 `resourceNames`:
```shell
kubectl create role pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod
```
-* 创建名为 "foo" 的 Role 对象并指定 `apiGroups`:
+* 创建名为 “foo” 的 Role 对象并指定 `apiGroups`:
```shell
kubectl create role foo --verb=get,list,watch --resource=replicasets.apps
@@ -1582,7 +1858,7 @@ Creates a `Role` object defining permissions within a single namespace. Examples
-* 创建名为 "foo" 的 Role 对象并指定子资源权限:
+* 创建名为 “foo” 的 Role 对象并指定子资源权限:
```shell
kubectl create role foo --verb=get,list,watch --resource=pods,pods/status
@@ -1591,7 +1867,7 @@ Creates a `Role` object defining permissions within a single namespace. Examples
-* 创建名为 "my-component-lease-holder" 的 Role 对象,使其具有对特定名称的
+* 创建名为 “my-component-lease-holder” 的 Role 对象,使其具有对特定名称的
资源执行 get/update 的权限:
```shell
@@ -1607,7 +1883,7 @@ Creates a ClusterRole. Examples:
-->
创建 ClusterRole 对象。例如:
-* 创建名称为 "pod-reader" 的 ClusterRole`对象,允许用户对 Pods 对象执行 `get`、
+* 创建名称为 “pod-reader” 的 ClusterRole 对象,允许用户对 Pods 对象执行 `get`、
`watch` 和 `list` 操作:
```shell
@@ -1617,7 +1893,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "pod-reader" 的 ClusterRole 对象并指定 `resourceNames`:
+* 创建名为 “pod-reader” 的 ClusterRole 对象并指定 `resourceNames`:
```shell
kubectl create clusterrole pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod
@@ -1626,7 +1902,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "foo" 的 ClusterRole 对象并指定 `apiGroups`:
+* 创建名为 “foo” 的 ClusterRole 对象并指定 `apiGroups`:
```shell
kubectl create clusterrole foo --verb=get,list,watch --resource=replicasets.apps
@@ -1635,7 +1911,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "foo" 的 ClusterRole 对象并指定子资源:
+* 创建名为 “foo” 的 ClusterRole 对象并指定子资源:
```shell
kubectl create clusterrole foo --verb=get,list,watch --resource=pods,pods/status
@@ -1644,7 +1920,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "foo" 的 ClusterRole 对象并指定 `nonResourceURL`:
+* 创建名为 “foo” 的 ClusterRole 对象并指定 `nonResourceURL`:
```shell
kubectl create clusterrole "foo" --verb=get --non-resource-url=/logs/*
@@ -1653,7 +1929,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "monitoring" 的 ClusterRole 对象并指定 `aggregationRule`:
+* 创建名为 “monitoring” 的 ClusterRole 对象并指定 `aggregationRule`:
```shell
kubectl create clusterrole monitoring --aggregation-rule="rbac.example.com/aggregate-to-monitoring=true"
@@ -1668,7 +1944,7 @@ Grants a Role or ClusterRole within a specific namespace. Examples:
-->
在特定的名字空间中对 `Role` 或 `ClusterRole` 授权。例如:
-* 在名字空间 "acme" 中,将名为 `admin` 的 ClusterRole 中的权限授予名称 "bob" 的用户:
+* 在名字空间 “acme” 中,将名为 `admin` 的 ClusterRole 中的权限授予名称 “bob” 的用户:
```shell
kubectl create rolebinding bob-admin-binding --clusterrole=admin --user=bob --namespace=acme
@@ -1677,7 +1953,7 @@ Grants a Role or ClusterRole within a specific namespace. Examples:
-* 在名字空间 "acme" 中,将名为 `view` 的 ClusterRole 中的权限授予名字空间 "acme"
+* 在名字空间 “acme” 中,将名为 `view` 的 ClusterRole 中的权限授予名字空间 “acme”
中名为 `myapp` 的服务账户:
```shell
@@ -1687,8 +1963,8 @@ Grants a Role or ClusterRole within a specific namespace. Examples:
-* 在名字空间 "acme" 中,将名为 `view` 的 ClusterRole 对象中的权限授予名字空间
- "myappnamespace" 中名称为 `myapp` 的服务账户:
+* 在名字空间 “acme” 中,将名为 `view` 的 ClusterRole 对象中的权限授予名字空间
+ “myappnamespace” 中名称为 `myapp` 的服务账户:
```shell
kubectl create rolebinding myappnamespace-myapp-view-binding --clusterrole=view --serviceaccount=myappnamespace:myapp --namespace=acme
@@ -1704,7 +1980,7 @@ Grants a ClusterRole across the entire cluster (all namespaces). Examples:
在整个集群(所有名字空间)中用 ClusterRole 授权。例如:
* 在整个集群范围,将名为 `cluster-admin` 的 ClusterRole 中定义的权限授予名为
- "root" 用户:
+ “root” 用户:
```shell
kubectl create clusterrolebinding root-cluster-admin-binding --clusterrole=cluster-admin --user=root
@@ -1714,7 +1990,7 @@ Grants a ClusterRole across the entire cluster (all namespaces). Examples:
* Across the entire cluster, grant the permissions in the "system:node-proxier" ClusterRole to a user named "system:kube-proxy":
-->
* 在整个集群范围内,将名为 `system:node-proxier` 的 ClusterRole 的权限授予名为
- "system:kube-proxy" 的用户:
+ “system:kube-proxy” 的用户:
```shell
kubectl create clusterrolebinding kube-proxy-binding --clusterrole=system:node-proxier --user=system:kube-proxy
@@ -1723,8 +1999,8 @@ Grants a ClusterRole across the entire cluster (all namespaces). Examples:
-* 在整个集群范围内,将名为 `view` 的 ClusterRole 中定义的权限授予 "acme" 名字空间中
- 名为 "myapp" 的服务账户:
+* 在整个集群范围内,将名为 `view` 的 ClusterRole 中定义的权限授予 “acme” 名字空间中
+ 名为 “myapp” 的服务账户:
```shell
kubectl create clusterrolebinding myapp-view-binding --clusterrole=view --serviceaccount=acme:myapp
@@ -1762,7 +2038,7 @@ Examples:
* 测试应用 RBAC 对象的清单文件,显示将要进行的更改:
```shell
- kubectl auth reconcile -f my-rbac-rules.yaml --dry-run
+ kubectl auth reconcile -f my-rbac-rules.yaml --dry-run=client
```
-* 应用 RBAC 对象的清单文件, 删除角色中的额外权限和绑定中的其他主体:
+* 应用 RBAC 对象的清单文件,删除角色中的额外权限和绑定中的其他主体:
```shell
kubectl auth reconcile -f my-rbac-rules.yaml --remove-extra-subjects --remove-extra-permissions
```
-查看 CLI 帮助获取详细的用法。
-
-
## 服务账户权限 {#service-account-permissions}
@@ -1805,9 +2077,9 @@ Broader grants can give unnecessary (and potentially escalating) API access to s
但是不会对 `kube-system` 名字空间之外的服务账户授予权限。
(除了授予所有已认证用户的发现权限)
-这使得你可以根据需要向特定服务账户授予特定权限。
+这使得你可以根据需要向特定 ServiceAccount 授予特定权限。
细粒度的角色绑定可带来更好的安全性,但需要更多精力管理。
-粗粒度的授权可能导致服务账户被授予不必要的 API 访问权限(甚至导致潜在的权限提升),
+粗粒度的授权可能导致 ServiceAccount 被授予不必要的 API 访问权限(甚至导致潜在的权限提升),
但更易于管理。
这要求应用在其 Pod 规约中指定 `serviceAccountName`,
- 并额外创建服务账户(包括通过 API、应用程序清单、`kubectl create serviceaccount` 等)。
+ 并额外创建服务账户(包括通过 API、应用程序清单、`kubectl create serviceaccount` 等)。
- 例如,在名字空间 "my-namespace" 中授予服务账户 "my-sa" 只读权限:
+ 例如,在名字空间 “my-namespace” 中授予服务账户 “my-sa” 只读权限:
```shell
kubectl create rolebinding my-sa-view \
@@ -1840,7 +2112,7 @@ In order from most secure to least secure, the approaches are:
-2. 将角色授予某名字空间中的 "default" 服务账户
+2. 将角色授予某名字空间中的 “default” 服务账户
- 如果某应用没有指定 `serviceAccountName`,那么它将使用 "default" 服务账户。
+ 如果某应用没有指定 `serviceAccountName`,那么它将使用 “default” 服务账户。
{{< note >}}
"default" 服务账户所具有的权限会被授予给名字空间中所有未指定
@@ -1874,20 +2146,20 @@ In order from most secure to least secure, the approaches are:
To allow those add-ons to run with super-user access, grant cluster-admin
permissions to the "default" service account in the `kube-system` namespace.
- {{< note >}}
+ {{< caution >}}
Enabling this means the `kube-system` namespace contains Secrets
- that grant super-user access to the API.
- {{< /note >}}
+ that grant super-user access to your cluster's API.
+ {{< /caution >}}
-->
- 许多[插件组件](/zh/docs/concepts/cluster-administration/addons/) 在 `kube-system`
- 名字空间以 "default" 服务账户运行。
+ 许多[插件组件](/zh/docs/concepts/cluster-administration/addons/)在 `kube-system`
+ 名字空间以 “default” 服务账户运行。
要允许这些插件组件以超级用户权限运行,需要将集群的 `cluster-admin` 权限授予
- `kube-system` 名字空间中的 "default" 服务账户。
+ `kube-system` 名字空间中的 “default” 服务账户。
- {{< note >}}
- 启用这一配置意味着在 `kube-system` 名字空间中包含以超级用户账号来访问 API
+ {{< caution >}}
+ 启用这一配置意味着在 `kube-system` 名字空间中包含以超级用户账号来访问集群 API
的 Secrets。
- {{< /note >}}
+ {{< /caution >}}
```shell
kubectl create clusterrolebinding add-on-cluster-admin \
@@ -1907,7 +2179,7 @@ In order from most secure to least secure, the approaches are:
如果你想要名字空间中所有应用都具有某角色,无论它们使用的什么服务账户,
可以将角色授予该名字空间的服务账户组。
- 例如,在名字空间 "my-namespace" 中的只读权限授予该名字空间中的所有服务账户:
+ 例如,在名字空间 “my-namespace” 中的只读权限授予该名字空间中的所有服务账户:
```shell
kubectl create rolebinding serviceaccounts-view \
@@ -1949,7 +2221,7 @@ In order from most secure to least secure, the approaches are:
-->
5. 授予超级用户访问权限给集群范围内的所有服务帐户(强烈不鼓励)
- 如果你不关心如何区分权限,你可以将超级用户访问权限授予所有服务账户。
+ 如果你不在乎如何区分权限,你可以将超级用户访问权限授予所有服务账户。
{{< warning >}}
这样做会允许所有应用都对你的集群拥有完全的访问权限,并将允许所有能够读取
@@ -1978,19 +2250,16 @@ guidance for restricting this access in existing clusters.
If you want new clusters to retain this level of access in the aggregated roles,
you can create the following ClusterRole:
-
-{{< codenew file="access/endpoints-aggregated.yaml" >}}
-->
## Endpoints 写权限 {#write-access-for-endpoints}
在 Kubernetes v1.22 之前版本创建的集群里,
-"edit" 和 "admin" 聚合角色包含对 Endpoints 的写权限。
+“edit” 和 “admin” 聚合角色包含对 Endpoints 的写权限。
作为 [CVE-2021-25740](https://github.com/kubernetes/kubernetes/issues/103675) 的缓解措施,
此访问权限不包含在 Kubernetes 1.22 以及更高版本集群的聚合角色里。
升级到 Kubernetes v1.22 版本的现有集群不会包括此变化。
-[CVE 公告](https://github.com/kubernetes/kubernetes/issues/103675)
-包含了在现有集群里限制此访问权限的指引。
+[CVE 公告](https://github.com/kubernetes/kubernetes/issues/103675)包含了在现有集群里限制此访问权限的指引。
如果你希望在新集群的聚合角色里保留此访问权限,你可以创建下面的 ClusterRole:
@@ -2010,7 +2279,7 @@ and controllers, but grant *no permissions* to service accounts outside the `kub
While far more secure, this can be disruptive to existing workloads expecting to automatically receive API permissions.
Here are two approaches for managing this transition:
-->
-## 从 ABAC 升级
+## 从 ABAC 升级 {#upgrading-from-abac}
原来运行较老版本 Kubernetes 的集群通常会使用限制宽松的 ABAC 策略,
包括授予所有服务帐户全权访问 API 的能力。
@@ -2023,19 +2292,19 @@ Here are two approaches for managing this transition:
这里有两种方法来完成这种转换:
### 并行鉴权 {#parallel-authorizers}
-同时运行 RBAC 和 ABAC 鉴权模式, 并指定包含
+同时运行 RBAC 和 ABAC 鉴权模式,并指定包含
[现有的 ABAC 策略](/zh/docs/reference/access-authn-authz/abac/#policy-file-format)
的策略文件:
```shell
---authorization-mode=RBAC,ABAC --authorization-policy-file=mypolicy.json
+--authorization-mode=...,RBAC,ABAC --authorization-policy-file=mypolicy.json
```
-如果 API 服务器启动时,RBAC 组件的日志级别为 5 或更高(`--vmodule=rbac*=5` 或 `--v=5`),
-你可以在 API 服务器的日志中看到 RBAC 的细节 (前缀 `RBAC:`)
+如果 kube-apiserver 启动时,RBAC 组件的日志级别为 5 或更高(`--vmodule=rbac*=5` 或 `--v=5`),
+你可以在 API 服务器的日志中看到 RBAC 拒绝的细节(前缀 `RBAC`)
你可以使用这些信息来确定需要将哪些角色授予哪些用户、组或服务帐户。
-一旦你[将角色授予服务账户](#service-account-permissions) ,工作负载运行时
-在服务器日志中没有出现 RBAC 拒绝消息,就可以删除 ABAC 鉴权器。
+一旦你[将角色授予服务账户](#service-account-permissions)且工作负载运行时,
+服务器日志中没有出现 RBAC 拒绝消息,就可以删除 ABAC 鉴权器。
### 宽松的 RBAC 权限 {#permissive-rbac-permissions}
-你可以使用 RBAC 角色绑定在多个场合使用宽松的策略。
+你可以使用 RBAC 角色绑定复制宽松的 ABAC 策略。
{{< warning >}}
在你完成到 RBAC 的迁移后,应该调整集群的访问控制,确保相关的策略满足你的信息安全需求。
-
diff --git a/content/zh/docs/reference/access-authn-authz/webhook.md b/content/zh/docs/reference/access-authn-authz/webhook.md
index 0ef1e6a18d..29032a7353 100644
--- a/content/zh/docs/reference/access-authn-authz/webhook.md
+++ b/content/zh/docs/reference/access-authn-authz/webhook.md
@@ -1,15 +1,9 @@
---
-reviewers:
-- erictune
-- lavalamp
-- deads2k
-- liggitt
title: Webhook 模式
content_type: concept
weight: 95
---
@@ -38,7 +31,7 @@ service when determining user privileges.
-## 配置文件格式
+## 配置文件格式 {#configuration-file-format}
-配置文件的格式使用 [kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)。在文件中,"users" 代表着 API 服务器的 webhook,而 "cluster" 代表着远程服务。
+配置文件的格式使用 [kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)。
+在该文件中,“users” 代表着 API 服务器的 webhook,而 “cluster” 代表着远程服务。
-## 请求载荷
+## 请求载荷 {#request-payloads}
-在做认证决策时,API 服务器会 POST 一个 JSON 序列化的 `authorization.k8s.io/v1beta1` `SubjectAccessReview` 对象来描述这个动作。这个对象包含了描述用户请求的字段,同时也包含了需要被访问资源或请求特征的具体信息。
+在做认证决策时,API 服务器会 POST 一个 JSON 序列化的 `authorization.k8s.io/v1beta1` `SubjectAccessReview`
+对象来描述这个动作。这个对象包含了描述用户请求的字段,同时也包含了需要被访问资源或请求特征的具体信息。
-需要注意的是 webhook API 对象与其他 Kubernetes API 对象一样都同样都服从[版本兼容规则](/zh/docs/concepts/overview/kubernetes-api/)。实施人员应该了解 beta 对象的更宽松的兼容性承诺,同时确认请求的 "apiVersion" 字段能被正确地反序列化。此外,API 服务器还必须启用 `authorization.k8s.io/v1beta1` API 扩展组 (`--runtime-config=authorization.k8s.io/v1beta1=true`)。
+需要注意的是 webhook API 对象与其他 Kubernetes API 对象一样都同样都遵从[版本兼容规则](/zh/docs/concepts/overview/kubernetes-api/)。
+实施人员应该了解 beta 对象的更宽松的兼容性承诺,同时确认请求的 "apiVersion" 字段能被正确地反序列化。
+此外,API 服务器还必须启用 `authorization.k8s.io/v1beta1` API 扩展组 (`--runtime-config=authorization.k8s.io/v1beta1=true`)。
期待远程服务填充请求的 `status` 字段并响应允许或禁止访问。响应主体的 `spec` 字段被忽略,可以省略。允许的响应将返回:
+
```json
{
"apiVersion": "authorization.k8s.io/v1beta1",
@@ -195,7 +193,8 @@ authorizers are configured, they are given a chance to allow the request.
If there are no other authorizers, or none of them allow the request, the
request is forbidden. The webhook would return:
-->
-在大多数情况下,第一种方法是首选方法,它指示授权 webhook 不允许或对请求"无意见",但是,如果配置了其他授权者,则可以给他们机会允许请求。如果没有其他授权者,或者没有一个授权者,则该请求被禁止。webhook 将返回:
+在大多数情况下,第一种方法是首选方法,它指示授权 webhook 不允许或对请求 “无意见”。
+但是,如果配置了其他授权者,则可以给他们机会允许请求。如果没有其他授权者,或者没有一个授权者,则该请求被禁止。webhook 将返回:
```json
{
@@ -214,7 +213,7 @@ configured authorizers. This should only be used by webhooks that have
detailed knowledge of the full authorizer configuration of the cluster.
The webhook would return:
-->
-第二种方法立即拒绝其他配置的授权者进行短路评估。仅应由对集群的完整授权者配置有详细了解的 webhook 使用。webhook 将返回:
+第二种方法立即拒绝其他配置的授权者进行短路评估。仅应由对集群的完整授权者配置有详细了解的 webhook 使用。webhook 将返回:
```json
{
@@ -252,16 +251,16 @@ Access to non-resource paths are sent as:
```
-非资源类的路径包括:`/api`, `/apis`, `/metrics`, `/resetMetrics`,
-`/logs`, `/debug`, `/healthz`, `/swagger-ui/`, `/swaggerapi/`, `/ui`, 和
-`/version`。客户端需要访问 `/api`, `/api/*`, `/apis`, `/apis/*`, 和 `/version` 以便
+非资源类的路径包括:`/api`、`/apis`、`/metrics`、`/logs`、`/debug`、
+`/healthz`、`/livez`、`/openapi/v2`、`/readyz`、和 `/version`。
+客户端需要访问 `/api`、`/api/*`、`/apis`、`/apis/*` 和 `/version` 以便
能发现服务器上有什么资源和版本。对于其他非资源类的路径访问在没有 REST API 访问限制的情况下拒绝。
- `CSIVolumeFSGroupPolicy`:允许 CSIDrivers 使用 `fsGroupPolicy` 字段.
该字段能控制由 CSIDriver 创建的卷在挂载这些卷时是否支持卷所有权和权限修改。
@@ -1003,10 +1044,13 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `ConfigurableFSGroupPolicy`:在 Pod 中挂载卷时,允许用户为 fsGroup
配置卷访问权限和属主变更策略。请参见
[为 Pod 配置卷访问权限和属主变更策略](/zh/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods)。
+- `ContextualLogging`:当你启用这个特性门控,支持日志上下文记录的 Kubernetes
+ 组件会为日志输出添加额外的详细内容。
- `ControllerManagerLeaderMigration`:为 `kube-controller-manager` 和 `cloud-controller-manager`
开启领导者迁移功能。
- `CronJobControllerV2`:使用 {{< glossary_tooltip text="CronJob" term_id="cronjob" >}}
控制器的一种替代实现。否则,系统会选择同一控制器的 v1 版本。
+- `CronJobTimeZone`:允许在 [CronJobs](/zh/docs/concepts/workloads/controllers/cron-jobs/) 中使用 `timeZone` 可选字段。
-- `DynamicKubeletConfig`:启用 kubelet 的动态配置。请参阅
- [重新配置 kubelet](/zh/docs/tasks/administer-cluster/reconfigure-kubelet/)。
+- `DynamicKubeletConfig`:启用 kubelet 的动态配置。
+ 除偏差策略场景外,不再支持该功能。该特性门控在 kubelet 1.24 版本中已被移除。
+ 请参阅[重新配置 kubelet](/zh/docs/tasks/administer-cluster/reconfigure-kubelet/)。
- `DynamicProvisioningScheduling`:扩展默认调度器以了解卷拓扑并处理 PV 配置。
此特性已在 v1.12 中完全被 `VolumeScheduling` 特性取代。
- `DynamicVolumeProvisioning`:启用持久化卷到 Pod
@@ -1221,6 +1267,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
when shutting down a node gracefully.
- `GRPCContainerProbe`: Enables the gRPC probe method for {Liveness,Readiness,Startup}Probe. See [Configure Liveness, Readiness and Startup Probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-grpc-liveness-probe).
- `HonorPVReclaimPolicy`: Honor persistent volume reclaim policy when it is `Delete` irrespective of PV-PVC deletion ordering.
+For more details, check the
+ [PersistentVolume deletion protection finalizer](/docs/concepts/storage/persistent-volumes/#persistentvolume-deletion-protection-finalizer)
+ documentation.
-->
- `GracefulNodeShutdownBasedOnPodPriority`:允许 kubelet 在体面终止节点时检查
Pod 的优先级。
@@ -1228,6 +1277,7 @@ Each feature gate is designed for enabling/disabling a specific feature:
参阅[配置活跃态、就绪态和启动探针](/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-grpc-liveness-probe)。
- `HonorPVReclaimPolicy`:无论 PV 和 PVC 的删除顺序如何,当持久卷申领的策略为 `Delete`
时,确保这种策略得到处理。
+ 更多详细信息,请参阅 [PersistentVolume 删除保护 finalizer](/zh/docs/concepts/storage/persistent-volumes/#persistentvolume-deletion-protection-finalizer)文档。
- `KubeletPodResources`:启用 kubelet 上 Pod 资源 GRPC 端点。更多详细信息,
请参见[支持设备监控](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/compute-device-assignment.md)。
@@ -1370,6 +1422,8 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `LegacyNodeRoleBehavior`:禁用此门控时,服务负载均衡器中和节点干扰中的原先行为会忽略
`node-role.kubernetes.io/master` 标签,使用 `NodeDisruptionExclusion` 和
`ServiceNodeExclusion` 对应特性所提供的标签。
+- `LegacyServiceAccountTokenNoAutoGeneration`:停止基于 Secret 的自动生成
+ [服务账号令牌](/zh/docs/reference/access-authn-authz/authentication/#service-account-tokens).
- `LogarithmicScaleDown`:启用 Pod 的半随机(semi-random)选择,控制器将根据 Pod
时间戳的对数桶按比例缩小去驱逐 Pod。
-- `MemoryManager`: 允许基于 NUMA 拓扑为容器设置内存亲和性。
-- `MemoryQoS`: 使用 cgroup v2 内存控制器在 pod / 容器上启用内存保护和使用限制。
+- `MaxUnavailableStatefulSet`:启用为 StatefulSet
+ 的[滚动更新策略](/zh/docs/concepts/workloads/controllers/statefulset/#rolling-updates)设置
+ `maxUnavailable` 字段。该字段指定更新过程中不可用 Pod 个数的上限。
+- `MemoryManager`:允许基于 NUMA 拓扑为容器设置内存亲和性。
+- `MemoryQoS`:使用 cgroup v2 内存控制器在 pod / 容器上启用内存保护和使用限制。
+- `MinDomainsInPodTopologySpread`:启用 Pod 的 `minDomains`
+ [拓扑分布约束](/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
- `MixedProtocolLBService`:允许在同一 `LoadBalancer` 类型的 Service 实例中使用不同的协议。
- `MountContainers`:允许使用主机上的工具容器作为卷挂载程序。
+- `NodeOutOfServiceVolumeDetach`:当使用 `node.kubernetes.io/out-of-service`
+ 污点将节点标记为停止服务时,节点上不能容忍这个污点的 Pod 将被强制删除,
+ 并且该在节点上被终止的 Pod 将立即进行卷分离操作。
- `NodeSwap`: 启用 kubelet 为节点上的 Kubernetes 工作负载分配交换内存的能力。
必须将 `KubeletConfiguration.failSwapOn` 设置为 false 的情况下才能使用。
更多详细信息,请参见[交换内存](/zh/docs/concepts/architecture/nodes/#swap-memory)。
@@ -1524,8 +1600,10 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `RemainingItemCount`: Allow the API servers to show a count of remaining
items in the response to a
[chunking list request](/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks).
-- `RemoveSelfLink`: Deprecates and removes `selfLink` from ObjectMeta and
- ListMeta.
+- `RemoveSelfLink`: Sets the `.metadata.selfLink` field to blank (empty string) for all
+ objects and collections. This field has been deprecated since the Kubernetes v1.16
+ release. When this feature is enabled, the `.metadata.selfLink` field remains part of
+ the Kubernetes API, but is always unset.
- `RequestManagement`: Enables managing request concurrency with prioritization and fairness
at each API server. Deprecated by `APIPriorityAndFairness` since 1.17.
-->
@@ -1535,7 +1613,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `RemainingItemCount`:允许 API 服务器在
[分块列表请求](/zh/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks)
的响应中显示剩余条目的个数。
-- `RemoveSelfLink`:将 ObjectMeta 和 ListMeta 中的 `selfLink` 字段废弃并删除。
+- `RemoveSelfLink`:将所有对象和集合的 `.metadata.selfLink` 字段设置为空(空字符串)。
+ 该字段自 Kubernetes v1.16 版本以来已被弃用。
+ 启用此功能后,`.metadata.selfLink` 字段仍然是 Kubernetes API 的一部分,但始终未设置。
- `RequestManagement`:允许在每个 API 服务器上通过优先级和公平性管理请求并发性。
自 1.17 以来已被 `APIPriorityAndFairness` 替代。
- `ServiceLoadBalancerClass`: 为服务启用 `loadBalancerClass` 字段。
有关更多信息,请参见[指定负载均衡器实现类](/zh/docs/concepts/services-networking/service/#load-balancer-class)。
@@ -1636,6 +1722,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
标签,则可以排除该节点。
- `ServiceTopology`:启用服务拓扑可以让一个服务基于集群的节点拓扑进行流量路由。
有关更多详细信息,请参见[服务拓扑](/zh/docs/concepts/services-networking/service-topology/)。
+- `ServiceIPStaticSubrange`:启用服务 ClusterIP 分配策略,从而细分 ClusterIP 范围。
+ 动态分配的 ClusterIP 地址将优先从较高范围分配,以低冲突风险允许用户从较低范围分配静态 ClusterIP。
+ 更多详细信息请参阅[避免冲突](/zh/docs/concepts/services-networking/service/#avoiding-collisions)
* Kubernetes 的[弃用策略](/zh/docs/reference/using-api/deprecation-policy/)
介绍了项目针对已移除特性和组件的处理方法。
-
+* 从 Kubernetes 1.24 开始,默认不启用新的 beta API。
+ 启用 beta 功能时,还需要启用所有关联的 API 资源。
+ 例如:要启用一个特定资源,如 `storage.k8s.io/v1beta1/csistoragecapacities`,
+ 请设置 `--runtime-config=storage.k8s.io/v1beta1/csistoragecapacities`。
+ 有关命令行标志的更多详细信息,请参阅 [API 版本控制](/zh/docs/reference/using-api/#api-versioning)。
diff --git a/content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md b/content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md
index ec1b496b42..26bef87ba7 100644
--- a/content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md
+++ b/content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md
@@ -84,7 +84,7 @@ the host's default interface will be used.
The map from metric-label to value allow-list of this label. The key's format is <MetricName>,<LabelName>. The value's format is <allowed_value>,<allowed_value>...e.g. metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'.
-->
允许使用的指标标签到指标值的映射列表。键的格式为 <MetricName>,<LabelName>.
-值的格式为 <allowed_value>,<allowed_value>...。
+值的格式为 <allowed_value>,<allowed_value>...。
例如:metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'。
@@ -97,7 +97,7 @@ The map from metric-label to value allow-list of this label. The key's format is
-如果为 true, 将允许特权容器。[默认值=false]
+如果为 true,将允许特权容器。[默认值=false]
@@ -131,8 +131,8 @@ of these audiences. If the --service-account-issuer flag is configured
and this flag is not, this field defaults to a single element list
containing the issuer URL.
-->
-API 的标识符。
-服务帐户令牌验证者将验证针对 API 使用的令牌是否已绑定到这些受众中的至少一个。
+API 的标识符。
+服务帐户令牌验证者将验证针对 API 使用的令牌是否已绑定到这些受众中的至少一个。
如果配置了 --service-account-issuer 标志,但未配置此标志,
则此字段默认为包含发布者 URL 的单个元素列表。
@@ -799,7 +799,7 @@ CORS 允许的来源清单,以逗号分隔。
-对污点 NotReady:NoExecute 的容忍时长(以秒计)。
+对污点 NotReady:NoExecute 的容忍时长(以秒计)。
默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
@@ -833,7 +833,7 @@ that do not have a default watch size set.
-
--delete-collection-workers int 默认值: 1
+
--delete-collection-workers int 默认值:1
@@ -1363,10 +1363,10 @@ Max is .02 (1/50 requests); .001 (1/1000) is a recommended starting point.
-->
为防止 HTTP/2 客户端卡在单个 API 服务器上,可启用随机关闭连接(GOAWAY)。
客户端的其他运行中请求将不会受到影响,并且客户端将重新连接,
-可能会在再次通过负载平衡器后登陆到其他 API 服务器上。
-此参数设置将发送 GOAWAY 的请求的比例。
-具有单个 API 服务器或不使用负载平衡器的群集不应启用此功能。
-最小值为0(关闭),最大值为 .02(1/50 请求); 建议使用 .001(1/1000)。
+可能会在再次通过负载平衡器后登陆到其他 API 服务器上。
+此参数设置将发送 GOAWAY 的请求的比例。
+具有单个 API 服务器或不使用负载平衡器的集群不应启用此功能。
+最小值为0(关闭),最大值为 .02(1/50 请求);建议使用 .001(1/1000)。
@@ -1847,7 +1847,7 @@ open before timing it out. This is the default request timeout for
requests but may be overridden by flags such as --min-request-timeout
for specific types of requests.
-->
-可选字段,指示处理程序在超时之前必须保持打开请求的持续时间。
+可选字段,指示处理程序在超时之前必须保持打开请求的持续时间。
这是请求的默认请求超时,但对于特定类型的请求,可能会被
--min-request-timeout等标志覆盖。
@@ -2004,9 +2004,9 @@ and all are used to determine which issuers are accepted.
颁发者将在已办法令牌的 "iss" 声明中检查此标识符。
此值为字符串或 URI。
如果根据 OpenID Discovery 1.0 规范检查此选项不是有效的 URI,则即使特性门控设置为 true,
-ServiceAccountIssuerDiscovery 功能也将保持禁用状态。
-强烈建议该值符合 OpenID 规范:https://openid.net/specs/openid-connect-discovery-1_0.html。
-实践中,这意味着 service-account-issuer 取值必须是 HTTPS URL。
+ServiceAccountIssuerDiscovery 功能也将保持禁用状态。
+强烈建议该值符合 OpenID 规范: https://openid.net/specs/openid-connect-discovery-1_0.html 。
+实践中,这意味着 service-account-issuer 取值必须是 HTTPS URL。
还强烈建议此 URL 能够在 {service-account-issuer}/.well-known/openid-configuration
处提供 OpenID 发现文档。
当此值被多次指定时,第一次的值用于生成令牌,所有的值用于确定接受哪些发行人。
@@ -2209,7 +2209,7 @@ List of directives for HSTS, comma separated. If this list is empty, then HSTS d
-->
为 HSTS 所设置的指令列表,用逗号分隔。
如果此列表为空,则不会添加 HSTS 指令。
-例如: 'max-age=31536000,includeSubDomains,preload'
+例如:'max-age=31536000,includeSubDomains,preload'
@@ -2280,7 +2280,7 @@ File containing the default x509 private key matching --tls-cert-file.
@@ -1637,7 +1533,7 @@ If true, SO_REUSEADDR will be used when binding the port. This allows binding to
If true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. [default=false]
-->
如果为 true,则在绑定端口时将使用 SO_REUSEPORT,
-这允许多个实例在同一地址和端口上进行绑定。
+这允许多个实例在同一地址和端口上进行绑定。[默认值=false]。
@@ -1722,7 +1618,7 @@ The file path to a pod definition used as a template for HostPath persistent vol
对 NFS 卷执行回收利用时,用作模版的 Pod 定义文件所在路径。
@@ -1759,7 +1655,8 @@ The period for syncing persistent volumes and persistent volume claims
+List of client certificate common names to allow to provide usernames in headers specified by --requestheader-username-headers. If empty, any client certificate validated by the authorities in --requestheader-client-ca-file is allowed.
+-->
标志值是客户端证书中的 Common Names 列表。其中所列的名称可以通过
--requestheader-username-headers 所设置的 HTTP 头部来提供用户名。
如果此标志值为空表,则被 --requestheader-client-ca-file
@@ -1921,42 +1818,6 @@ The previous version for which you want to show hidden metrics. Only the previou
-
-
--skip-headers
-
-
-
-
-若此标志为 true,则在日志消息中避免写入头部前缀信息。
-
-
-
-
-
--skip-log-headers
-
-
-
-
-若此标志为 true,则在写入日志文件时避免写入头部信息。
-
-
-
-
-
--stderrthreshold severity 默认值:2
-
-
-
-
-等于或大于此阈值的日志信息会被写入到标准错误输出(stderr)。
-
-
-
--terminated-pod-gc-threshold int32 默认值:12500
@@ -1992,11 +1853,11 @@ File containing the default x509 Certificate for HTTPS. (CA cert, if any, concat
集群中 Pod 的 CIDR 范围。配置后,将从该范围之外发送到服务集群 IP
-的流量被伪装,从 Pod 发送到外部 LoadBalancer IP 的流量将被重定向
-到相应的集群 IP。
+的流量被伪装,从 Pod 发送到外部 LoadBalancer IP
+的流量将被重定向到相应的集群 IP。
+对于双协议栈集群,接受一个逗号分隔的列表,
+每个 IP 协议族(IPv4 和 IPv6)至少包含一个 CIDR。
+如果配置文件由 --config 指定,则忽略此参数。
@@ -238,13 +242,42 @@ Idle timeout for established TCP connections (0 to leave as-is)
+
+
--default-not-ready-toleration-seconds int 默认值:300
+
+
+
+
+对污点 NotReady:NoExecute 的容忍时长(以秒计)。
+默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
+
+
+
+
+
--default-unreachable-toleration-seconds int 默认值:300
+
+
+
+
+对污点 Unreachable:NoExecute 的容忍时长(以秒计)
+默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
+
@@ -168,7 +119,7 @@ If true, failures to look up missing authentication configuration from the clust
-在授权过程中跳过的 HTTP 路径列表,即在不联系 'core' kubernetes 服务器的情况下被授权的 HTTP 路径。
+在授权过程中跳过的 HTTP 路径列表,即在不联系 “core” kubernetes 服务器的情况下被授权的 HTTP 路径。
@@ -194,7 +145,7 @@ Kubernetes 核心服务器的 kubeconfig 文件。这是可选的。
-缓存来自 Webhook 授权者的 'authorized' 响应的持续时间。
+缓存来自 Webhook 授权者的 “authorized” 响应的持续时间。
@@ -206,7 +157,7 @@ The duration to cache 'authorized' responses from the webhook authorizer.
-缓存来自 Webhook 授权者的 'unauthorized' 响应的持续时间。
+缓存来自 Webhook 授权者的 “unauthorized” 响应的持续时间。
@@ -232,7 +183,7 @@ The IP address on which to listen for the --secure-port port. The associated int
-->
监听 --secure-port 端口的 IP 地址。
集群的其余部分以及 CLI/ Web 客户端必须可以访问关联的接口。
-如果为空,将使用所有接口(0.0.0.0 表示使用所有 IPv4 接口,"::" 表示使用所有 IPv6 接口)。
+如果为空,将使用所有接口(0.0.0.0 表示使用所有 IPv4 接口,“::” 表示使用所有 IPv6 接口)。
如果为空或未指定地址 (0.0.0.0 或 ::),所有接口将被使用。
@@ -269,22 +220,14 @@ If set, any request presenting a client certificate signed by one of the authori
@@ -845,18 +716,6 @@ Kubernetes API 服务器的地址(覆盖 kubeconfig 中的任何值)。
-
-
--one-output
-
-
-
-
-若此标志为 true,则日志仅写入其自身的严重性级别,而不会写入所有较低严重性级别。
-
-
-
--permit-address-sharing
@@ -868,7 +727,7 @@ If true, SO_REUSEADDR will be used when binding the port. This allows binding to
如果为 true,在绑定端口时将使用 SO_REUSEADDR。
这将允许同时绑定诸如 0.0.0.0 这类通配符 IP和特定 IP,
并且它避免等待内核释放处于 TIME_WAIT 状态的套接字。
-默认值: false
+默认值:false
@@ -881,69 +740,30 @@ If true, SO_REUSEADDR will be used when binding the port. This allows binding to
If true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. [default=false]
-->
如果此标志为 true,在绑定端口时会使用 SO_REUSEPORT,从而允许不止一个
-实例绑定到同一地址和端口。
+实例绑定到同一地址和端口。
默认值:false
@@ -1235,7 +992,7 @@ comma-separated list of pattern=N settings for file-filtered logging
-如果已设置,将配置值写入此文件并退出。
+如果设置此参数,将配置值写入此文件并退出。
@@ -1244,5 +1001,3 @@ If set, write the configuration values to this file and exit.
-
-
diff --git a/content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md b/content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md
index f34da9f473..bc37e362a7 100644
--- a/content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md
+++ b/content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md
@@ -292,7 +292,7 @@ https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。
criSocket:"/var/run/dockershim.sock"taints:- key:"kubeadmNode"
-value:"master"
+value:"someValue"effect:"NoSchedule"kubeletExtraArgs:v:4
@@ -1274,9 +1274,10 @@ cluster information.
tlsBootstrapToken 是 TLS 启动引导过程中使用的令牌。
如果设置了 bootstrapToken,则此字段默认值为 .bootstrapToken.token,
@@ -1783,29 +1784,28 @@ Defaults to the hostname of the node if not provided.
criSocket 用来读取容器运行时的信息。
-此信息会被以注解的方式添加到 Node API 对象至上,用于后续用途。
-
+If this field is unset, i.e. nil, in the kubeadm init 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, i.e. taints: [], in the YAML file. This field is
+solely used for Node registration.
+-->
kubeletExtraArgs[必需]
diff --git a/content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md b/content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md
index 2a53c835db..ef491a424e 100644
--- a/content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md
+++ b/content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md
@@ -313,7 +313,7 @@ https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。
criSocket:"/var/run/dockershim.sock"taints:- key:"kubeadmNode"
-value:"master"
+value:"someValue"effect:"NoSchedule"kubeletExtraArgs:v:4
@@ -1655,15 +1655,17 @@ This information will be annotated to the Node API object, for later re-use[]core/v1.Taint
@@ -218,16 +201,11 @@ Default: 10250
no authentication/authorization.
The port number must be between 1 and 65535, inclusive.
Setting this field to 0 disables the read-only service.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may disrupt components that interact with the Kubelet server.
Default: 0 (disabled)
-->
@@ -241,17 +219,12 @@ if any, concatenated after server cert). If tlsCertFile and
tlsPrivateKeyFile are not provided, a self-signed certificate
and key are generated for the public address and saved to the directory
passed to the Kubelet's --cert-dir flag.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may disrupt components that interact with the Kubelet server.
Default:"quot;
-->
默认值:false
@@ -343,20 +294,12 @@ signing a serving certificate, the Kubelet will request a certificate from
the 'certificates.k8s.io' API. This requires an approver to approve the
certificate signing requests (CSR). The RotateKubeletServerCertificate feature
must be enabled when setting this field.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-disabling it will stop the renewal of Kubelet server certificates, which can
-disrupt components that interact with the Kubelet server in the long term,
-due to certificate expiration.
Default: false
-->
serverTLSBootstrap用来启用服务器证书引导。系统不再使用自签名的服务证书,
kubelet 会调用certificates.k8s.io API 来请求证书。
需要有一个批复人来批准证书签名请求(CSR)。
设置此字段时,RotateKubeletServerCertificate特性必须被启用。
默认值:5
@@ -446,17 +373,11 @@ Default: 5
pulls to burst to this number, while still not exceeding registryPullQPS.
The value must not be a negative number.
Only used if registryPullQPS is greater than 0.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may impact scalability by changing the amount of traffic produced
-by image pulls.
Default: 10
-->
@@ -769,19 +618,12 @@ image garbage collection is always run. The percent is calculated by
dividing this field value by 100, so this field must be between 0 and
100, inclusive. When specified, the value must be greater than
imageGCLowThresholdPercent.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may trigger or delay garbage collection, and may change the image overhead
-on the node.
Default: 85
-->
@@ -795,37 +637,25 @@ image garbage collection is never run. Lowest disk usage to garbage
collect to. The percent is calculated by dividing this field value by 100,
so the field value must be between 0 and 100, inclusive. When specified, the
value must be less than imageGCHighThresholdPercent.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may trigger or delay garbage collection, and may change the image overhead
-on the node.
Default: 80
-->
@@ -854,15 +680,11 @@ Default: ""
all non-kernel processes that are not already in a container. Empty
for no container. Rolling back the flag requires a reboot.
The cgroupRoot must be specified if this field is not empty.
-Dynamic Kubelet Config (deprecated): This field should not be updated without a full node
-reboot. It is safest to keep this value the same as the local config.
Default: "&qout;
-->
@@ -1016,8 +806,6 @@ resources;
of CPU and device resources.
Policies other than "none" require the TopologyManager feature gate to be enabled.
-Dynamic Kubelet Config (deprecated): This field should not be updated without a full node
-reboot. It is safest to keep this value the same as the local config.
Default: "none"
-->
topologyManagerPolicy是要使用的拓扑管理器策略名称。合法值包括:
@@ -1028,8 +816,6 @@ Default: "none"
single-numa-node:kubelet 仅允许在 CPU 和设备资源上对齐到同一 NUMA 节点的 Pod。
@@ -1068,34 +854,25 @@ the minimum percentage of a resource reserved for exclusive use by the
guaranteed QoS tier.
Currently supported resources: "memory"
Requires the QOSReserved feature gate to be enabled.
-Dynamic Kubelet Config (deprecated): This field should not be updated without a full node
-reboot. It is safest to keep this value the same as the local config.
Default: nil
-->
kubeAPIQPS设置与 Kubernetes API 服务器通信时要使用的 QPS(每秒查询数)。
-
当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能因为 kubelet 与 API 服务器之间流量的变化而影响集群扩缩能力。
默认值:5
@@ -1357,16 +1065,10 @@ Default: 5
kubeAPIBurst设置与 Kubernetes API 服务器通信时突发的流量级别。
此字段取值不可以是负数。
-
当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能因为 kubelet 与 API 服务器之间流量的变化而影响集群扩缩能力。
默认值:10
@@ -1379,16 +1081,11 @@ Default: 10
at a time. We recommend ∗not∗ changing the default value on nodes that
run docker daemon with version < 1.9 or an Aufs storage backend.
Issue #10959 has more details.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may impact the performance of image pulls.
Default: true
-->
@@ -1493,10 +1168,6 @@ effectively caps the Pod's terminationGracePeriodSeconds value during soft evict
Note: Due to issue #64530, the behavior has a bug where this value currently just
overrides the grace period during soft eviction, which can increase the grace
period from what is set on the Pod. This bug will be fixed in a future release.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-lowering it decreases the amount of time Pods will have to gracefully clean
-up before being killed during a soft eviction.
Default: 0
-->
evictionMaxPodGracePeriod是指达到软性逐出阈值而引起 Pod 终止时,
@@ -1505,9 +1176,6 @@ Pod 可以获得的terminationGracePeriodSeconds。
注意:由于 Issue #64530 的原因,系统中存在一个缺陷,即此处所设置的值会在软性逐出时覆盖
Pod 的宽限期设置,从而有可能增加 Pod 上原本设置的宽限期限时长。
这个缺陷会在未来版本中修复。
-
当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短此宽限期限值会导致软性逐出期间 Pod
-在被杀死之前用来体面地完成清理工作可用的时间。
默认值:0
@@ -1520,16 +1188,11 @@ Pod 的宽限期设置,从而有可能增加 Pod 上原本设置的宽限期
which describe the minimum amount of a given resource the kubelet will reclaim when
performing a pod eviction while that resource is under pressure.
For example: {"imagefs.available": "2Gi"}.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may change how well eviction can manage resource pressure.
Default: nil
-->
evictionMinimumReclaim是一个映射,定义信号名称与最小回收量数值之间的关系。
最小回收量指的是资源压力较大而执行 Pod 驱逐操作时,kubelet 对给定资源的最小回收量。
例如:{"imagefs.available": "2Gi"}。
@@ -1619,18 +1256,12 @@ kubelet 进入崩溃循环(Crash-Loop)状态。
are present on host.
These rules will serve as utility rules for various components, e.g. kube-proxy.
The rules will be created based on iptablesMasqueradeBit and iptablesDropBit.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-disabling it will prevent the Kubelet from healing locally misconfigured iptables rules.
Default: true
-->
@@ -1643,18 +1274,11 @@ Default: true
Values must be within the range [0, 31]. Must be different from other mark bits.
Warning: Please match the value of the corresponding parameter in kube-proxy.
TODO: clean up IPTablesMasqueradeBit in kube-proxy.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it needs to be coordinated with other components, like kube-proxy, and the update
-will only be effective if MakeIPTablesUtilChains is enabled.
Default: 14
-->
@@ -1803,20 +1395,11 @@ managers are running. Valid values include:
pairs that describe resources reserved for non-kubernetes components.
Currently only cpu and memory are supported.
See http://kubernetes.io/docs/user-guide/compute-resources for more detail.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may not be possible to increase the reserved resources, because this
-requires resizing cgroups. Always look for a NodeAllocatableEnforced event
-after updating this field to ensure that the update was successful.
Default: nil
-->
@@ -1830,21 +1413,12 @@ that describe resources reserved for kubernetes system components.
Currently cpu, memory and local storage for root file system are supported.
See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
for more details.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may not be possible to increase the reserved resources, because this
-requires resizing cgroups. Always look for a NodeAllocatableEnforced event
-after updating this field to ensure that the update was successful.
Default: nil
-->
@@ -1945,13 +1511,6 @@ When kube-reserved is in the list, kubeReservedCgroup must be speci
This field is supported only when cgroupsPerQOS is set to true.
Refer to Node Allocatable
for more information.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-removing enforcements may reduce the stability of the node. Alternatively, adding
-enforcements may reduce the stability of components which were using more than
-the reserved amount of resources; for example, enforcing kube-reserved may cause
-Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved
-may cause system daemons to OOM if they use more than the reserved resources.
Default: ["pods"]
-->
+list when the node is shutting down.
+For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to
+shutdown, and all remaining pods 30s to shutdown.
+-->
shutdownGracePeriodByPodPriority设置基于 Pod
相关的优先级类值而确定的体面关闭时间。当 kubelet 收到关闭请求的时候,kubelet
会针对节点上运行的所有 Pod 发起关闭操作,这些关闭操作会根据 Pod 的优先级确定其宽限期限,
@@ -2140,6 +1683,15 @@ list when the node is shutting down.-->
@@ -129,10 +141,10 @@ Path to a directory that contains files named "target[suffix][+patchtype].extens
--rootfs string
-
[实验] 到'真实'主机根文件系统的路径。
+
[实验] 到'真实'主机根文件系统的路径。
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/implementation-details.md b/content/zh/docs/reference/setup-tools/kubeadm/implementation-details.md
index e303eebfe1..b7bbfd8d04 100644
--- a/content/zh/docs/reference/setup-tools/kubeadm/implementation-details.md
+++ b/content/zh/docs/reference/setup-tools/kubeadm/implementation-details.md
@@ -166,13 +166,8 @@ Kubeadm 在启动 init 之前执行一组预检,目的是验证先决条件并
- Kubernetes system requirements:
- if running on linux:
- [error] if Kernel is older than the minimum required version
- - [error] if required cgroups subsystem aren't in set up
- - if using docker:
- - [warning/error] if Docker service does not exist, if it is disabled, if it is not active.
- - [error] if Docker endpoint does not exist or does not work
- - [warning] if docker version is not in the list of validated docker versions
- - If using other cri engine:
- - [error] if crictl socket does not answer
+ - [error] if required cgroups subsystem aren't set up
+- [error] if the CRI endpoint does not answer
-->
- [警告] 如果要使用的 Kubernetes 版本(由 `--kubernetes-version` 标志指定)比 kubeadm CLI
版本至少高一个小版本。
@@ -180,12 +175,7 @@ Kubeadm 在启动 init 之前执行一组预检,目的是验证先决条件并
- 如果在 linux上运行:
- [错误] 如果内核早于最低要求的版本
- [错误] 如果未设置所需的 cgroups 子系统
- - 如果使用 docker:
- - [警告/错误] 如果 Docker 服务不存在、被禁用或未激活。
- - [错误] 如果 Docker 端点不存在或不起作用
- - [警告] 如果 docker 版本不在经过验证的 docker 版本列表中
- - 如果使用其他 cri 引擎:
- - [错误] 如果 crictl 套接字未应答
+- [错误] 如果 CRI 端点未应答
-- 给节点打上 `node-role.kubernetes.io/master=""` 标签,标记其为控制平面
-- 给节点打上 `node-role.kubernetes.io/master:NoSchedule` 污点
+- 给节点打上 `node-role.kubernetes.io/control-plane=""` 标签,标记其为控制平面
+- 给节点打上 `node-role.kubernetes.io/master:NoSchedule` 和 `node-role.kubernetes.io/control-plane:NoSchedule` 污点
请注意:
+1. `node-role.kubernetes.io/master` 污点是已废弃的,将会在 kubeadm 1.25 版本中移除
1. 可以使用 [`kubeadm init phase mark-control-plane`](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-mark-control-plane)
命令单独触发控制平面标记
@@ -1026,14 +1018,12 @@ cluster startup problems.
1. `kubeadm join` 预检基本上是 `kubeadm init` 预检的一个子集
-2. 从 1.9 开始,kubeadm 为 CRI 通用的功能提供了更好的支持;在这种情况下,
- Docker 特定的控制参数将跳过或替换为 crictl 中与之相似的控制参数。
+2. 从 1.24 开始,kubeadm 使用 crictl 与所有已知的 CRI 端点进行通信。
3. 从 1.9 开始,kubeadm 支持加入在 Windows 上运行的节点;在这种情况下,
将跳过 Linux 特定的控制参数。
4. 在任何情况下,用户都可以通过 `--ignore-preflight-errors` 选项跳过
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-config.md b/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-config.md
index 363335f25c..8c82949cb8 100644
--- a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-config.md
+++ b/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-config.md
@@ -8,53 +8,59 @@ weight: 50
在 `kubeadm init` 执行期间,kubeadm 将 `ClusterConfiguration` 对象上传
到你的集群的 `kube-system` 名字空间下名为 `kubeadm-config` 的 ConfigMap 对象中。
然后在 `kubeadm join`、`kubeadm reset` 和 `kubeadm upgrade` 执行期间读取此配置。
-要查看此 ConfigMap,请调用 `kubeadm config view`。
-你可以使用 `kubeadm config print` 命令打印默认配置,
-并使用 `kubeadm config migrate` 命令将旧版本的配置转化成新版本。
-`kubeadm config images list` 和 `kubeadm config images pull`
-命令可以用来列出并拉取 kubeadm 所需的镜像。
+你可以使用 `kubeadm config print` 命令打印默认静态配置,
+kubeadm 运行 `kubeadm init` and `kubeadm join` 时将使用此配置。
+
+
+{{< note >}}
+此命令的输出旨在作为示例。你必须手动编辑此命令的输出来适配你的设置。
+删除你不确定的字段,kubeadm 将通过检查主机来尝试在运行时给它们设默认值。
+{{< /note >}}
-更多信息请浏览[使用带配置文件的 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)
-或[使用带配置文件的 kubeadm join](/zh/docs/reference/setup-tools/kubeadm/kubeadm-join/#config-file).
+更多有关 `init` 和 `join` 的信息请浏览[使用带配置文件的 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)
+或[使用带配置文件的 kubeadm join](/zh/docs/reference/setup-tools/kubeadm/kubeadm-join/#config-file)。
-你也可以在使用 `kubeadm init` 命令时配置若干 kubelet 配置选项。
-这些选项对于集群中所有节点而言都是相同的。
-参阅[使用 kubeadm 来配置集群中的各个 kubelet](/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration/)
-了解详细信息。
-
-
-在 Kubernetes v1.13.0 及更高版本中,要列出/拉取 kube-dns 镜像而不是 CoreDNS 镜像,
-必须使用[这里](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-addon)
-所描述的 `--config` 方法。
+你可以使用 `kubeadm config migrate` 来转换旧配置文件,
+把其中已弃用的 API 版本更新为受支持的 API 版本。
+
+
+`kubeadm config images list` 和 `kubeadm config images pull` 可以用来列出和拉取 kubeadm 所需的镜像。
-## kubeadm config upload from-file {#cmd-config-from-file}
-
-## kubeadm config print{#cmd-config-view}
+## kubeadm config print {#cmd-config-print}
{{< include "generated/kubeadm_config_print.md" >}}
## kubeadm config print init-defaults {#cmd-config-print-init-defaults}
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md b/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
index 6914bdee27..0946e9672e 100644
--- a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
+++ b/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
@@ -207,6 +207,13 @@ What this example would do is write the manifest files for the control plane and
这允许你修改文件,然后使用 `--skip-phases` 跳过这些阶段。
通过调用最后一个命令,你将使用自定义清单文件创建一个控制平面节点。
+{{< feature-state for_k8s_version="v1.22" state="beta" >}}
+
+
+或者,你可以使用 `InitConfiguration` 下的 `skipPhases` 字段。
+
@@ -239,8 +246,8 @@ The default configuration can be printed out using the
If your configuration is not using the latest version it is **recommended** that you migrate using
the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command.
-For more information on the fields and usage of the configuration you can navigate to our API reference
-page and pick a version from [the list](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#section-directories).
+For more information on the fields and usage of the configuration you can navigate to our
+[API reference page](/docs/reference/config-api/kubeadm-config.v1beta3/).
-->
可以使用 [kubeadm config print](/zh/docs/reference/setup-tools/kubeadm/kubeadm-config/)
命令打印出默认配置。
@@ -249,10 +256,119 @@ page and pick a version from [the list](https://pkg.go.dev/k8s.io/kubernetes/cmd
**推荐**使用 [kubeadm config migrate](/zh/docs/reference/setup-tools/kubeadm/kubeadm-config/)
命令进行迁移。
-有关配置的字段和用法的更多信息,
-你可以访问 API 参考页面并从
-[列表](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#section-directories)
-中选择一个版本。
+关于配置的字段和用法的更多信息,你可以访问 [API 参考页面](/zh/docs/reference/config-api/kubeadm-config.v1beta3/)。
+
+
+### 使用 kubeadm init 时设置特性门控 {#feature-gates}
+
+
+Kubeadm 支持一组独有的特性门控,只能在 `kubeadm init` 创建集群期间使用。
+这些特性可以控制集群的行为。特性门控会在毕业到 GA 后被移除。
+
+
+你可以使用 `--feature-gates` 标志来为 `kubeadm init` 设置特性门控,
+或者你可以在用 `--config` 传递[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-ClusterConfiguration)
+时添加条目到 `featureGates` 字段中去。
+
+
+直接传递 [Kubernetes 核心组件的特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates)给 kubeadm 是不支持的。
+相反,可以通过[使用 kubeadm API 的自定义组件](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)来传递。
+
+
+特性门控的列表:
+
+{{< table caption="kubeadm feature gates" >}}
+特性 | 默认值 | Alpha | Beta
+:-------|:--------|:------|:-----
+`PublicKeysECDSA` | `false` | 1.19 | -
+`RootlessControlPlane` | `false` | 1.22 | -
+`UnversionedKubeletConfigMap` | `true` | 1.22 | 1.23
+{{< /table >}}
+
+
+{{< note >}}
+一旦特性门控变成了 GA,那它将会从这个列表中移除,因为它的值会被默认锁定为 `true` 。
+{{< /note >}}
+
+
+特性门控的描述:
+
+
+`PublicKeysECDSA`
+: 可用于创建集群时使用 ECDSA 证书而不是默认 RSA 算法。
+支持用 `kubeadm certs renew` 更新现有 ECDSA 证书,
+但你不能在集群运行期间或升级期间切换 RSA 和 ECDSA 算法。
+
+
+`RootlessControlPlane`
+: 设置此标志来配置 kubeadm 所部署的控制平面组件中的静态 Pod 容器
+`kube-apiserver`、`kube-controller-manager`、`kube-scheduler` 和 `etcd` 以非 root 用户身份运行。
+如果未设置该标志,则这些组件以 root 身份运行。
+你可以在升级到更新版本的 Kubernetes 之前更改此特性门控的值。
+
+
+`UnversionedKubeletConfigMap`
+: 此标志控制 kubeadm 存储 kubelet 配置数据的 {{}} 的名称。
+在未指定此标志或设置为 `true` 的情况下,此 ConfigMap 被命名为 `kubelet-config`。
+如果将此标志设置为 `false`,则此 ConfigMap 的名称会包括 Kubernetes 的主要版本和次要版本(例如:`kubelet-config-{{< skew currentVersion >}}`)。
+Kubeadm 会确保用于读写 ConfigMap 的 RBAC 规则适合你设置的值。
+当 kubeadm 写入此 ConfigMap 时(在 `kubeadm init` 或 `kubeadm upgrade apply` 期间),
+kubeadm 根据 `UnversionedKubeletConfigMap` 的设置值来执行操作。
+当读取此 ConfigMap 时(在 `kubeadm join`、`kubeadm reset`、`kubeadm upgrade ...` 期间),
+kubeadm 尝试首先使用无版本(后缀)的 ConfigMap 名称;
+如果不成功,kubeadm 将回退到使用该 ConfigMap 的旧(带版本号的)名称。
+
+
+{{< note >}}
+设置 `UnversionedKubeletConfigMap` 为 `false` 是被支持的特性,但该特性**已被弃用**。
+{{< /note >}}
+
+
+
+### 在没有互联网连接的情况下运行 kubeadm {#without-internet-connection}
+
+
+要在没有互联网连接的情况下运行 kubeadm,你必须提前拉取所需的控制平面镜像。
+
+
+你可以使用 `kubeadm config images` 子命令列出并拉取镜像:
+
+```shell
+kubeadm config images list
+kubeadm config images pull
+```
+
+
+你可以通过 `--config` 把 [kubeadm 配置文件](#config-file) 传递给上述命令来控制 `kubernetesVersion` 和 `imageRepository` 字段。
+
+
+kubeadm 需要的所有默认 `k8s.gcr.io` 镜像都支持多种硬件体系结构。
+
@@ -306,23 +453,44 @@ You can override this behavior by using [kubeadm with a configuration file](#con
允许的自定义功能有:
+* 提供影响镜像版本的 `kubernetesVersion`。
* 使用其他的 `imageRepository` 来代替 `k8s.gcr.io`。
-* 将 `useHyperKubeImage` 设置为 `true`,使用 HyperKube 镜像。
-* 为 etcd 或 DNS 附件提供特定的 `imageRepository` 和 `imageTag`。
+* 为 etcd 或 CoreDNS 提供特定的 `imageRepository` 和 `imageTag`。
-
-请注意配置文件中的配置项 `kubernetesVersion` 或者命令行参数 `--kubernetes-version`
-会影响到镜像的版本。
+由于向后兼容的原因,`imageRepository` 可能会有所不同。
+例如,某镜像的子路径可能是 `k8s.gcr.io/subpath/image`,
+但使用自定义仓库时默认为 `my.customrepository.io/image`。
+
+
+确保将镜像推送到 kubeadm 可以使用的自定义仓库的路径中,你必须:
+
+
+* 使用 `kubeadm config images {list|pull}` 从 `k8s.gcr.io` 的默认路径中拉取镜像。
+* 将镜像推送到 `kubeadm config images list --config=config.yaml` 的路径,
+其中 `config.yaml` 包含自定义的 `imageRepository` 和/或用于 etcd 和 CoreDNS 的 `imageTag`。
+* 将相同的 `config.yaml` 传递给 `kubeadm init`。
+
-### 在没有互联网连接的情况下运行 kubeadm
-
-
-要在没有互联网连接的情况下运行 kubeadm,你必须提前拉取所需的控制平面镜像。
-
-
-你可以使用 `kubeadm config images` 子命令列出并拉取镜像:
-
-```shell
-kubeadm config images list
-kubeadm config images pull
-```
-
-
-kubeadm 需要的所有镜像,例如 `k8s.gcr.io/kube-*`、`k8s.gcr.io/etcd` 和 `k8s.gcr.io/pause`
-都支持多种架构。
-
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md b/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md
index 9b0fc237d9..d14cb9d5f8 100644
--- a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md
+++ b/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md
@@ -1,12 +1,17 @@
---
+title: kubeadm join
+content_type: concept
+weight: 30
+---
+
+
### join 工作流 {#join-workflow}
-
-`kubeadm join` 初始化 Kubernetes 工作节点并将其加入集群。
-该操作过程包含下面几个步骤:
+`kubeadm join` 初始化 Kubernetes 工作节点或控制平面节点并将其添加到集群中。
+对于工作节点,该操作包括以下步骤:
2. 一旦知道集群信息,kubelet 就可以开始 TLS 引导过程。
-
+
TLS 引导程序使用共享令牌与 Kubernetes API 服务器进行临时的身份验证,以提交证书签名请求 (CSR);
默认情况下,控制平面自动对该 CSR 请求进行签名。
-
3. 最后,kubeadm 配置本地 kubelet 使用分配给节点的确定标识连接到 API 服务器。
-
### 使用 kubeadm 的 join phase 命令 {#join-phases}
-
Kubeadm 允许你使用 `kubeadm join phase` 分阶段将节点加入集群。
-
-要查看阶段和子阶段的有序列表,可以调用 `kubeadm join --help`。
+要查看阶段和子阶段的有序列表,可以调用 `kubeadm join --help`。
该列表将位于帮助屏幕的顶部,每个阶段旁边都有一个描述。
注意,通过调用 `kubeadm join`,所有阶段和子阶段都将按照此确切顺序执行。
-
有些阶段具有唯一的标志,因此,如果要查看可用选项列表,请添加 `--help`,例如:
@@ -104,13 +109,13 @@ Some phases have unique flags, so if you want to have a look at the list of avai
kubeadm join phase kubelet-start --help
```
-
-类似于 [kubeadm init phase](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#init-phases)命令,
+类似于 [kubeadm init phase](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#init-phases) 命令,
`kubeadm join phase` 允许你使用 `--skip-phases` 标志跳过阶段列表。
例如:
@@ -129,9 +134,9 @@ Alternatively, you can use the `skipPhases` field in `JoinConfiguration`.
-### 发现要信任的集群 CA
+### 发现要信任的集群 CA {#discovering-what-cluster-ca-to-trust}
-
-#### 带 CA 锁定模式的基于令牌的发现
+#### 带 CA 锁定模式的基于令牌的发现 {#token-based-discovery-with-ca-pinning}
-
-这是 Kubernetes 1.8 及以上版本中的默认模式。
-在这种模式下,kubeadm 下载集群配置(包括根CA)并使用令牌验证它,
+这是 kubeadm 的默认模式。
+在这种模式下,kubeadm 下载集群配置(包括根 CA)并使用令牌验证它,
并且会验证根 CA 的公钥与所提供的哈希是否匹配,
以及 API 服务器证书在根 CA 下是否有效。
@@ -162,7 +167,7 @@ The CA key hash has the format `sha256:`. By default, the hash
CA 键哈希格式为 `sha256:`。
默认情况下,在 `kubeadm init` 最后打印的 `kubeadm join` 命令
或者 `kubeadm token create --print-join-command` 的输出信息中返回哈希值。
-它使用标准格式 (请参考 [RFC7469](https://tools.ietf.org/html/rfc7469#section-2.4))
+它使用标准格式(请参考 [RFC7469](https://tools.ietf.org/html/rfc7469#section-2.4))
并且也能通过第三方工具或者制备系统进行计算。
例如,使用 OpenSSL CLI:
@@ -171,7 +176,7 @@ openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outfor
```
**`kubeadm join` 命令示例**
@@ -193,7 +198,7 @@ For control-plane nodes:
kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef --control-plane 1.2.3.4:6443
```
-
@@ -204,52 +209,52 @@ if the `kubeadm init` command was called with `--upload-certs`.
**优势:**
-- 允许引导节点安全地发现主节点的信任根,即使其他工作节点或网络受到损害。
+- 允许引导节点安全地发现控制平面节点的信任根,即使其他工作节点或网络受到损害。
- 方便手动执行,因为所需的所有信息都可放到一个 `kubeadm join` 命令中。
-
**劣势:**
-- CA 哈希通常在主节点被提供之前是不知道的,这使得构建使用 kubeadm 的自动化配置工具更加困难。
- 通过预先生成CA,你可以解除这个限制。
+- CA 哈希通常在控制平面节点被提供之前是不知道的,这使得构建使用 kubeadm 的自动化配置工具更加困难。
+ 通过预先生成 CA,你可以解除这个限制。
-
-#### 无 CA 锁定模式的基于令牌的发现
+#### 无 CA 锁定模式的基于令牌的发现 {#token-based-discovery-without-ca-pinning}
-
-_这是 Kubernetes 1.7 和早期版本_中的默认设置;使用时要注意一些重要的补充说明。
-此模式仅依赖于对称令牌来签名(HMAC-SHA256)发现信息,这些发现信息为主节点建立信任根。
-在 Kubernetes 1.8 及以上版本中仍然可以使用 `--discovery-token-unsafe-skip-ca-verification`
-参数,但是如果可能的话,你应该考虑使用一种其他模式。
+此模式仅依靠对称令牌来签署 (HMAC-SHA256) 为控制平面建立信任根的发现信息。
+要使用该模式,加入节点必须使用
+`--discovery-token-unsafe-skip-ca-verification`
+跳过 CA 公钥的哈希验证。
+如果可以,你应该考虑使用其他模式。
**`kubeadm join` 命令示例**
@@ -262,7 +267,7 @@ kubeadm join --token abcdef.1234567890abcdef --discovery-token-unsafe-skip-ca-ve
- Still protects against many network-level attacks.
-- The token can be generated ahead of time and shared with the master and
+- The token can be generated ahead of time and shared with the control-plane node and
worker nodes, which can then bootstrap in parallel without coordination. This
allows it to be used in many provisioning scenarios.
-->
@@ -271,7 +276,7 @@ kubeadm join --token abcdef.1234567890abcdef --discovery-token-unsafe-skip-ca-ve
- 仍然可以防止许多网络级攻击。
-- 可以提前生成令牌并与主节点和工作节点共享,这样主节点和工作节点就可以并行引导而无需协调。
+- 可以提前生成令牌并与控制平面节点和工作节点共享,这样控制平面节点和工作节点就可以并行引导而无需协调。
这允许它在许多配置场景中使用。
**劣势**
- 如果攻击者能够通过某些漏洞窃取引导令牌,那么他们可以使用该令牌(连同网络级访问)
- 为其它处于引导过程中的节点提供假冒的主节点。
+ 为其它处于引导过程中的节点提供假冒的控制平面节点。
在你的环境中,这可能是一个适当的折衷方法,也可能不是。
-#### 基于 HTTPS 或文件发现
+#### 基于 HTTPS 或文件发现 {#file-or-https-based-discovery}
-
-这种方案提供了一种带外方式在主节点和引导节点之间建立信任根。
+这种方案提供了一种带外方式在控制平面节点和引导节点之间建立信任根。
如果使用 kubeadm 构建自动配置,请考虑使用此模式。
发现文件的格式为常规的 Kubernetes
[kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) 文件。
@@ -314,42 +319,47 @@ In case the discovery file does not contain credentials, the TLS discovery token
-->
**`kubeadm join` 命令示例:**
-- `kubeadm join --discovery-file path/to/file.conf` (本地文件)
+
+- `kubeadm join --discovery-file path/to/file.conf`(本地文件)
+
+- `kubeadm join --discovery-file https://url/file.conf`(远程 HTTPS URL)
**优势:**
-- 允许引导节点安全地发现主节点的信任根,即使网络或其他工作节点受到损害。
+- 允许引导节点安全地发现控制平面节点的信任根,即使网络或其他工作节点受到损害。
**劣势:**
-- 要求你有某种方法将发现信息从主节点传送到引导节点。
- 例如,这可以通过云提供商或驱动工具实现。
- 该文件中的信息不是加密的,而是需要 HTTPS 或等效文件来保证其完整性。
+- 要求你有某种方法将发现信息从控制平面节点传送到引导节点。
+ 如果发现文件包含凭据,你必须对其保密并通过安全通道进行传输。
+ 这可能通过你的云提供商或供应工具来实现。
### 确保你的安装更加安全 {#securing-more}
-
@@ -359,9 +369,9 @@ Kubeadm 的默认值可能不适用于所有人。
-#### 关闭节点客户端证书的自动批准
+#### 关闭节点客户端证书的自动批准 {#turning-off-auto-approval-of-node-client-certificates}
-
-这迫使工作流只有在运行了 kubectl 证书批准后,kubeadm join 才能成功。
+这迫使工作流只有在运行了 `kubectl certificate approve` 后,`kubeadm join` 才能成功。
-#### 关闭对集群信息 ConfigMap 的公开访问
+#### 关闭对集群信息 ConfigMap 的公开访问 {#turning-off-public-access-to-the-cluster-info-configmap}
-
-为了实现使用令牌作为唯一验证信息的加入工作流,默认情况下会公开带有验证主节点标识
-所需数据的 ConfigMap。
+为了实现使用令牌作为唯一验证信息的加入工作流,默认情况下会公开带有验证控制平面节点标识所需数据的 ConfigMap。
虽然此 ConfigMap 中没有私有数据,但一些用户可能希望无论如何都关闭它。
这样做需要禁用 `kubeadm join` 工作流的 `--discovery-token` 参数。
以下是实现步骤:
-
* 从 API 服务器获取 `cluster-info` 文件:
@@ -488,16 +497,18 @@ users: []
-这些命令应该在执行 `kubeadm init` 之后、在`kubeadm join` 之前执行。
+这些命令应该在执行 `kubeadm init` 之后、在 `kubeadm join` 之前执行。
-
-### 使用带有配置文件的 kubeadm join
+### 使用带有配置文件的 kubeadm join {#config-file}
{{< caution >}}
-
-配置文件目前是 alpha 功能,在将来的版本中可能会变动。
+
+配置文件目前是 beta 功能,在将来的版本中可能会变动。
{{< /caution >}}
-可以用配置文件替代命令行参数的方法配置 `kubeadm join`,一些高级功能也只有在使用配置文件时才可选用。
+可以用配置文件替代命令行参数的方法配置 `kubeadm join`,一些进阶功能也只有在使用配置文件时才可选用。
该文件通过 `--config` 参数来传递,并且文件中必须包含 `JoinConfiguration` 结构。
在某些情况下,不允许将 `--config` 与其他标志混合使用。
-
* [kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/)
- 初始化 Kubernetes 主节点
+ 初始化 Kubernetes 控制平面节点
* [kubeadm token](/zh/docs/reference/setup-tools/kubeadm/kubeadm-token/)
管理 `kubeadm join` 的令牌
* [kubeadm reset](/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset/)
diff --git a/content/zh/docs/reference/using-api/api-concepts.md b/content/zh/docs/reference/using-api/api-concepts.md
index bf31ae7a78..4207a1624f 100644
--- a/content/zh/docs/reference/using-api/api-concepts.md
+++ b/content/zh/docs/reference/using-api/api-concepts.md
@@ -1066,8 +1066,6 @@ string, working as an enum, and the only accepted values are:
`All`
: Every stage runs as normal, except for the final storage stage where side effects
are prevented.
-
-For example:
-->
### 发起试运行请求 {#make-a-dry-run-request}
@@ -1140,11 +1138,11 @@ generated fields may differ.
Some values of an object are typically generated before the object is persisted. It is important not to rely upon the values of these fields set by a dry-run request, since these values will likely be different in dry-run mode from when the real request is made. Some of these fields are:
* `name`: if `generateName` is set, `name` will have a unique random name
-* `creationTimestamp`/`deletionTimestamp`: records the time of creation/deletion
-* `UID`: uniquely identifies the object and is randomly generated (non-deterministic)
+* `creationTimestamp` / `deletionTimestamp`: records the time of creation/deletion
+* `UID`: [uniquely identifies](/docs/concepts/overview/working-with-objects/names/#uids) the object and is randomly generated (non-deterministic)
* `resourceVersion`: tracks the persisted version of the object
* Any field set by a mutating admission controller
-* For the `Service` resource: Ports or IPs that kube-apiserver assigns to v1.Service objects
+* For the `Service` resource: Ports or IP addresses that the kube-apiserver assigns to Service objects
-->
### 生成值 {#generated-values}
@@ -1153,11 +1151,12 @@ Some values of an object are typically generated before the object is persisted.
值很可能不同。这类字段有:
* `name`:如果设置了 `generateName` 字段,则 `name` 会获得一个唯一的随机名称
-* `creationTimestamp`/`deletionTimestamp`:记录对象的创建/删除时间
-* `UID`:唯一性标识对象,取值随机生成(非确定性)
+* `creationTimestamp` / `deletionTimestamp`:记录对象的创建/删除时间
+* `UID`:[唯一标识](/zh/docs/concepts/overview/working-with-objects/names/#uids)对象,
+ 取值随机生成(非确定性)
* `resourceVersion`: 跟踪对象的持久化(存储)版本
* 变更性准入控制器所设置的字段
-* 对于 `Service` 资源:`kube-apiserver` 为 `v1.Service` 对象分配的端口和 IP
+* 对于 `Service` 资源:`kube-apiserver` 为 `Service` 对象分配的端口和 IP 地址
{{< table caption="list 操作的 resourceVersionMatch 与分页参数" >}}
diff --git a/content/zh/docs/reference/using-api/deprecation-guide.md b/content/zh/docs/reference/using-api/deprecation-guide.md
index 7b5ed5b7b9..f088f3453a 100644
--- a/content/zh/docs/reference/using-api/deprecation-guide.md
+++ b/content/zh/docs/reference/using-api/deprecation-guide.md
@@ -373,14 +373,14 @@ The **authentication.k8s.io/v1beta1** API version of TokenReview is no longer se
#### SubjectAccessReview resources {#subjectaccessreview-resources-v122}
**authorization.k8s.io/v1beta1** API 版本的 LocalSubjectAccessReview、
-SelfSubjectAccessReview、SubjectAccessReview 不在 v1.22 版本中继续提供。
+SelfSubjectAccessReview、SubjectAccessReview、SelfSubjectRulesReview 不在 v1.22 版本中继续提供。
* 迁移清单和 API 客户端使用 **authorization.k8s.io/v1** API 版本,此 API 从
v1.6 版本开始可用;
@@ -762,4 +762,3 @@ resource, check the Kubernetes [API reference](/docs/reference/kubernetes-api/).
-->
注意这种操作生成的结果中可能使用的默认值并不理想。
要进一步了解某个特定资源,可查阅 Kubernetes [API 参考](/zh/docs/reference/kubernetes-api/)。
-
diff --git a/content/zh/docs/setup/best-practices/certificates.md b/content/zh/docs/setup/best-practices/certificates.md
index bb96a887f6..2acb106748 100644
--- a/content/zh/docs/setup/best-practices/certificates.md
+++ b/content/zh/docs/setup/best-practices/certificates.md
@@ -1,7 +1,5 @@
---
title: PKI 证书和要求
-reviewers:
-- sig-cluster-lifecycle
content_type: concept
weight: 40
---
@@ -18,7 +16,7 @@ weight: 40
Kubernetes 需要 PKI 证书才能进行基于 TLS 的身份验证。如果你是使用
@@ -33,7 +31,7 @@ Kubernetes 需要 PKI 证书才能进行基于 TLS 的身份验证。如果你
Kubernetes requires PKI for the following operations:
-->
-## 集群是如何使用证书的
+## 集群是如何使用证书的 {#how-certificates-are-used-by-your-cluster}
Kubernetes 需要 PKI 才能执行以下操作:
@@ -61,7 +59,7 @@ Kubernetes 需要 PKI 才能执行以下操作:
* [前端代理](/zh/docs/tasks/extend-kubernetes/configure-aggregation-layer/) 的客户端及服务端证书
{{< note >}}
只有当你运行 kube-proxy 并要支持
@@ -79,7 +77,7 @@ etcd 还实现了双向 TLS 来对客户端和对其他对等节点进行身份
If you install Kubernetes with kubeadm, most certificates are stored in `/etc/kubernetes/pki`. All paths in this documentation are relative to that directory, with the exception of user account certificates which kubeadm places in `/etc/kubernetes`.
-->
-## 证书存放的位置
+## 证书存放的位置 {#where-certificates-are-stored}
假如通过 kubeadm 安装 Kubernetes,大多数证书都存储在 `/etc/kubernetes/pki`。
本文档中的所有路径都是相对于该目录的,但用户账户证书除外,kubeadm 将其放在 `/etc/kubernetes` 中。
@@ -90,7 +88,7 @@ If you install Kubernetes with kubeadm, most certificates are stored in `/etc/ku
If you don't want kubeadm to generate the required certificates, you can create them using a single root CA or by providing all certificates. See [Certificates](/docs/tasks/administer-cluster/certificates/) for details on creating your own certificate authority.
See [Certificate Management with kubeadm](/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/) for more on managing certificates.
-->
-## 手动配置证书
+## 手动配置证书 {#configure-certificates-manually}
如果你不想通过 kubeadm 生成这些必需的证书,你可以使用一个单一的根 CA
来创建这些证书或者直接提供所有证书。
@@ -102,14 +100,14 @@ See [Certificate Management with kubeadm](/docs/tasks/administer-cluster/kubeadm
You can create a single root CA, controlled by an administrator. This root CA can then create multiple intermediate CAs, and delegate all further creation to Kubernetes itself.
-->
-### 单根 CA
+### 单根 CA {#single-root-ca}
你可以创建一个单根 CA,由管理员控制器它。该根 CA 可以创建多个中间 CA,并将所有进一步的创建委托给 Kubernetes。
-### 所有的证书
+### 所有的证书 {#all-certificates}
如果你不想将 CA 的私钥拷贝至你的集群中,你也可以自己生成全部的证书。
需要这些证书:
-| 默认 CN | 父级 CA | O (位于 Subject 中) | 类型 | 主机 (SAN) |
+
+| 默认 CN | 父级 CA | O (位于 Subject 中) | 类型 | 主机 (SAN) |
|-------------------------------|---------------------------|----------------|----------------------------------------|---------------------------------------------|
| kube-etcd | etcd-ca | | server, client | ``, ``, `localhost`, `127.0.0.1` |
| kube-etcd-peer | etcd-ca | | server, client | ``, ``, `localhost`, `127.0.0.1` |
@@ -165,7 +174,8 @@ Required certificates:
| front-proxy-client | kubernetes-front-proxy-ca | | client | |
-### 证书路径
+### 证书路径 {#certificate-paths}
-证书应放置在建议的路径中(以便 [kubeadm](/zh/docs/reference/setup-tools/kubeadm/)使用)。无论使用什么位置,都应使用给定的参数指定路径。
+证书应放置在建议的路径中(以便 [kubeadm](/zh/docs/reference/setup-tools/kubeadm/)
+使用)。无论使用什么位置,都应使用给定的参数指定路径。
+
| 默认 CN | 建议的密钥路径 | 建议的证书路径 | 命令 | 密钥参数 | 证书参数 |
|------------------------------|------------------------------|-----------------------------|----------------|------------------------------|-------------------------------------------|
| etcd-ca | etcd/ca.key | etcd/ca.crt | kube-apiserver | | --etcd-cafile |
@@ -241,6 +271,12 @@ Same considerations apply for the service account key pair:
-->
注意事项同样适用于服务帐户密钥对:
+
| 私钥路径 | 公钥路径 | 命令 | 参数 |
|------------------------------|-----------------------------|-------------------------|--------------------------------------|
| sa.key | | kube-controller-manager | --service-account-private-key-file |
@@ -282,10 +318,18 @@ The following example illustrates the file paths [from the previous tables](/doc
You must manually configure these administrator account and service accounts:
-->
-## 为用户帐户配置证书
+## 为用户帐户配置证书 {#configure-certificates-for-user-accounts}
你必须手动配置以下管理员帐户和服务帐户:
+
| 文件名 | 凭据名称 | 默认 CN | O (位于 Subject 中) |
|-------------------------|----------------------------|--------------------------------|---------------------|
| admin.conf | default-admin | kubernetes-admin | system:masters |
diff --git a/content/zh/docs/setup/best-practices/node-conformance.md b/content/zh/docs/setup/best-practices/node-conformance.md
index 71e97ac73a..9fe0ce0d90 100644
--- a/content/zh/docs/setup/best-practices/node-conformance.md
+++ b/content/zh/docs/setup/best-practices/node-conformance.md
@@ -1,16 +1,12 @@
---
-reviewers:
-- Random-Liu
title: 校验节点设置
weight: 30
---
{{< toc >}}
@@ -18,13 +14,16 @@ weight: 30
-## 节点一致性测试
+## 节点一致性测试 {#node-conformance-test}
-*节点一致性测试* 是一个容器化的测试框架,提供了针对节点的系统验证和功能测试。
+**节点一致性测试** 是一个容器化的测试框架,提供了针对节点的系统验证和功能测试。
+测试验证节点是否满足 Kubernetes 的最低要求;通过测试的节点有资格加入 Kubernetes 集群。
-## 节点的前提条件
+## 节点的前提条件 {#node-prerequisite}
要运行节点一致性测试,节点必须满足与标准 Kubernetes 节点相同的前提条件。节点至少应安装以下守护程序:
@@ -51,7 +52,7 @@ To run node conformance test, a node must satisfy the same prerequisites as asta
-## 运行节点一致性测试
+## 运行节点一致性测试 {#running-node-conformance-test}
-1. 得出 kubelet 的 `--kubeconfig` 的值;例如:`--kubeconfig=/var/lib/kubelet/config.yaml`.
- 由于测试框架启动了本地控制平面来测试 kubelet, 因此使用 `http://localhost:8080`
+1. 得出 kubelet 的 `--kubeconfig` 的值;例如:`--kubeconfig=/var/lib/kubelet/config.yaml`。
+ 由于测试框架启动了本地控制平面来测试 kubelet,因此使用 `http://localhost:8080`
作为API 服务器的 URL。
一些其他的 kubelet 命令行参数可能会被用到:
- * `--cloud-provider`: 如果使用 `--cloud-provider=gce`,需要移除这个参数
- 来运行测试。
+ * `--cloud-provider`:如果使用 `--cloud-provider=gce`,需要移除这个参数来运行测试。
2. 使用以下命令运行节点一致性测试:
@@ -91,45 +99,48 @@ To run the node conformance test, perform the following steps:
-## 针对其他硬件体系结构运行节点一致性测试
+## 针对其他硬件体系结构运行节点一致性测试 {#running-node-conformance-test-for-other-architectures}
Kubernetes 也为其他硬件体系结构的系统提供了节点一致性测试的 Docker 镜像:
-| 架构 | 镜像 | |
-| ----- | :-------------: | ---- |
-| amd64 | node-test-amd64 | |
-| arm | node-test-arm | |
-| arm64 | node-test-arm64 | |
+ 架构 | 镜像 |
+--------|:-----------------:|
+ amd64 | node-test-amd64 |
+ arm | node-test-arm |
+ arm64 | node-test-arm64 |
-## 运行特定的测试
+## 运行特定的测试 {#running-selected-test}
要运行特定测试,请使用你希望运行的测试的特定表达式覆盖环境变量 `FOCUS`。
```shell
sudo docker run -it --rm --privileged --net=host \
- -v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
- -e FOCUS=MirrorPod \ # Only run MirrorPod test
-k8s.gcr.io/node-test:0.2
+ -v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
+ -e FOCUS=MirrorPod \ # Only run MirrorPod test
+ k8s.gcr.io/node-test:0.2
```
要跳过特定的测试,请使用你希望跳过的测试的常规表达式覆盖环境变量 `SKIP`。
@@ -138,35 +149,37 @@ To skip specific tests, overwrite the environment variable `SKIP` with theregula
sudo docker run -it --rm --privileged --net=host \
-v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
-e SKIP=MirrorPod \ # Run all conformance tests but skip MirrorPod test
-k8s.gcr.io/node-test:0.2
+ k8s.gcr.io/node-test:0.2
```
-->
```shell
sudo docker run -it --rm --privileged --net=host \
-v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
-e SKIP=MirrorPod \ # 运行除 MirrorPod 测试外的所有一致性测试内容
-k8s.gcr.io/node-test:0.2
+ k8s.gcr.io/node-test:0.2
```
-节点一致性测试是[节点端到端测试](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/devel/e2e-node-tests.md)的容器化版本。
+节点一致性测试是[节点端到端测试](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/e2e-node-tests.md)的容器化版本。
默认情况下,它会运行所有一致性测试。
-理论上,只要合理地配置容器和挂载所需的卷,就可以运行任何的节点端到端测试用例。 但是这里**强烈建议只运行一致性测试**,因为运行非一致性测试需要很多复杂的配置。
+理论上,只要合理地配置容器和挂载所需的卷,就可以运行任何的节点端到端测试用例。但是这里**强烈建议只运行一致性测试**,因为运行非一致性测试需要很多复杂的配置。
-## 注意
+## 注意事项 {#caveats}
-* 测试会在节点上遗留一些 Docker 镜像, 包括节点一致性测试本身的镜像和功能测试相关的镜像。
+* 测试会在节点上遗留一些 Docker 镜像,包括节点一致性测试本身的镜像和功能测试相关的镜像。
* 测试会在节点上遗留一些死的容器。这些容器是在功能测试的过程中创建的。
\ No newline at end of file
diff --git a/content/zh/docs/setup/production-environment/container-runtimes.md b/content/zh/docs/setup/production-environment/container-runtimes.md
index 03380bae14..431232cd64 100644
--- a/content/zh/docs/setup/production-environment/container-runtimes.md
+++ b/content/zh/docs/setup/production-environment/container-runtimes.md
@@ -7,7 +7,7 @@ weight: 20
reviewers:
- vincepri
- bart0sh
-title: Container runtimes
+title: Container Runtimes
content_type: concept
weight: 20
-->
@@ -15,6 +15,8 @@ weight: 20
-本文列出了在 Linux 上结合 Kubernetes 使用的几种通用容器运行时的详细信息:
+
+Kubernetes {{< skew currentVersion >}} 要求你使用符合{{}} (CRI)的运行时。
+
+有关详细信息,请参阅 [CRI 版本支持](#cri-versions)。
+本页简要介绍在 Kubernetes 中几个常见的容器运行时的用法。
- [containerd](#containerd)
- [CRI-O](#cri-o)
-- [Docker](#docker)
+- [Docker Engine](#docker)
+- [Mirantis Container Runtime](#mcr)
-提示:对于其他操作系统,请查阅特定于你所使用平台的相关文档。
+ {{< note >}}
+提示:v1.24 之前的 Kubernetes 版本包括与 Docker Engine 的直接集成,使用名为 _dockershim_ 的组件。
+这种特殊的直接整合不再是 Kubernetes 的一部分
+(这次删除被作为 v1.20 发行版本的一部分[宣布](/zh/blog/2020/12/08/kubernetes-1-20-release-announcement/#dockershim-deprecation))。
+你可以阅读[检查 Dockershim 弃用是否会影响你](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-deprecation-affects-you/)
+以了解此删除可能会如何影响你。
+要了解如何使用 dockershim 进行迁移,请参阅[从 dockershim 迁移](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/)。
+
+如果你正在运行 v{{< skew currentVersion >}} 以外的 Kubernetes 版本,检查该版本的文档。
+{{< /note >}}
+
+
+
+
+## 安装和配置先决条件
+
+以下步骤将通用设置应用于 Linux 上的 Kubernetes 节点。
+
+如果你确定不需要某个特定设置,则可以跳过它。
+
+有关更多信息,请参阅[网络插件要求](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements)
+或特定容器运行时的文档。
+
+
+
+### 转发 IPv4 并让 iptables 看到桥接流量
+
+通过运行 `lsmod | grep br_netfilter` 来验证 `br_netfilter` 模块是否已加载。
+
+若要显式加载此模块,请运行 `sudo modprobe br_netfilter`。
+
+为了让 Linux 节点的 iptables 能够正确查看桥接流量,请确认 `sysctl` 配置中的
+`net.bridge.bridge-nf-call-iptables` 设置为 1。 例如:
+
+
+
+```bash
+cat <}} are used to constrain resources that are allocated to processes.
When [systemd](https://www.freedesktop.org/wiki/Software/systemd/) is chosen as the init
system for a Linux distribution, the init process generates and consumes a root control group
@@ -58,10 +169,10 @@ Systemd has a tight integration with cgroups and allocates a cgroup per systemd
to configure your container runtime and the kubelet to use `cgroupfs`. Using `cgroupfs` alongside
systemd means that there will be two different cgroup managers.
-->
-控制组用来约束分配给进程的资源。
+在 Linux 上,{{}}用于限制分配给进程的资源。
当某个 Linux 系统发行版使用 [systemd](https://www.freedesktop.org/wiki/Software/systemd/)
-作为其初始化系统时,初始化进程会生成并使用一个 root 控制组 (`cgroup`), 并充当 cgroup 管理器。
+作为其初始化系统时,初始化进程会生成并使用一个 root 控制组(`cgroup`),并充当 cgroup 管理器。
Systemd 与 cgroup 集成紧密,并将为每个 systemd 单元分配一个 cgroup。
你也可以配置容器运行时和 kubelet 使用 `cgroupfs`。
连同 systemd 一起使用 `cgroupfs` 意味着将有两个不同的 cgroup 管理器。
@@ -107,12 +218,13 @@ configuration, or reinstall it using automation.
或者使用自动化方案来重新安装。
-## Cgroup v2
+### Cgroup v2 {#cgroup-v2}
+
Cgroup v2 是 cgroup Linux API 的下一个版本。与 cgroup v1 不同的是,
Cgroup v2 只有一个层次结构,而不是每个控制器有一个不同的层次结构。
@@ -143,22 +255,36 @@ Kubernetes 仅支持使用同一 cgroup 版本来管理所有控制器。
如果 systemd 默认不使用 cgroup v2,你可以通过在内核命令行中添加
`systemd.unified_cgroup_hierarchy=1` 来配置系统去使用它。
+
+
+```shell
+# 此示例适用于使用 DNF 包管理器的 Linux 操作系统
+# 你的系统可能使用不同的方法来设置 Linux 内核使用的命令行。
+sudo dnf install -y grubby && \
sudo grubby \
--update-kernel=ALL \
--args="systemd.unified_cgroup_hierarchy=1"
```
-要应用配置,必须重新启动节点。
+如果更改内核的命令行,则必须重新启动节点才能使更改生效。
切换到 cgroup v2 时,用户体验不应有任何明显差异,
除非用户直接在节点上或在容器内访问 cgroup 文件系统。
@@ -170,11 +296,23 @@ In order to use it, cgroup v2 must be supported by the CRI runtime as well.
### 将 kubeadm 托管的集群迁移到 `systemd` 驱动
-如果你想迁移到现有 kubeadm 托管集群中的 `systemd` cgroup 驱动程序,
-遵循此[迁移指南](/zh/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver)。
+如果你希望将现有的由 kubeadm 管理的集群迁移到 `systemd` cgroup 驱动程序,
+请按照[配置 cgroup 驱动程序](/zh/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/)操作。
+
+## CRI 版本支持 {#cri-versions}
+
+你的容器运行时必须至少支持容器运行时接口的 v1alpha2。
+
+Kubernetes {{< skew currentVersion >}} 默认使用 v1 的 CRI API。如果容器运行时不支持 v1 API,
+则 kubelet 会回退到使用(已弃用的)v1alpha2 API。
-本节包含使用 containerd 作为 CRI 运行时的必要步骤。
+本节概述了使用 containerd 作为 CRI 运行时的必要步骤。
使用以下命令在系统上安装 Containerd:
-安装和配置的先决条件:
+
-```shell
-cat <
-安装 containerd:
-
-{{< tabs name="tab-cri-containerd-installation" >}}
+{{< tabs name="Finding your config.toml file" >}}
{{% tab name="Linux" %}}
-
-
-1. 从官方Docker仓库安装 `containerd.io` 软件包。可以在
- [安装 Docker 引擎](https://docs.docker.com/engine/install/#server)
- 中找到有关为各自的 Linux 发行版设置 Docker 存储库和安装 `containerd.io`
- 软件包的说明。
-
-
-2. 配置 containerd:
-
- ```shell
- sudo mkdir -p /etc/containerd
- containerd config default | sudo tee /etc/containerd/config.toml
- ```
-
-
-3. 重新启动 containerd:
-
- ```shell
- sudo systemctl restart containerd
- ```
-
-{{% /tab %}}
-{{% tab name="Windows (PowerShell)" %}}
-
-
-启动 Powershell 会话,将 `$Version` 设置为所需的版本(例如:`$Version=1.4.3`),
-然后运行以下命令:
-
-
-1. 下载 containerd:
-
- ```powershell
- curl.exe -L https://github.com/containerd/containerd/releases/download/v$Version/containerd-$Version-windows-amd64.tar.gz -o containerd-windows-amd64.tar.gz
- tar.exe xvf .\containerd-windows-amd64.tar.gz
- ```
-
-2. 提取并配置:
-
- ```powershell
- Copy-Item -Path ".\bin\" -Destination "$Env:ProgramFiles\containerd" -Recurse -Force
- cd $Env:ProgramFiles\containerd\
- .\containerd.exe config default | Out-File config.toml -Encoding ascii
-
- # 检查配置。根据你的配置,可能需要调整:
- # - sandbox_image (Kubernetes pause 镜像)
- # - cni bin_dir 和 conf_dir 位置
- Get-Content config.toml
-
- # (可选 - 不过强烈建议) 禁止 Windows Defender 扫描 containerd
- Add-MpPreference -ExclusionProcess "$Env:ProgramFiles\containerd\containerd.exe"
- ```
-
-3. 启动 containerd:
-
- ```powershell
- .\containerd.exe --register-service
- Start-Service containerd
- ```
-
+
+你可以在路径 `/etc/containerd/config.toml` 下找到此文件。
{{% /tab %}}
+{{< tab name="Windows" >}}
+
+你可以在路径 `C:\Program Files\containerd\config.toml` 下找到此文件。
+{{< /tab >}}
{{< /tabs >}}
+On Linux the default CRI socket for containerd is `/run/containerd/containerd.sock`.
+On Windows the default CRI endpoint is `npipe://./pipe/containerd-containerd`.
-#### 使用 `systemd` cgroup 驱动程序 {#containerd-systemd}
+#### Configuring the `systemd` cgroup driver {#containerd-systemd}
+-->
+在 Linux 上,containerd 的默认 CRI 套接字是 `/run/containerd/containerd.sock`。
+在 Windows 上,默认 CRI 端点是 `npipe://./pipe/containerd-containerd`。
+
+#### 配置 `systemd` cgroup 驱动程序 {#containerd-systemd}
-如果您应用此更改,请确保再次重新启动 containerd:
+如果你应用此更改,请确保重新启动 containerd:
```shell
sudo systemctl restart containerd
@@ -345,274 +395,26 @@ When using kubeadm, manually configure the
本节包含安装 CRI-O 作为容器运行时的必要步骤。
-使用以下命令在系统中安装 CRI-O:
-
-{{< note >}}
-
-CRI-O 的主要以及次要版本必须与 Kubernetes 的主要和次要版本相匹配。
-更多信息请查阅
-[CRI-O 兼容性列表](https://github.com/cri-o/cri-o#compatibility-matrix-cri-o--kubernetes)。
-{{< /note >}}
+
+要安装 CRI-O,请按照 [CRI-O 安装说明](https://github.com/cri-o/cri-o/blob/main/install.md#readme)执行操作。
+
+
+
+#### cgroup 驱动程序
-安装并配置前置环境:
-```shell
+CRI-O 默认使用 systemd cgroup 驱动程序,这对你来说可能工作得很好。要切换到 `cgroupfs` cgroup 驱动程序,
+请编辑 `/etc/crio/crio.conf` 或在 `/etc/crio/crio.conf.d/02-cgroup-manager.conf` 中放置一个插入式配置 ,例如:
-# 创建 .conf 文件以在启动时加载模块
-cat <}}
-{{% tab name="Debian" %}}
-
-
-在下列操作系统上安装 CRI-O, 使用下表中合适的值设置环境变量 `OS`:
-
-| 操作系统 | `$OS` |
-| ---------------- | ----------------- |
-| Debian Unstable | `Debian_Unstable` |
-| Debian Testing | `Debian_Testing` |
-
-
-然后,将 `$VERSION` 设置为与你的 Kubernetes 相匹配的 CRI-O 版本。
-例如,如果你要安装 CRI-O 1.20, 请设置 `VERSION=1.20`.
-你也可以安装一个特定的发行版本。
-例如要安装 1.20.0 版本,设置 `VERSION=1.20.0:1.20.0`.
-
-
-然后执行
-
-```shell
-cat <
-Then, set `$VERSION` to the CRI-O version that matches your Kubernetes version.
-For instance, if you want to install CRI-O 1.20, set `VERSION=1.20`.
-You can pin your installation to a specific release.
-To install version 1.20.0, set `VERSION=1.20:1.20.0`.
-
-
-Then run
--->
-在下列操作系统上安装 CRI-O, 使用下表中合适的值设置环境变量 `OS`:
-
-| 操作系统 | `$OS` |
-| ---------------- | ----------------- |
-| Ubuntu 20.04 | `xUbuntu_20.04` |
-| Ubuntu 19.10 | `xUbuntu_19.10` |
-| Ubuntu 19.04 | `xUbuntu_19.04` |
-| Ubuntu 18.04 | `xUbuntu_18.04` |
-
-
-然后,将 `$VERSION` 设置为与你的 Kubernetes 相匹配的 CRI-O 版本。
-例如,如果你要安装 CRI-O 1.20, 请设置 `VERSION=1.20`.
-你也可以安装一个特定的发行版本。
-例如要安装 1.20.0 版本,设置 `VERSION=1.20:1.20.0`.
-
-
-然后执行
-
-```shell
-cat <
-Then, set `$VERSION` to the CRI-O version that matches your Kubernetes version.
-For instance, if you want to install CRI-O 1.20, set `VERSION=1.20`.
-You can pin your installation to a specific release.
-To install version 1.20.0, set `VERSION=1.20:1.20.0`.
-
-
-Then run
--->
-在下列操作系统上安装 CRI-O, 使用下表中合适的值设置环境变量 `OS`:
-
-| 操作系统 | `$OS` |
-| ---------------- | ----------------- |
-| Centos 8 | `CentOS_8` |
-| Centos 8 Stream | `CentOS_8_Stream` |
-| Centos 7 | `CentOS_7` |
-
-
-然后,将 `$VERSION` 设置为与你的 Kubernetes 相匹配的 CRI-O 版本。
-例如,如果你要安装 CRI-O 1.20, 请设置 `VERSION=1.20`.
-你也可以安装一个特定的发行版本。
-例如要安装 1.20.0 版本,设置 `VERSION=1.20:1.20.0`.
-
-
-然后执行
-
-```shell
-sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo
-sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo
-sudo yum install cri-o
-```
-
-{{% /tab %}}
-
-{{% tab name="openSUSE Tumbleweed" %}}
-
-```shell
-sudo zypper install cri-o
-```
-{{% /tab %}}
-{{% tab name="Fedora" %}}
-
-
-将 `$VERSION` 设置为与你的 Kubernetes 相匹配的 CRI-O 版本。
-例如,如果要安装 CRI-O 1.20,请设置 `VERSION=1.20`。
-你可以用下列命令查找可用的版本:
-
-```shell
-sudo dnf module list cri-o
-```
-
-CRI-O 不支持在 Fedora 上固定到特定的版本。
-
-然后执行
-
-```shell
-sudo dnf module enable cri-o:$VERSION
-sudo dnf install cri-o --now
-```
-
-{{% /tab %}}
-{{< /tabs >}}
-
-
-启动 CRI-O:
-
-```shell
-sudo systemctl daemon-reload
-sudo systemctl enable crio --now
-```
-
-
-参阅[CRI-O 安装指南](https://github.com/cri-o/cri-o/blob/master/install.md)
-了解进一步的详细信息。
-
-
-#### cgroup 驱动
-
-默认情况下,CRI-O 使用 systemd cgroup 驱动程序。要切换到 `cgroupfs`
-驱动程序,或者编辑 `/ etc / crio / crio.conf` 或放置一个插件
-在 `/etc/crio/crio.conf.d/02-cgroup-manager.conf` 中的配置,例如:
```toml
[crio.runtime]
@@ -620,77 +422,79 @@ conmon_cgroup = "pod"
cgroup_manager = "cgroupfs"
```
-
-另请注意更改后的 `conmon_cgroup`,将 CRI-O 与 `cgroupfs` 一起使用时,
-必须将其设置为 `pod`。通常有必要保持 kubelet 的 cgroup 驱动程序配置
-(通常透过 kubeadm 完成)和 CRI-O 一致。
-
-### Docker
-
-1. 在每个节点上,根据[安装 Docker 引擎](https://docs.docker.com/engine/install/#server)
- 为你的 Linux 发行版安装 Docker。
- 你可以在此文件中找到最新的经过验证的 Docker 版本
- [依赖关系](https://git.k8s.io/kubernetes/build/dependencies.yaml)。
-
-
-2. 配置 Docker 守护程序,尤其是使用 systemd 来管理容器的 cgroup。
-
- ```shell
- sudo mkdir /etc/docker
- cat <}}
-
- 对于运行 Linux 内核版本 4.0 或更高版本,或使用 3.10.0-51 及更高版本的 RHEL
- 或 CentOS 的系统,`overlay2`是首选的存储驱动程序。
- {{< /note >}}
-
-
-3. 重新启动 Docker 并在启动时启用:
- ```shell
- sudo systemctl enable docker
- sudo systemctl daemon-reload
- sudo systemctl restart docker
- ```
+你还应该注意到 `conmon_cgroup` 被更改,当使用 CRI-O 和 `cgroupfs` 时,必须将其设置为值 `pod`。
+通常需要保持 kubelet 的 cgroup 驱动配置(通常通过 kubeadm 完成)和 CRI-O 同步。
+
+
+对于 CRI-O,CRI 套接字默认为 `/var/run/crio/crio.sock`。
+
+### Docker Engine {#docker}
+
+
{{< note >}}
+以下操作假设你使用 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) 适配器来将
+Docker Engine 与 Kubernetes 集成。
+{{< /note >}}
+
+
+1. 在你的每个节点上,遵循[安装 Docker 引擎](https://docs.docker.com/engine/install/#server)指南为你的
+ Linux 发行版安装 Docker。
+
+
-有关更多信息,请参阅
+2. 按照源代码仓库中的说明安装 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)。
+
+
+
+对于 `cri-dockerd`,默认情况下,CRI 套接字是 `/run/cri-dockerd.sock`。
+
+### Mirantis 容器运行时 {#mcr}
+
+
+[Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html) (MCR) 是一种商用容器运行时,以前称为 Docker 企业版。
+你可以使用 MCR 中包含的开源 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) 组件将 Mirantis Container Runtime 与 Kubernetes 一起使用。
+
+
+要了解有关如何安装 Mirantis Container Runtime 的更多信息,请访问 [MCR 部署指南](https://docs.mirantis.com/mcr/20.10/install.html)。
+
+检查名为 `cri-docker.socket` 的 systemd 单元以找出 CRI 套接字的路径。
+
+## {{% heading "whatsnext" %}}
+
+
+
+除了容器运行时,你的集群还需要有效的[网络插件](/zh/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model)。
-- [配置 Docker 守护程序](https://docs.docker.com/config/daemon/)
-- [使用 systemd 控制 Docker](https://docs.docker.com/config/daemon/systemd/)
-{{< /note >}}
diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md b/content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
index e6fa988fc8..cb8fac642f 100644
--- a/content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
+++ b/content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
@@ -1,11 +1,8 @@
---
-reviewers:
-- sig-cluster-lifecycle
title: 使用 kubeadm 创建集群
content_type: task
weight: 30
---
-
-使用 `kubeadm`,你能创建一个符合最佳实践的最小化 Kubernetes 集群。事实上,你可以使用 `kubeadm` 配置一个通过 [Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification) 的集群。
+
+使用 `kubeadm`,你能创建一个符合最佳实践的最小化 Kubernetes 集群。
+事实上,你可以使用 `kubeadm` 配置一个通过
+[Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification)的集群。
`kubeadm` 还支持其他集群生命周期功能,
-例如 [启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/) 和集群升级。
+例如[启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/)和集群升级。
-[Kubernetes 版本及版本偏差策略](/zh/docs/setup/release/version-skew-policy/#supported-versions) 适用于 `kubeadm` 以及整个 Kubernetes。
+[Kubernetes 版本及版本偏差策略](/zh/docs/setup/release/version-skew-policy/#supported-versions)适用于 `kubeadm` 以及整个 Kubernetes。
查阅该策略以了解支持哪些版本的 Kubernetes 和 `kubeadm`。
该页面是为 Kubernetes {{< param "version" >}} 编写的。
@@ -103,7 +107,7 @@ Any commands under `kubeadm alpha` are, by definition, supported on an alpha lev
-## 目标
+## 目标 {#objectives}
-## 操作指南
+## 操作指南 {#instructions}
-### 主机准备
+### 主机准备 {#preparing-the-hosts}
-### 准备所需的容器镜像
+### 准备所需的容器镜像 {#preparing-the-required-container-images}
-### 初始化控制平面节点
+### 初始化控制平面节点 {#initializing-your-control-plane-node}
-### 关于 apiserver-advertise-address 和 ControlPlaneEndpoint 的注意事项
+### 关于 apiserver-advertise-address 和 ControlPlaneEndpoint 的注意事项 {#considerations-about-apiserver-advertise-address-and-controlplaneendpoint}
-### 更多信息
+### 更多信息 {#more-information}
-要使用配置文件配置 `kubeadm init` 命令,请参见[带配置文件使用 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)。
+要使用配置文件配置 `kubeadm init` 命令,
+请参见[带配置文件使用 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)。
-要自定义控制平面组件,包括可选的对控制平面组件和 etcd 服务器的活动探针提供 IPv6 支持,请参阅[自定义参数](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)。
+要自定义控制平面组件,包括可选的对控制平面组件和 etcd 服务器的活动探针提供 IPv6 支持,
+请参阅[自定义参数](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)。
-请参阅实现 [Kubernetes 网络模型](/zh/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model) 的附加组件列表。
+请参阅实现 [Kubernetes 网络模型](/zh/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model)的附加组件列表。
-### 控制平面节点隔离
+### 控制平面节点隔离 {#control-plane-node-isolation}
* SSH 到机器
* 成为 root (例如 `sudo su -`)
-* 运行 `kubeadm init` 输出的命令。例如:
+* 运行 `kubeadm init` 输出的命令,例如:
-```bash
-kubeadm join --token : --discovery-token-ca-cert-hash sha256:
-```
+ ```bash
+ kubeadm join --token : --discovery-token-ca-cert-hash sha256:
+ ```
-默认情况下,令牌会在24小时后过期。如果要在当前令牌过期后将节点加入集群,
+默认情况下,令牌会在 24 小时后过期。如果要在当前令牌过期后将节点加入集群,
则可以通过在控制平面节点上运行以下命令来创建新令牌:
```bash
@@ -715,7 +725,7 @@ with `kubectl -n kube-system rollout restart deployment coredns` after at least
-### (可选)从控制平面节点以外的计算机控制集群
+### (可选)从控制平面节点以外的计算机控制集群 {#optional-controlling-your-cluster-from-machines-other-than-the-control-plane-node}
{{< note >}}
-上面的示例假定为 root 用户启用了SSH访问。如果不是这种情况,
-你可以使用 `scp` 将 admin.conf 文件复制给其他允许访问的用户。
+上面的示例假定为 root 用户启用了 SSH 访问。如果不是这种情况,
+你可以使用 `scp` 将 `admin.conf` 文件复制给其他允许访问的用户。
admin.conf 文件为用户提供了对集群的超级用户特权。
该文件应谨慎使用。对于普通用户,建议生成一个你为其授予特权的唯一证书。
@@ -756,7 +766,7 @@ admin.conf 文件为用户提供了对集群的超级用户特权。
-### (可选)将API服务器代理到本地主机
+### (可选)将 API 服务器代理到本地主机 {#optional-proxying-api-server-to-localhost}
-你现在可以在本地访问API服务器 http://localhost:8001/api/v1
+你现在可以在本地访问 API 服务器 `http://localhost:8001/api/v1`。
-### 删除节点
+### 删除节点 {#remove-the-node}
如果你想重新开始,只需运行 `kubeadm init` 或 `kubeadm join` 并加上适当的参数。
@@ -853,7 +863,7 @@ appropriate arguments.
-### 清理控制平面
+### 清理控制平面 {#clean-up-the-control-plane}
-有关此子命令及其选项的更多信息,请参见[`kubeadm reset`](/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset/)参考文档。
+有关此子命令及其选项的更多信息,请参见 [`kubeadm reset`](/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset/) 参考文档。
@@ -879,7 +889,7 @@ options.
* Verify that your cluster is running properly with [Sonobuoy](https://github.com/heptio/sonobuoy)
* See [Upgrading kubeadm clusters](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
for details about upgrading your cluster using `kubeadm`.
-* Learn about advanced `kubeadm` usage in the [kubeadm reference documentation](/docs/reference/setup-tools/kubeadm)
+* Learn about advanced `kubeadm` usage in the [kubeadm reference documentation](/docs/reference/setup-tools/kubeadm/kubeadm)
* Learn more about Kubernetes [concepts](/docs/concepts/) and [`kubectl`](/docs/reference/kubectl/).
* See the [Cluster Networking](/docs/concepts/cluster-administration/networking/) page for a bigger list
of Pod network add-ons.
@@ -893,8 +903,8 @@ options.
-->
* 使用 [Sonobuoy](https://github.com/heptio/sonobuoy) 验证集群是否正常运行。
* 有关使用 kubeadm 升级集群的详细信息,请参阅[升级 kubeadm 集群](/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)。
-* 在 [kubeadm 参考文档](/zh/docs/reference/setup-tools/kubeadm)中了解有关高级 `kubeadm` 用法的信息。
-* 了解有关 Kubernetes [概念](/zh/docs/concepts/)和 [`kubectl`](/zh/docs/reference/kubectl/) 的更多信息。
+* 在 [kubeadm 参考文档](/zh/docs/reference/setup-tools/kubeadm/kubeadm)中了解有关 `kubeadm` 进阶用法的信息。
+* 了解有关 Kubernetes [概念](/zh/docs/concepts/)和 [`kubectl`](/zh/docs/reference/kubectl/)的更多信息。
* 有关 Pod 网络附加组件的更多列表,请参见[集群网络](/zh/docs/concepts/cluster-administration/networking/)页面。
* 请参阅[附加组件列表](/zh/docs/concepts/cluster-administration/addons/)以探索其他附加组件,
包括用于 Kubernetes 集群的日志记录,监视,网络策略,可视化和控制的工具。
@@ -917,8 +927,8 @@ options.
* SIG Cluster Lifecycle mailing list:
[kubernetes-sig-cluster-lifecycle](https://groups.google.com/forum/#!forum/kubernetes-sig-cluster-lifecycle)
-->
-* 有关 bugs, 访问 [kubeadm GitHub issue tracker](https://github.com/kubernetes/kubeadm/issues)
-* 有关支持, 访问
+* 有关漏洞,访问 [kubeadm GitHub issue tracker](https://github.com/kubernetes/kubeadm/issues)
+* 有关支持,访问
[#kubeadm](https://kubernetes.slack.com/messages/kubeadm/) Slack 频道
* General SIG 集群生命周期开发 Slack 频道:
[#sig-cluster-lifecycle](https://kubernetes.slack.com/messages/sig-cluster-lifecycle/)
@@ -942,7 +952,7 @@ match the kubeadm version with the versions of the control plane components, kub
### kubeadm's skew against the Kubernetes version
-->
-### kubeadm 中的 Kubernetes 版本偏差
+### kubeadm 中的 Kubernetes 版本偏差 {#kubeadm-s-skew-against-the-kubernetes-version}
-### kubeadm 中 kubelet 的版本偏差
+### kubeadm 中 kubelet 的版本偏差 {#kubeadm-s-skew-against-the-kubelet}
-### kubeadm 支持的 kubeadm 的版本偏差
+### kubeadm 支持的 kubeadm 的版本偏差 {#kubeadm-s-skew-against-kubeadm}
-`kubeadm upgrade`的例子:
+`kubeadm upgrade` 的例子:
* 用于创建或升级节点的 kubeadm 版本为 {{< skew prevMinorVersion >}}。
* 用于升级节点的 kubeadm 版本必须为 {{< skew prevMinorVersion >}} 或 {{< skew latestVersion >}}。
@@ -1064,7 +1074,7 @@ data and may need to be recreated from scratch.
-解决方法:
+解决方法:
* 使用多个控制平面节点。你可以阅读
- [可选的高可用性拓扑](/zh/docs/setup/production-environment/tools/kubeadm/ha-topology/) 选择集群拓扑提供的
- [高可用性](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/).
+ [可选的高可用性拓扑](/zh/docs/setup/production-environment/tools/kubeadm/ha-topology/)选择集群拓扑提供的
+ [高可用性](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/)。
-kubeadm deb/rpm 软件包和二进制文件是为 amd64,arm (32-bit),arm64,ppc64le 和 s390x 构建的遵循[多平台提案](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/multi-platform.md)。
+kubeadm deb/rpm 软件包和二进制文件是为 amd64、arm (32-bit)、arm64、ppc64le 和 s390x 构建的遵循[多平台提案](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/multi-platform.md)。
-本页面介绍了配置高可用(HA) Kubernetes 集群拓扑的两个选项。
+本页面介绍了配置高可用(HA)Kubernetes 集群拓扑的两个选项。
在设置 HA 集群之前,你应该仔细考虑每种拓扑的优缺点。
+{{< note >}}
-
-{{< note >}}
-kubeadm 静态引导 etcd 集群。
+kubeadm 静态引导 etcd 集群。
阅读 etcd [集群指南](https://github.com/etcd-io/etcd/blob/release-3.4/Documentation/op-guide/clustering.md#static)以获得更多详细信息。
{{< /note >}}
@@ -55,18 +51,20 @@ kubeadm 静态引导 etcd 集群。
-## 堆叠(Stacked) etcd 拓扑
+## 堆叠(Stacked)etcd 拓扑 {#stacked-etcd-topology}
-堆叠(Stacked) HA 集群是一种这样的[拓扑](https://en.wikipedia.org/wiki/Network_topology),
+堆叠(Stacked)HA 集群是一种这样的[拓扑](https://en.wikipedia.org/wiki/Network_topology),
其中 etcd 分布式数据存储集群堆叠在 kubeadm 管理的控制平面节点上,作为控制平面的一个组件运行。
-每个控制平面节点运行 `kube-apiserver`,`kube-scheduler` 和 `kube-controller-manager` 实例。
+每个控制平面节点运行 `kube-apiserver`、`kube-scheduler` 和 `kube-controller-manager` 实例。
@@ -81,13 +79,15 @@ and `kube-scheduler` instances.
这同样适用于本地 `kube-controller-manager` 和 `kube-scheduler` 实例。
-这种拓扑将控制平面和 etcd 成员耦合在同一节点上。相对使用外部 etcd 集群 ,
+这种拓扑将控制平面和 etcd 成员耦合在同一节点上。相对使用外部 etcd 集群,
设置起来更简单,而且更易于副本管理。
然而,堆叠集群存在耦合失败的风险。如果一个节点发生故障,则 etcd 成员和控制平面实例都将丢失,
并且冗余会受到影响。你可以通过添加更多控制平面节点来降低此风险。
@@ -112,31 +112,33 @@ on control plane nodes when using `kubeadm init` and `kubeadm join --control-pla
-## 外部 etcd 拓扑
+## 外部 etcd 拓扑 {#external-etcd-topology}
-具有外部 etcd 的 HA 集群是一种这样的[拓扑](https://en.wikipedia.org/wiki/Network_topology),
+具有外部 etcd 的 HA 集群是一种这样的[拓扑](https://zh.wikipedia.org/wiki/%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91),
其中 etcd 分布式数据存储集群在独立于控制平面节点的其他节点上运行。
就像堆叠的 etcd 拓扑一样,外部 etcd 拓扑中的每个控制平面节点都运行 `kube-apiserver`,`kube-scheduler` 和 `kube-controller-manager` 实例。
-同样,`kube-apiserver` 使用负载均衡器暴露给工作节点。但是,etcd 成员在不同的主机上运行,
+同样,`kube-apiserver` 使用负载均衡器暴露给工作节点。但是 etcd 成员在不同的主机上运行,
每个 etcd 主机与每个控制平面节点的 `kube-apiserver` 通信。
-这种拓扑结构解耦了控制平面和 etcd 成员。因此,它提供了一种 HA 设置,
+这种拓扑结构解耦了控制平面和 etcd 成员。因此它提供了一种 HA 设置,
其中失去控制平面实例或者 etcd 成员的影响较小,并且不会像堆叠的 HA 拓扑那样影响集群冗余。
-但是,此拓扑需要两倍于堆叠 HA 拓扑的主机数量。
+但此拓扑需要两倍于堆叠 HA 拓扑的主机数量。
@@ -152,6 +154,6 @@ A minimum of three hosts for control plane nodes and three hosts for etcd nodes
- - [使用 kubeadm 设置高可用集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/)
+- [使用 kubeadm 设置高可用集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/)
diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md b/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md
index 9b694bef41..72ef69743e 100644
--- a/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md
+++ b/content/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration.md
@@ -1,6 +1,4 @@
---
-reviewers:
-- sig-cluster-lifecycle
title: 使用 kubeadm 配置集群中的每个 kubelet
content_type: concept
weight: 80
@@ -17,13 +15,13 @@ weight: 80
{{% dockershim-removal %}}
-{{< feature-state for_k8s_version="1.11" state="stable" >}}
+{{< feature-state for_k8s_version="v1.11" state="stable" >}}
+## Kubelet 配置模式 {#kubelet-configuration-patterns}
+
-## Kubelet 配置模式
-
以下各节讲述了通过使用 kubeadm 简化 kubelet 配置模式,而不是在每个节点上手动地管理 kubelet 配置。
+### 将集群级配置传播到每个 kubelet 中 {#propagating-cluster-level-configuration-to-each-kubelet}
+
+你可以通过 `kubeadm init` 和 `kubeadm join` 命令为 kubelet 提供默认值。
+有趣的示例包括使用其他容器运行时或通过服务器设置不同的默认子网。
+
+如果你想使用子网 `10.96.0.0/12` 作为服务的默认网段,你可以给 kubeadm 传递 `--service-cidr` 参数:
```bash
kubeadm init --service-cidr 10.96.0.0/12
```
+
-### 将集群级配置传播到每个 kubelet 中
-
-你可以通过使用 `kubeadm init` 和 `kubeadm join` 命令为 kubelet 提供默认值。
-有趣的示例包括使用其他容器运行时或通过服务器设置不同的默认子网。
-
-如果你想使用子网 `10.96.0.0/12` 作为services的默认网段,你可以给 kubeadm 传递 `--service-cidr` 参数:
-
-```bash
-kubeadm init --service-cidr 10.96.0.0/12
-```
-
现在,可以从该子网分配服务的虚拟 IP。
你还需要通过 kubelet 使用 `--cluster-dns` 标志设置 DNS 地址。
在集群中的每个管理器和节点上的 kubelet 的设置需要相同。
@@ -118,14 +106,23 @@ clusterDNS:
- 10.96.0.10
```
-有关 `KubeletConfiguration` 的更多详细信息,亲参阅[本节](#configure-kubelets-using-kubeadm)。
+
+有关 `KubeletConfiguration` 的更多详细信息,请参阅[本节](#configure-kubelets-using-kubeadm)。
+### 提供特定于某实例的配置细节 {#providing-instance-specific-configuration-details}
+由于硬件、操作系统、网络或者其他主机特定参数的差异。某些主机需要特定的 kubelet 配置。
+以下列表提供了一些示例。
+
+
-### 提供指定实例的详细配置信息
-
-由于硬件、操作系统、网络或者其他主机特定参数的差异。某些主机需要特定的 kubelet 配置。
-以下列表提供了一些示例。
-
- 由 kubelet 配置标志 `--resolv-conf` 指定的 DNS 解析文件的路径在操作系统之间可能有所不同,
它取决于你是否使用 `systemd-resolved`。
如果此路径错误,则在其 kubelet 配置错误的节点上 DNS 解析也将失败。
@@ -177,7 +169,7 @@ Also have a look at the
[reference for the KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/)
for more information on the individual fields.
-->
-## 使用 kubeadm 配置 kubelet
+## 使用 kubeadm 配置 kubelet {#configure-kubelets-using-kubeadm}
如果自定义的 `KubeletConfiguration` API 对象使用像 `kubeadm ... --config some-config-file.yaml` 这样的配置文件进行传递,则可以配置 kubeadm 启动的 kubelet。
@@ -189,7 +181,10 @@ for more information on the individual fields.
+### 使用 `kubeadm init` 时的工作流程 {#workflow-when-using-kubeadm-init}
+
-### 当使用 `kubeadm init`时的工作流程
-
当调用 `kubeadm init` 时,kubelet 的配置会被写入磁盘 `/var/lib/kubelet/config.yaml`,
-并上传到集群 `kubee-system` 命名空间的 `kubelet-config` ConfigMap。
+并上传到集群 `kube-system` 命名空间的 `kubelet-config` ConfigMap。
kubelet 配置信息也被写入 `/etc/kubernetes/kubelet.conf`,其中包含集群内所有 kubelet 的基线配置。
此配置文件指向允许 kubelet 与 API 服务器通信的客户端证书。
这解决了[将集群级配置传播到每个 kubelet](#propagating-cluster-level-configuration-to-each-kubelet) 的需求。
-该文档 [提供特定实例的配置详细信息](#providing-instance-specific-configuration-details) 是第二种解决模式,
-kubeadm 将环境文件写入 `/var/lib/kubelet/kubeadm-flags.env`,其中包含了一个标志列表,
+
+针对[为特定实例提供配置细节](#providing-instance-specific-configuration-details)的第二种模式,
+kubeadm 的解决方法是将环境文件写入 `/var/lib/kubelet/kubeadm-flags.env`,其中包含了一个标志列表,
当 kubelet 启动时,该标志列表会传递给 kubelet 标志在文件中的显示方式如下:
```bash
KUBELET_KUBEADM_ARGS="--flag1=value1 --flag2=value2 ..."
```
-除了启动 kubelet 时使用该标志外,该文件还包含动态参数,例如 cgroup 驱动程序以及是否使用其他容器运行时 socket(`--cri-socket`)。
+
+除了启动 kubelet 时所使用的标志外,该文件还包含动态参数,例如 cgroup 驱动程序以及是否使用其他容器运行时套接字(`--cri-socket`)。
+
将这两个文件编组到磁盘后,如果使用 systemd,则 kubeadm 尝试运行以下两个命令:
```bash
systemctl daemon-reload && systemctl restart kubelet
```
+
如果重新加载和重新启动成功,则正常的 `kubeadm init` 工作流程将继续。
-### 当使用 `kubeadm join`时的工作流程
+### 使用 `kubeadm join` 时的工作流程 {#workflow-when-using-kubeadm-join}
当运行 `kubeadm join` 时,kubeadm 使用 Bootstrap Token 证书执行 TLS 引导,该引导会获取一份证书,
该证书需要下载 `kubelet-config` ConfigMap 并把它写入 `/var/lib/kubelet/config.yaml` 中。
@@ -288,10 +277,17 @@ Kubeadm 在完成 TLS 引导过程后将删除 `/etc/kubernetes/bootstrap-kubele
+## kubelet 的 systemd drop-in 文件 {#the-kubelet-drop-in-file-for-systemd}
+
+`kubeadm` 中附带了有关系统如何运行 kubelet 的 systemd 配置文件。
+请注意 kubeadm CLI 命令不会修改此文件。
+
+通过 `kubeadm` [DEB 包](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf)
+或者 [RPM 包](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubeadm/10-kubeadm.conf)
+安装的配置文件被写入 `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` 并由 systemd 使用。
+它对原来的 [RPM 版本 `kubelet.service`](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubelet/kubelet.service)
+或者 [DEB 版本 `kubelet.service`](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service)
+作了增强:
+
+{{< note >}}
+下面的内容只是一个例子。如果你不想使用包管理器,
+请遵循[没有包管理器](/zh/docs/setup/productionenvironment/tools/kubeadm/install-kubeadm/#k8s-install-2))
+章节的指南。
+{{< /note >}}
+
-## kubelet 的 systemd 文件 {#the-kubelet-drop-in-file-for-systemd}
-
-`kubeadm` 中附带了有关系统如何运行 kubelet 的 systemd 配置文件。
-请注意 kubeadm CLI 命令不会修改此文件。
-
-通过 `kubeadm` [DEB](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf)
-或者 [RPM 包](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubeadm/10-kubeadm.conf)
-安装的配置文件被写入 `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf` 并由系统使用。
-它对原来的 [RPM 版本 `kubelet.service`](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/rpm/kubelet/kubelet.service)
-或者 [DEB 版本 `kubelet.service`](https://github.com/kubernetes/release/blob/master/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service)
-作了增强:
-
-{{< note >}}
-下面的内容只是一个例子。 如果你不想使用包管理器,
-请遵循[没有包管理器](/zh/docs/setup/productionenvironment/tools/kubeadm/install-kubeadm/#k8s-install-2))
-部分中叙述的指南。
-{{< /note >}}
-
```none
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
@@ -364,8 +346,21 @@ ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
```
-该文件为 kubelet 指定由 kubeadm 管理的所有文件的默认位置。
+
+此文件指定由 kubeadm 为 kubelet 管理的所有文件的默认位置。
+
- 用于 TLS 引导程序的 KubeConfig 文件为 `/etc/kubernetes/bootstrap-kubelet.conf`,
但仅当 `/etc/kubernetes/kubelet.conf` 不存在时才能使用。
- 具有唯一 kubelet 标识的 KubeConfig 文件为 `/etc/kubernetes/kubelet.conf`。
@@ -377,24 +372,26 @@ ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELE
-## Kubernetes 可执行文件和软件包内容
+## Kubernetes 可执行文件和软件包内容 {#kubernetes-binaries-and-package-contents}
+
Kubernetes 版本对应的 DEB 和 RPM 软件包是:
+
+| 软件包名称 | 描述 |
+|--------------|-------------|
+| `kubeadm` | 给 kubelet 安装 `/usr/bin/kubeadm` CLI 工具和 [kubelet 的 systemd drop-in 文件](#the-kubelet-drop-in-file-for-systemd)。 |
| `kubelet` | 安装 `/usr/bin/kubelet` 可执行文件。 |
| `kubectl` | 安装 `/usr/bin/kubectl` 可执行文件。 |
| `cri-tools` | 从 [cri-tools git 仓库](https://github.com/kubernetes-sigs/cri-tools)中安装 `/usr/bin/crictl` 可执行文件。 |
diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md b/content/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md
index a8d35215da..e7a0bf7be2 100644
--- a/content/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md
+++ b/content/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm.md
@@ -21,7 +21,8 @@ If your problem is not listed below, please follow the following steps:
- Go to [github.com/kubernetes/kubeadm](https://github.com/kubernetes/kubeadm/issues) and search for existing issues.
- If no issue exists, please [open one](https://github.com/kubernetes/kubeadm/issues/new) and follow the issue template.
-- If you are unsure about how kubeadm works, you can ask on [Slack](http://slack.k8s.io/) in #kubeadm, or open a question on [StackOverflow](https://stackoverflow.com/questions/tagged/kubernetes). Please include
+- If you are unsure about how kubeadm works, you can ask on [Slack](https://slack.k8s.io/) in `#kubeadm`,
+ or open a question on [StackOverflow](https://stackoverflow.com/questions/tagged/kubernetes). Please include
relevant tags like `#kubernetes` and `#kubeadm` so folks can help you.
-->
与任何程序一样,你可能会在安装或者运行 kubeadm 时遇到错误。
@@ -33,12 +34,73 @@ If your problem is not listed below, please follow the following steps:
- 转到 [github.com/kubernetes/kubeadm](https://github.com/kubernetes/kubeadm/issues) 并搜索存在的问题。
- 如果没有问题,请 [打开](https://github.com/kubernetes/kubeadm/issues/new) 并遵循问题模板。
-- 如果你对 kubeadm 的工作方式有疑问,可以在 [Slack](https://slack.k8s.io/) 上的 #kubeadm 频道提问,
+- 如果你对 kubeadm 的工作方式有疑问,可以在 [Slack](https://slack.k8s.io/) 上的 `#kubeadm` 频道提问,
或者在 [StackOverflow](https://stackoverflow.com/questions/tagged/kubernetes) 上提问。
请加入相关标签,例如 `#kubernetes` 和 `#kubeadm`,这样其他人可以帮助你。
+
+## 由于缺少 RBAC,无法将 v1.18 Node 加入 v1.17 集群
+
+
+自从 v1.18 后,如果集群中已存在同名 Node,kubeadm 将禁止 Node 加入集群。
+这需要为 bootstrap-token 用户添加 RBAC 才能 GET Node 对象。
+
+但这会导致一个问题,v1.18 的 `kubeadm join` 无法加入由 kubeadm v1.17 创建的集群。
+
+
+要解决此问题,你有两种选择:
+
+使用 kubeadm v1.18 在控制平面节点上执行 `kubeadm init phase bootstrap-token`。
+请注意,这也会启用 bootstrap-token 的其余权限。
+
+或者,也可以使用 `kubectl apply -f ...` 手动应用以下 RBAC:
+
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: kubeadm:get-nodes
+rules:
+- apiGroups:
+ - ""
+ resources:
+ - nodes
+ verbs:
+ - get
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: kubeadm:get-nodes
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: kubeadm:get-nodes
+subjects:
+- apiGroup: rbac.authorization.k8s.io
+ kind: Group
+ name: system:bootstrappers:kubeadm:default-node-token
+```
+
## 当删除托管容器时 kubeadm 阻塞
@@ -169,7 +231,7 @@ Right after `kubeadm init` there should not be any pods in these states.
直到你部署了网络插件为止。
- 如果在部署完网络插件之后,有 Pods 处于 `RunContainerError`、`CrashLoopBackOff`
- 或 `Error` 状态之一,并且`coredns` (或者 `kube-dns`)仍处于 `Pending` 状态,
+ 或 `Error` 状态之一,并且 `coredns` (或者 `kube-dns`)仍处于 `Pending` 状态,
那很可能是你安装的网络插件由于某种原因无法工作。你或许需要授予它更多的
RBAC 特权或使用较新的版本。请在 Pod Network 提供商的问题跟踪器中提交问题,
然后在此处分类问题。
@@ -177,7 +239,7 @@ Right after `kubeadm init` there should not be any pods in these states.
- 如果你安装的 Docker 版本早于 1.12.1,请在使用 `systemd` 来启动 `dockerd` 和重启 `docker` 时,
删除 `MountFlags=slave` 选项。
你可以在 `/usr/lib/systemd/system/docker.service` 中看到 MountFlags。
- MountFlags 可能会干扰 Kubernetes 挂载的卷, 并使 Pods 处于 `CrashLoopBackOff` 状态。
+ MountFlags 可能会干扰 Kubernetes 挂载的卷,并使 Pods 处于 `CrashLoopBackOff` 状态。
当 Kubernetes 不能找到 `var/run/secrets/kubernetes.io/serviceaccount` 文件时会发生错误。
-
+
## 在 Vagrant 中使用 flannel 作为 pod 网络时的默认 NIC
以下错误可能表明 Pod 网络中出现问题:
@@ -410,9 +472,9 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
```
- This may be due to Kubernetes using an IP that can not communicate with other IPs on the seemingly same subnet, possibly by policy of the machine provider.
-- Digital Ocean assigns a public IP to `eth0` as well as a private one to be used internally as anchor for their floating IP feature, yet `kubelet` will pick the latter as the node's `InternalIP` instead of the public one.
+- DigitalOcean assigns a public IP to `eth0` as well as a private one to be used internally as anchor for their floating IP feature, yet `kubelet` will pick the latter as the node's `InternalIP` instead of the public one.
- Use `ip addr show` to check for this scenario instead of `ifconfig` because `ifconfig` will not display the offending alias IP address. Alternatively an API endpoint specific to Digital Ocean allows to query for the anchor IP from the droplet:
+ Use `ip addr show` to check for this scenario instead of `ifconfig` because `ifconfig` will not display the offending alias IP address. Alternatively an API endpoint specific to DigitalOcean allows to query for the anchor IP from the droplet:
```sh
curl http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address
@@ -442,18 +504,18 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
- 这或许是由于 Kubernetes 使用的 IP 无法与看似相同的子网上的其他 IP 进行通信的缘故,
可能是由机器提供商的政策所导致的。
-- Digital Ocean 既分配一个共有 IP 给 `eth0`,也分配一个私有 IP 在内部用作其浮动 IP 功能的锚点,
+- DigitalOcean 既分配一个共有 IP 给 `eth0`,也分配一个私有 IP 在内部用作其浮动 IP 功能的锚点,
然而 `kubelet` 将选择后者作为节点的 `InternalIP` 而不是公共 IP
使用 `ip addr show` 命令代替 `ifconfig` 命令去检查这种情况,因为 `ifconfig` 命令
- 不会显示有问题的别名 IP 地址。或者指定的 Digital Ocean 的 API 端口允许从 droplet 中
+ 不会显示有问题的别名 IP 地址。或者指定的 DigitalOcean 的 API 端口允许从 droplet 中
查询 anchor IP:
```sh
curl http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address
```
- 解决方法是通知 `kubelet` 使用哪个 `--node-ip`。当使用 Digital Ocean 时,可以是公网IP(分配给 `eth0`的),
+ 解决方法是通知 `kubelet` 使用哪个 `--node-ip`。当使用 DigitalOcean 时,可以是公网IP(分配给 `eth0` 的),
或者是私网IP(分配给 `eth1` 的)。私网 IP 是可选的。
[kubadm `NodeRegistrationOptions` 结构](/zh/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-NodeRegistrationOptions)
的 `KubeletExtraArgs` 部分被用来处理这种情况。
@@ -535,7 +597,7 @@ yum downgrade docker-1.13.1-75.git8633870.el7.centos.x86_64 docker-client-1.13.1
- Install one of the more recent recommended versions, such as 18.06:
```bash
-sudo yum-config-manager -add-repo https://download.docker.com/linux/centos/docker-ce.repo
+sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce-18.06.1.ce-3.el7.x86_64
```
-->
@@ -573,13 +635,13 @@ component like the kube-apiserver. However, this mechanism is limited due to the
the values (`mapStringString`).
If you decide to pass an argument that supports multiple, comma-separated values such as
-`-apiserver-extra-args "enable-admission-plugins=LimitRanger,NamespaceExists"` this flag will fail with
+`--apiserver-extra-args "enable-admission-plugins=LimitRanger,NamespaceExists"` this flag will fail with
`flag: malformed pair, expect string=string`. This happens because the list of arguments for
-`-apiserver-extra-args` expects `key=value` pairs and in this case `NamespacesExists` is considered
+`--apiserver-extra-args` expects `key=value` pairs and in this case `NamespacesExists` is considered
as a key that is missing a value.
Alternatively, you can try separating the `key=value` pairs like so:
-`-apiserver-extra-args "enable-admission-plugins=LimitRanger,enable-admission-plugins=NamespaceExists"`
+`--apiserver-extra-args "enable-admission-plugins=LimitRanger,enable-admission-plugins=NamespaceExists"`
but this will result in the key `enable-admission-plugins` only having the value of `NamespaceExists`.
A known workaround is to use the kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/).
@@ -673,9 +735,9 @@ To workaround this issue you can configure the flex-volume directory using the k
On the primary control-plane Node (created using `kubeadm init`) pass the following
file using `--config`:
-->
-为了解决这个问题,你可以使用 kubeadm 的[配置文件](/docs/reference/config-api/kubeadm-config.v1beta3/) 来配置 FlexVolume 的目录。
+为了解决这个问题,你可以使用 kubeadm 的[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta3/) 来配置 FlexVolume 的目录。
-在(使用 `kubeadm init` 创建的)主控制节点上,使用 `-config`
+在(使用 `kubeadm init` 创建的)主控制节点上,使用 `--config`
参数传入如下文件:
```yaml
@@ -781,4 +843,4 @@ Also see [How to run the metrics-server securely](https://github.com/kubernetes-
参见[为 kubelet 启用签名的服务证书](/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#kubelet-serving-certs)
以进一步了解如何在 kubeadm 集群中配置 kubelet 使用正确签名了的服务证书。
-另请参阅[How to run the metrics-server securely](https://github.com/kubernetes-sigs/metrics-server/blob/master/FAQ.md#how-to-run-metrics-server-securely)。
+另请参阅 [How to run the metrics-server securely](https://github.com/kubernetes-sigs/metrics-server/blob/master/FAQ.md#how-to-run-metrics-server-securely)。
diff --git a/content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md b/content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md
index 3fcbb64e20..c4a28a707c 100644
--- a/content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md
+++ b/content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md
@@ -31,7 +31,7 @@ Windows 应用程序构成了许多组织中运行的服务和应用程序的很
* Configure an example deployment to run Windows containers on the Windows node
* (Optional) Configure an Active Directory Identity for your Pod using Group Managed Service Accounts (GMSA)
-->
-## 目标
+## 目标 {#objectives}
* 配置一个示例 deployment 以在 Windows 节点上运行 Windows 容器
* (可选)使用组托管服务帐户(GMSA)为你的 Pod 配置 Active Directory 身份
@@ -46,13 +46,13 @@ behaves in much the same way for Linux and Windows containers.
[Kubectl commands](/docs/reference/kubectl/) to interface with the cluster are identical.
The example in the section below is provided to jumpstart your experience with Windows containers.
-->
-## 在你开始之前
+## 在你开始之前 {#before-you-begin}
* 创建一个 Kubernetes 集群,其中包括一个控制平面和
[运行 Windows 服务器的工作节点](/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/)
* 重要的是要注意,对于 Linux 和 Windows 容器,在 Kubernetes
上创建和部署服务和工作负载的行为几乎相同。
- 与集群接口的 [kubectl 命令](/zh/docs/reference/kubectl/overview/)相同。
+ 与集群接口的 [kubectl 命令](/zh/docs/reference/kubectl/)相同。
提供以下部分中的示例只是为了快速启动 Windows 容器的使用体验。
-## 入门:部署 Windows 容器
+## 入门:部署 Windows 容器 {#getting-started-deploying-a-windows-container}
要在 Kubernetes 上部署 Windows 容器,你必须首先创建一个示例应用程序。
下面的示例 YAML 文件创建了一个简单的 Web 服务器应用程序。
@@ -163,13 +163,13 @@ the container port 80 is exposed directly to the service.
kubectl get pods -o wide -w
```
- 正确部署服务后,两个 Pod 都标记为“Ready”。要退出 watch 命令,请按 Ctrl + C。
+ 正确部署服务后,两个 Pod 都标记为 “Ready”。要退出 watch 命令,请按 Ctrl + C。
1. 检查部署是否成功。验证:
* Windows 节点上每个 Pod 有两个容器,使用 `docker ps`
* Linux 控制平面节点列出两个 Pod,使用 `kubectl get pods`
- * 跨网络的节点到 Pod 通信,从 Linux 控制平面节点 `curl` 你的 pod IPs 的端口80,以检查 Web 服务器响应
+ * 跨网络的节点到 Pod 通信,从 Linux 控制平面节点 `curl` 你的 pod IPs 的端口 80,以检查 Web 服务器响应
* Pod 到 Pod 的通信,使用 docker exec 或 kubectl exec 在 Pod 之间
(以及跨主机,如果你有多个 Windows 节点)进行 ping 操作
* 服务到 Pod 的通信,从 Linux 控制平面节点和各个 Pod 中 `curl` 虚拟服务 IP
@@ -194,7 +194,7 @@ Only Windows pods are able to access service IPs.
-->
## 可观测性 {#observability}
-### 抓取来自工作负载的日志
+### 抓取来自工作负载的日志 {#capturing-logs-from-workloads}
-## 使用可配置的容器用户名
+## 使用可配置的容器用户名 {#using-configurable-container-usernames}
从 Kubernetes v1.16 开始,可以为 Windows 容器配置与其镜像默认值不同的用户名
来运行其入口点和进程。
@@ -255,7 +255,7 @@ simplified service principal name (SPN) management, and the ability to delegate
Containers configured with a GMSA can access external Active Directory Domain resources while carrying the identity configured with the GMSA.
Learn more about configuring and using GMSA for Windows containers [here](/docs/tasks/configure-pod-container/configure-gmsa/).
-->
-## 使用组托管服务帐户管理工作负载身份
+## 使用组托管服务帐户管理工作负载身份 {#managing-workload-identity-with-group-managed-service-accounts}
从 Kubernetes v1.14 开始,可以将 Windows 容器工作负载配置为使用组托管服务帐户(GMSA)。
组托管服务帐户是 Active Directory 帐户的一种特定类型,它提供自动密码管理,
@@ -267,7 +267,7 @@ Windows 容器配置和使用 GMSA 的更多信息。
-## 污点和容忍度
+## 污点和容忍度 {#taints-and-tolerations}
目前,用户需要将 Linux 和 Windows 工作负载运行在各自特定的操作系统的节点上,
-因而需要结合使用污点和节点选择算符。 这可能仅给 Windows 用户造成不便。
+因而需要结合使用污点和节点选择算符。这可能仅给 Windows 用户造成不便。
推荐的方法概述如下,其主要目标之一是该方法不应破坏与现有 Linux 工作负载的兼容性。
如果 `IdentifyPodOS` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)是启用的,
你可以(并且应该)为 Pod 设置 `.spec.os.name` 以表明该 Pod
-中的容器所针对的操作系统。 对于运行 Linux 容器的 Pod,设置
-`.spec.os.name` 为 `linux`。 对于运行 Windows 容器的 Pod,设置 `.spec.os.name`
+中的容器所针对的操作系统。对于运行 Linux 容器的 Pod,设置
+`.spec.os.name` 为 `linux`。对于运行 Windows 容器的 Pod,设置 `.spec.os.name`
为 `Windows`。
{{< note >}}
@@ -317,7 +318,7 @@ so taints and tolerations and node selectors are still required
-### 确保特定操作系统的工作负载落在适当的容器主机上
+### 确保特定操作系统的工作负载落在适当的容器主机上 {#ensuring-os-specific-workloads-land-on-the-appropriate-container-host}
-### 处理同一集群中的多个 Windows 版本
+### 处理同一集群中的多个 Windows 版本 {#handling-multiple-windows-versions-in-the-same-cluster}
-Kubernetes 1.17 自动添加了一个新标签 `node.kubernetes.io/windows-build` 来简化此操作。
+Kubernetes 1.17 自动添加了一个新标签 `node.kubernetes.io/windows-build` 来简化此操作。
如果你运行的是旧版本,则建议手动将此标签添加到 Windows 节点。
-### 使用 RuntimeClass 简化
+### 使用 RuntimeClass 简化 {#simplifying-with-runtimeclass}
这一输出显示了用 proxy 动词访问每个服务时可用的 URL。例如,此集群
(使用 Elasticsearch)启用了集群层面的日志。如果提供合适的凭据,可以通过
-`https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`
+`https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`
访问,或通过一个 `kubectl proxy` 来访问:
`http://localhost:8080/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`。
@@ -191,7 +191,7 @@ URL 的 `` 段支持的格式为:
* 如要访问 Elasticsearch 服务末端 `_search?q=user:kimchy`,你可以使用:
```
- http://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_search?q=user:kimchy
+ http://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_search?q=user:kimchy
```
-## 使用 kubectl 完成集群的第一次访问
+## 使用 kubectl 完成集群的第一次访问 {#accessing-for-the-first-time-with-kubectl}
-当你第一次访问 Kubernetes API 的时候,我们建议你使用 Kubernetes CLI,`kubectl`。
+当你第一次访问 Kubernetes API 的时候,我们建议你使用 Kubernetes CLI 工具 `kubectl`。
访问集群时,你需要知道集群的地址并且拥有访问的凭证。通常,这些在你通过
[启动安装](/zh/docs/setup/)安装集群时都是自动安装好的,或者其他人安装时
@@ -49,11 +49,12 @@ kubectl config view
```
-有许多 [例子](/zh/docs/reference/kubectl/cheatsheet/) 介绍了如何使用 kubectl,
-可以在 [kubectl 参考](/zh/docs/reference/kubectl/overview/) 中找到更完整的文档。
+有许多[例子](/zh/docs/reference/kubectl/cheatsheet/)介绍了如何使用 kubectl,
+可以在 [kubectl 参考](/zh/docs/reference/kubectl/)中找到更完整的文档。
-## 直接访问 REST API
+## 直接访问 REST API {#directly-accessing-the-rest-api}
Kubectl 处理 apiserver 的定位和身份验证。
如果要使用 curl 或 wget 等 http 客户端或浏览器直接访问 REST API,可以通过
@@ -97,13 +98,13 @@ The following command runs kubectl in a mode where it acts as a reverse proxy.
locating the apiserver and authenticating.
Run it like this:
-->
-### 使用 kubectl proxy
+### 使用 kubectl proxy {#using-kubectl-proxy}
以下命令以反向代理的模式运行 kubectl。它处理 apiserver 的定位和验证。
像这样运行:
```shell
-kubectl proxy --port=8080 &
+kubectl proxy --port=8080
```
+输出类似于:
+
```json
{
"kind": "APIVersions",
@@ -139,18 +146,18 @@ curl http://localhost:8080/api/
-### 不使用 kubectl proxy
+### 不使用 kubectl proxy {#without-kubectl-proxy}
-在 Kubernetes 1.3 或更高版本中,`kubectl config view` 不再显示 token。
使用 `kubectl apply` 和 `kubectl describe secret ...` 及 grep 和剪切操作来为 default 服务帐户创建令牌,如下所示:
-`grep/cut` 方法实现:
+
首先,创建 Secret,请求默认 ServiceAccount 的令牌:
+
```shell
kubectl apply -f - <
接下来,等待令牌控制器使用令牌填充 Secret:
+
```shell
while ! kubectl describe secret default-token | grep -E '^token' >/dev/null; do
echo "waiting for token..." >&2
@@ -176,12 +182,22 @@ while ! kubectl describe secret default-token | grep -E '^token' >/dev/null; do
done
```
+
捕获并使用生成的令牌:
+
```shell
-APISERVER=$(kubectl config view | grep server | cut -f 2- -d ":" | tr -d " ")
-TOKEN=$(kubectl describe secret default-token | grep -E '^token' | cut -f2 -d':' | tr -d ' ')
+APISERVER=$(kubectl config view --minify | grep server | cut -f 2- -d ":" | tr -d " ")
+TOKEN=$(kubectl describe secret default-token | grep -E '^token' | cut -f2 -d':' | tr -d " ")
curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
```
+
+
+输出类似于:
+
```json
{
"kind": "APIVersions",
@@ -197,14 +213,22 @@ curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
}
```
+
`jsonpath` 方法实现:
```shell
APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
-TOKEN=$(kubectl get secret default-token -o jsonpath='{.data.token}' | base64 --decode )
+TOKEN=$(kubectl get secret default-token -o jsonpath='{.data.token}' | base64 --decode)
curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
```
+
+输出类似于:
+
```json
{
"kind": "APIVersions",
@@ -230,9 +254,8 @@ certificate.
On some clusters, the apiserver does not require authentication; it may serve
on localhost, or be protected by a firewall. There is not a standard
-for this. [Configuring Access to the API](/docs/admin/accessing-the-api)
-describes how a cluster admin can configure this. Such approaches may conflict
-with future high-availability support.
+for this. [Controlling Access to the API](/docs/concepts/security/controlling-access)
+describes how a cluster admin can configure this.
-->
上面的例子使用了 `--insecure` 参数,这使得它很容易受到 MITM 攻击。
当 kubectl 访问集群时,它使用存储的根证书和客户端证书来访问服务器
@@ -252,26 +275,26 @@ client libraries.
### Go client
-* To get the library, run the following command: `go get k8s.io/client-go//kubernetes`. See [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go) to see which versions are supported.
-* Write an application atop of the client-go clients. Note that client-go defines its own API objects, so if needed, please import API definitions from client-go rather than from the main repository, e.g., `import "k8s.io/client-go/1.4/pkg/api/v1"` is correct.
+* To get the library, run the following command: `go get k8s.io/client-go@kubernetes-`, see [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user) for detailed installation instructions. See [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go#compatibility-matrix) to see which versions are supported.
+* Write an application atop of the client-go clients. Note that client-go defines its own API objects, so if needed, please import API definitions from client-go rather than from the main repository, e.g., `import "k8s.io/client-go/kubernetes"` is correct.
The Go client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://git.k8s.io/client-go/examples/out-of-cluster-client-configuration/main.go).
If the application is deployed as a Pod in the cluster, please refer to the [next section](#accessing-the-api-from-a-pod).
-->
-## 以编程方式访问 API
+## 以编程方式访问 API {#programmatic-access-to-the-api}
Kubernetes 官方提供对 [Go](#go-client) 和 [Python](#python-client) 的客户端库支持。
-### Go 客户端
+### Go 客户端 {#go-client}
-* 想要获得这个库,请运行命令:`go get k8s.io/client-go//kubernetes`。
- 参阅 [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go)
- 来查看目前支持哪些版本。
+* 想要获得这个库,请运行命令:`go get k8s.io/client-go@kubernetes-`,
+ 有关详细安装说明,请参阅 [INSTALL.md](https://github.com/kubernetes/client-go/blob/master/INSTALL.md#for-the-casual-user)。
+ 请参阅 [https://github.com/kubernetes/client-go](https://github.com/kubernetes/client-go#compatibility-matrix) 以查看支持的版本。
* 基于这个 client-go 客户端库编写应用程序。
请注意,client-go 定义了自己的 API 对象,因此如果需要,请从 client-go 而不是从主存储库
- 导入 API 定义,例如,`import "k8s.io/client-go/1.4/pkg/api/v1"` 才是对的。
+ 导入 API 定义,例如,`import "k8s.io/client-go/kubernetes"` 才是对的。
Go 客户端可以像 kubectl CLI 一样使用相同的
[kubeconfig 文件](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
@@ -286,7 +309,7 @@ Go 客户端可以像 kubectl CLI 一样使用相同的
To use [Python client](https://github.com/kubernetes-client/python), run the following command: `pip install kubernetes`. See [Python Client Library page](https://github.com/kubernetes-client/python) for more installation options.
-The Python client can use the same [kubeconfig file](/docs/concepts/cluster-administration/authenticate-across-clusters-kubeconfig/)
+The Python client can use the same [kubeconfig file](/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
as the kubectl CLI does to locate and authenticate to the apiserver. See this [example](https://github.com/kubernetes-client/python/tree/master/examples).
### Other languages
@@ -294,7 +317,7 @@ as the kubectl CLI does to locate and authenticate to the apiserver. See this [e
There are [client libraries](/docs/reference/using-api/client-libraries/) for accessing the API from other languages.
See documentation for other libraries for how they authenticate.
-->
-### Python 客户端
+### Python 客户端 {#python-client}
如果想要使用 [Python 客户端](https://github.com/kubernetes-client/python),
请运行命令:`pip install kubernetes`。参阅
@@ -306,7 +329,7 @@ Python 客户端可以像 kubectl CLI 一样使用相同的
来定位和验证 apiserver,可参阅
[示例](https://github.com/kubernetes-client/python/tree/master/examples)。
-### 其它语言
+### 其它语言 {#other-languages}
目前有多个[客户端库](/zh/docs/reference/using-api/client-libraries/)
为其它语言提供访问 API 的方法。
@@ -332,23 +355,23 @@ for more details.
## 访问集群上运行的服务 {#accessing-services-running-on-the-cluster}
上一节介绍了如何连接到 Kubernetes API 服务器。
有关连接到 Kubernetes 集群上运行的其他服务的信息,请参阅
-[访问集群服务](/zh/docs/tasks/administer-cluster/access-cluster-services/)。
+[访问集群服务](/zh/docs/tasks/access-application-cluster/access-cluster-services/)。
-## 请求重定向
+## 请求重定向 {#requesting-redirects}
重定向功能已弃用并被删除。请改用代理(见下文)。
@@ -367,7 +390,7 @@ There are several different proxies you may encounter when using Kubernetes:
- adds authentication headers
-->
-## 多种代理
+## 多种代理 {#so-many-proxies}
使用 Kubernetes 时可能会遇到几种不同的代理:
@@ -381,7 +404,7 @@ There are several different proxies you may encounter when using Kubernetes:
- 添加身份验证头部
-2. [apiserver 代理](#discovering-builtin-services):
+2. [apiserver 代理](/zh/docs/tasks/access-application-cluster/access-cluster-services/#discovering-builtin-services):
- 内置于 apiserver 中
- 将集群外部的用户连接到集群 IP,否则这些 IP 可能无法访问
diff --git a/content/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md b/content/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
index 7122529b72..c5004d8f2d 100644
--- a/content/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
+++ b/content/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md
@@ -22,14 +22,16 @@ configuration files. After your clusters, users, and contexts are defined in
one or more configuration files, you can quickly switch between clusters by using the
`kubectl config use-context` command.
-->
-本文展示如何使用配置文件来配置对多个集群的访问。 在将集群、用户和上下文定义在一个或多个配置文件中之后,用户可以使用 `kubectl config use-context` 命令快速地在集群之间进行切换。
+本文展示如何使用配置文件来配置对多个集群的访问。
+在将集群、用户和上下文定义在一个或多个配置文件中之后,用户可以使用
+`kubectl config use-context` 命令快速地在集群之间进行切换。
+{{< note >}}
-{{< note >}}
用于配置集群访问的文件有时被称为 *kubeconfig 文件*。
这是一种引用配置文件的通用方式,并不意味着存在一个名为 `kubeconfig` 的文件。
{{< /note >}}
@@ -63,6 +65,7 @@ kubectl 的版本应该与集群的 API 服务器
[使用同一次版本号](/zh/releases/version-skew-policy/#kubectl)。
+
-## 定义集群、用户和上下文
+## 定义集群、用户和上下文 {#define-clusters-users-and-contexts}
假设用户有两个集群,一个用于正式开发工作,一个用于其它临时用途(scratch)。
在 `development` 集群中,前端开发者在名为 `frontend` 的名字空间下工作,
-存储开发者在名为 `storage` 的名字空间下工作。 在 `scratch` 集群中,
-开发人员可能在默认名字空间下工作,也可能视情况创建附加的名字空间。
+存储开发者在名为 `storage` 的名字空间下工作。在 `scratch` 集群中,
+开发人员可能在默认名字空间下工作,也可能视情况创建附加的名字空间。
访问开发集群需要通过证书进行认证。
访问其它临时用途的集群需要通过用户名和密码进行认证。
-创建名为 `config-exercise` 的目录。 在
+创建名为 `config-exercise` 的目录。在
`config-exercise` 目录中,创建名为 `config-demo` 的文件,其内容为:
```yaml
@@ -139,16 +142,16 @@ kubectl config --kubeconfig=config-demo set-credentials developer --client-certi
kubectl config --kubeconfig=config-demo set-credentials experimenter --username=exp --password=some-password
```
+{{< note >}}
-
-注意:
- 要删除用户,可以运行 `kubectl --kubeconfig=config-demo config unset users.`
- 要删除集群,可以运行 `kubectl --kubeconfig=config-demo config unset clusters.`
- 要删除上下文,可以运行 `kubectl --kubeconfig=config-demo config unset contexts.`
+{{< /note >}}
-打开 `config-demo` 文件查看添加的详细信息。 也可以使用 `config view`
+打开 `config-demo` 文件查看添加的详细信息。也可以使用 `config view`
命令进行查看:
```shell
@@ -355,7 +358,7 @@ kubectl config --kubeconfig=config-demo view --minify
In your `config-exercise` directory, create a file named `config-demo-2` with this content:
-->
-## 创建第二个配置文件
+## 创建第二个配置文件 {#create-a-second-configuration-file}
在 `config-exercise` 目录中,创建名为 `config-demo-2` 的文件,其中包含以下内容:
@@ -384,7 +387,7 @@ See whether you have an environment variable named `KUBECONFIG`. If so, save the
current value of your `KUBECONFIG` environment variable, so you can restore it later.
For example:
-->
-## 设置 KUBECONFIG 环境变量
+## 设置 KUBECONFIG 环境变量 {#set-the-kubeconfig-environment-variable}
查看是否有名为 `KUBECONFIG` 的环境变量。
如有,保存 `KUBECONFIG` 环境变量当前的值,以便稍后恢复。
@@ -414,12 +417,12 @@ Temporarily append two paths to your `KUBECONFIG` environment variable. For exam
在 Windows 中以分号分隔。
如果有 `KUBECONFIG` 环境变量,请熟悉列表中的配置文件。
-临时添加两条路径到 `KUBECONFIG` 环境变量中。 例如:
+临时添加两条路径到 `KUBECONFIG` 环境变量中。例如:
### Linux
```shell
-export KUBECONFIG=$KUBECONFIG:config-demo:config-demo-2
+export KUBECONFIG=$KUBECONFIG:config-demo:config-demo-2
```
### Windows PowerShell
@@ -489,7 +492,7 @@ Go to `$HOME/.kube`, and see what files are there. Typically, there is a file na
`config`. There might also be other configuration files in this directory. Briefly
familiarize yourself with the contents of these files.
-->
-## 探索 $HOME/.kube 目录
+## 探索 $HOME/.kube 目录 {#explore-the-home-kube-directory}
如果用户已经拥有一个集群,可以使用 `kubectl` 与集群进行交互,
那么很可能在 `$HOME/.kube` 目录下有一个名为 `config` 的文件。
@@ -504,7 +507,7 @@ If you have a `$HOME/.kube/config` file, and it's not already listed in your
`KUBECONFIG` environment variable, append it to your `KUBECONFIG` environment variable now.
For example:
-->
-## 将 $HOME/.kube/config 追加到 KUBECONFIG 环境变量中
+## 将 $HOME/.kube/config 追加到 KUBECONFIG 环境变量中 {#append-home-kube-config-to-your-kubeconfig-environment-variable}
如果有 `$HOME/.kube/config` 文件,并且还未列在 `KUBECONFIG` 环境变量中,
那么现在将它追加到 `KUBECONFIG` 环境变量中。
@@ -535,11 +538,11 @@ kubectl config view
-## 清理
+## 清理 {#clean-up}
-将 `KUBECONFIG` 环境变量还原为原始值。 例如:
+将 `KUBECONFIG` 环境变量还原为原始值。例如:
### Linux
diff --git a/content/zh/docs/tasks/access-application-cluster/create-external-load-balancer.md b/content/zh/docs/tasks/access-application-cluster/create-external-load-balancer.md
index 75fe4b6e13..99feb4720e 100644
--- a/content/zh/docs/tasks/access-application-cluster/create-external-load-balancer.md
+++ b/content/zh/docs/tasks/access-application-cluster/create-external-load-balancer.md
@@ -13,62 +13,64 @@ weight: 80
本文展示如何创建一个外部负载均衡器。
-
-{{< note >}}
-此功能仅适用于支持外部负载均衡器的云提供商或环境。
-{{< /note >}}
-
-创建服务时,你可以选择自动创建云网络负载均衡器。这提供了一个外部可访问的 IP 地址,
-可将流量分配到集群节点上的正确端口上
-( _假设集群在支持的环境中运行,并配置了正确的云负载平衡器提供商包_)。
+创建 {{< glossary_tooltip text="服务" term_id="service" >}} 时,你可以选择自动创建云网络负载均衡器。
+负载均衡器提供外部可访问的 IP 地址,可将流量发送到集群节点上的正确端口上
+( **假设集群在支持的环境中运行,并配置了正确的云负载均衡器驱动包**)。
-有关如何配置和使用 Ingress 资源为服务提供外部可访问的 URL、负载均衡流量、终止 SSL 等功能,
-请查看 [Ingress](/zh/docs/concepts/services-networking/ingress/) 文档。
+你还可以使用 {{< glossary_tooltip text="Ingress" term_id="ingress" >}} 代替 Service。
+更多信息,请参阅 [Ingress](/zh/docs/concepts/services-networking/ingress/) 文档。
## {{% heading "prerequisites" %}}
-* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
+{{< include "task-tutorial-prereqs.md" >}}
+
+
+你的集群必须在已经支持配置外部负载均衡器的云或其他环境中运行。
-## 配置文件
+## 创建服务 {#create-a-service}
-要创建外部负载均衡器,请将以下内容添加到
-[服务配置文件](/zh/docs/concepts/services-networking/service/#loadbalancer):
+### 基于清单文件创建服务 {#create-a-service-from-a-manifest}
+
+要创建外部负载均衡器,请将以下内容添加到你的 Service 清单文件:
```yaml
type: LoadBalancer
```
-你的配置文件可能会如下所示:
+你的清单文件可能会如下所示:
```yaml
apiVersion: v1
@@ -85,29 +87,31 @@ spec:
```
-## 使用 kubectl
+### 使用 kubectl 创建 Service {#create-a-service-using-kubectl}
你也可以使用 `kubectl expose` 命令及其 `--type=LoadBalancer` 参数创建服务:
```bash
-kubectl expose rc example --port=8765 --target-port=9376 \
+kubectl expose deployment example --port=8765 --target-port=9376 \
--name=example-service --type=LoadBalancer
```
-此命令通过使用与引用资源(在上面的示例的情况下,名为 `example` 的 replication controller)相同的选择器来创建一个新的服务。
+此命令通过使用与引用资源(在上面的示例的情况下,名为 `example` 的
+{{< glossary_tooltip text="Deployment" term_id="deployment" >}})
+相同的选择器来创建一个新的服务。
更多信息(包括更多的可选参数),请参阅
[`kubectl expose` 指南](/docs/reference/generated/kubectl/kubectl-commands/#expose)。
@@ -118,7 +122,7 @@ For more information, including optional flags, refer to the
You can find the IP address created for your service by getting the service
information through `kubectl`:
-->
-## 找到你的 IP 地址
+## 找到你的 IP 地址 {#finding-your-ip-address}
你可以通过 `kubectl` 获取服务信息,找到为你的服务创建的 IP 地址:
@@ -127,30 +131,34 @@ kubectl describe services example-service
```
-这将获得如下输出:
+这将获得类似如下输出:
-```bash
- Name: example-service
- Namespace: default
- Labels:
- Annotations:
- Selector: app=example
- Type: LoadBalancer
- IP: 10.67.252.103
- LoadBalancer Ingress: 192.0.2.89
- Port: 80/TCP
- NodePort: 32445/TCP
- Endpoints: 10.64.0.4:80,10.64.1.5:80,10.64.2.4:80
- Session Affinity: None
- Events:
+```
+Name: example-service
+Namespace: default
+Labels: app=example
+Annotations:
+Selector: app=example
+Type: LoadBalancer
+IP Families:
+IP: 10.3.22.96
+IPs: 10.3.22.96
+LoadBalancer Ingress: 192.0.2.89
+Port: 8765/TCP
+TargetPort: 9376/TCP
+NodePort: 30593/TCP
+Endpoints: 172.17.0.3:9376
+Session Affinity: None
+External Traffic Policy: Cluster
+Events:
```
-IP 地址列在 `LoadBalancer Ingress` 旁边。
+负载均衡器的 IP 地址列在 `LoadBalancer Ingress` 旁边。
-## 保留客户端源 IP
+## 保留客户端源 IP {#preserving-the-client-source-ip}
-由于此功能的实现,目标容器中看到的源 IP 将 *不是客户端的原始源 IP*。
-要启用保留客户端 IP,可以在服务的 spec 中配置以下字段(支持 GCE/Google Kubernetes Engine 环境):
+默认情况下,目标容器中看到的源 IP 将**不是客户端的原始源 IP**。
+要启用保留客户端 IP,可以在服务的 `.spec` 中配置以下字段:
-* `service.spec.externalTrafficPolicy` - 表示此服务是否希望将外部流量路由到节点本地或集群范围的端点。
- 有两个可用选项:Cluster(默认)和 Local。
- Cluster 隐藏了客户端源 IP,可能导致第二跳到另一个节点,但具有良好的整体负载分布。
- Local 保留客户端源 IP 并避免 LoadBalancer 和 NodePort 类型服务的第二跳,
+* `.spec.externalTrafficPolicy` - 表示此 Service 是否希望将外部流量路由到节点本地或集群范围的端点。
+ 有两个可用选项:`Cluster`(默认)和 `Local`。
+ `Cluster` 隐藏了客户端源 IP,可能导致第二跳到另一个节点,但具有良好的整体负载分布。
+ `Local` 保留客户端源 IP 并避免 LoadBalancer 和 NodePort 类型服务的第二跳,
但存在潜在的不均衡流量传播风险。
-* `service.spec.healthCheckNodePort` - 指定服务的 healthcheck nodePort(数字端口号)。
- 如果未指定 `healthCheckNodePort`,服务控制器从集群的 NodePort 范围内分配一个端口。
+* `.spec.healthCheckNodePort` - 指定服务的 healthcheck nodePort(数字端口号)。
+ 如果你未指定 `healthCheckNodePort`,服务控制器从集群的 NodePort 范围内分配一个端口。
你可以通过设置 API 服务器的命令行选项 `--service-node-port-range` 来配置上述范围。
- 它将会使用用户指定的 `healthCheckNodePort` 值(如果被客户端指定)。
- 仅当 `type` 设置为 LoadBalancer 并且 `externalTrafficPolicy` 设置为 Local 时才生效。
+ 在服务 `type` 设置为 LoadBalancer 并且 `externalTrafficPolicy` 设置为 `Local` 时,
+ Service 将会使用用户指定的 `healthCheckNodePort` 值(如果你指定了它)。
-可以通过在服务的配置文件中将 `externalTrafficPolicy` 设置为 Local 来激活此功能。
+可以通过在服务的清单文件中将 `externalTrafficPolicy` 设置为 Local 来激活此功能。比如:
```yaml
apiVersion: v1
@@ -228,9 +236,38 @@ spec:
type: LoadBalancer
```
+
+### 保留源 IP 时的注意事项和限制 {#caveats-and-limitations-when-preserving-source-ips}
+
+一些云服务供应商的负载均衡服务不允许你为每个目标配置不同的权重。
+
+由于每个目标在向节点发送流量方面的权重相同,因此外部流量不会在不同 Pod 之间平均负载。
+外部负载均衡器不知道每个节点上用作目标的 Pod 数量。
+
+
+在 `NumServicePods << _NumNodes` 或 `NumServicePods >> NumNodes` 时,
+即使没有权重,也会看到接近相等的分布。
+
+内部 Pod 到 Pod 的流量应该与 ClusterIP 服务类似,所有 Pod 的概率相同。
+
-## 回收负载均衡器
+## 回收负载均衡器 {#garbage-collecting-load-balancers}
-在通常情况下,应在删除 LoadBalancer 类型服务后立即清除云提供商中的相关负载均衡器资源。
+{{< feature-state for_k8s_version="v1.17" state="stable" >}}
+
+在通常情况下,应在删除 LoadBalancer 类型 Service 后立即清除云服务供应商中的相关负载均衡器资源。
但是,众所周知,在删除关联的服务后,云资源被孤立的情况很多。
引入了针对服务负载均衡器的终结器保护,以防止这种情况发生。
通过使用终结器,在删除相关的负载均衡器资源之前,也不会删除服务资源。
@@ -258,63 +297,35 @@ service controller crashing.
即使在诸如服务控制器崩溃之类的极端情况下,这也可以防止负载均衡器资源悬空。
-## 外部负载均衡器提供商
+## 外部负载均衡器供应商 {#external-load-balancer-providers}
请务必注意,此功能的数据路径由 Kubernetes 集群外部的负载均衡器提供。
当服务 `type` 设置为 LoadBalancer 时,Kubernetes 向集群中的 Pod 提供的功能等同于
-`type` 等于 ClusterIP,并通过使用 Kubernetes pod 的条目对负载均衡器(从外部到 Kubernetes)
-进行编程来扩展它。
-Kubernetes 服务控制器自动创建外部负载均衡器、健康检查(如果需要)、防火墙规则(如果需要),
-并获取云提供商分配的外部 IP 并将其填充到服务对象中。
+`type` 设置为 ClusterIP,并通过使用托管了相关 Kubernetes Pod 的节点作为条目对负载均衡器
+(从外部到 Kubernetes)进行编程来扩展它。
+Kubernetes 控制平面自动创建外部负载均衡器、健康检查(如果需要)和包过滤规则(如果需要)。
+一旦云服务供应商为负载均衡器分配了 IP 地址,控制平面就会查找该外部 IP 地址并将其填充到 Service 对象中。
+
+## {{% heading "whatsnext" %}}
-## 保留源 IP 时的注意事项和限制
-
-GCE/AWS 负载均衡器不为其目标池提供权重。
-对于旧的 LB kube-proxy 规则来说,这不是一个问题,它可以在所有端点之间正确平衡。
-
-
-使用新功能,外部流量不会在 pod 之间平均负载,而是在节点级别平均负载
-(因为 GCE/AWS 和其他外部 LB 实现无法指定每个节点的权重,
-因此它们的平衡跨所有目标节点,并忽略每个节点上的 Pod 数量)。
-
-
-但是,我们可以声明,对于 `NumServicePods << NumNodes` 或 `NumServicePods >> NumNodes` 时,
-即使没有权重,也会看到接近相等的分布。
-
-
-一旦外部负载平衡器提供权重,就可以将此功能添加到 LB 编程路径中。
-*未来工作:1.4 版本不提供权重支持,但可能会在将来版本中添加*
-
-内部 Pod 到 Pod 的流量应该与 ClusterIP 服务类似,所有 Pod 的概率相同。
+* 阅读[服务](/zh/docs/concepts/services-networking/service/)
+* 阅读 [Ingress](/zh/docs/concepts/services-networking/ingress/)
+* 阅读[使用 Service 连接到应用](/zh/docs/concepts/services-networking/connect-applications-service/)
diff --git a/content/zh/docs/tasks/administer-cluster/certificates.md b/content/zh/docs/tasks/administer-cluster/certificates.md
index 9047c0c0ae..bd608f2030 100644
--- a/content/zh/docs/tasks/administer-cluster/certificates.md
+++ b/content/zh/docs/tasks/administer-cluster/certificates.md
@@ -1,11 +1,11 @@
---
-title: 证书
+title: 手动生成证书
content_type: task
weight: 20
---
@@ -22,8 +17,6 @@ content_type: task
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
-
-
-## 先决条件
+## 先决条件 {#prerequisites}
* 运行的 etcd 集群个数成员为奇数。
* etcd 是一个 leader-based 分布式系统。确保主节点定期向所有从节点发送心跳,以保持集群稳定。
* 确保不发生资源不足。
-
+
集群的性能和稳定性对网络和磁盘 I/O 非常敏感。任何资源匮乏都会导致心跳超时,
从而导致集群的不稳定。不稳定的情况表明没有选出任何主节点。
在这种情况下,集群不能对其当前状态进行任何更改,这意味着不能调度新的 pod。
@@ -66,7 +59,7 @@ content_type: task
[所需资源需求](https://etcd.io/docs/current/op-guide/hardware/)。
* 在生产中运行的 etcd 的最低推荐版本是 `3.2.10+`。
-
+
-## 资源要求
+## 资源需求 {#resource-requirements}
使用有限的资源运行 etcd 只适合测试目的。为了在生产中部署,需要先进的硬件配置。
-在生产中部署 etcd 之前,请查看
-[所需资源参考文档](https://etcd.io/docs/current/op-guide/hardware/#example-hardware-configurations)。
+在生产中部署 etcd 之前,请查看[所需资源参考文档](https://etcd.io/docs/current/op-guide/hardware/#example-hardware-configurations)。
-## 启动 etcd 集群
+
+## 启动 etcd 集群 {#starting-etcd-clusters}
本节介绍如何启动单节点和多节点 etcd 集群。
@@ -104,9 +97,9 @@ Use a single-node etcd cluster only for testing purpose.
2. Start the Kubernetes API server with the flag
`--etcd-servers=$PRIVATE_IP:2379`.
- Make sure `PRIVATE_IP` is set to your etcd client IP.
+ Make sure `PRIVATE_IP` is set to your etcd client IP.
-->
-### 单节点 etcd 集群
+### 单节点 etcd 集群 {#single-node-etcd-cluster}
只为测试目的使用单节点 etcd 集群。
@@ -123,20 +116,38 @@ Use a single-node etcd cluster only for testing purpose.
+### 多节点 etcd 集群 {#multi-node-etcd-cluster}
+
+出于耐用性和高可用性考量,在生产环境中应以多节点集群的方式运行 etcd,并且定期备份。
+建议在生产环境中使用五个成员的集群。
+有关该内容的更多信息,请参阅[常见问题文档](https://etcd.io/docs/current/faq/#what-is-failure-tolerance)。
+
+可以通过静态成员信息或动态发现的方式配置 etcd 集群。
+有关集群的详细信息,请参阅
+[etcd 集群文档](https://etcd.io/docs/current/op-guide/clustering/)。
+
+例如,考虑运行以下客户端 URL 的五个成员的 etcd 集群:`http://$IP1:2379`、
+`http://$IP2:2379`、`http://$IP3:2379`、`http://$IP4:2379` 和 `http://$IP5:2379`。
+要启动 Kubernetes API 服务器:
+
-### 多节点 etcd 集群
-
-为了耐用性和高可用性,在生产中将以多节点集群的方式运行 etcd,并且定期备份。
-建议在生产中使用五个成员的集群。
-有关该内容的更多信息,请参阅
-[常见问题文档](https://etcd.io/docs/current/faq/#what-is-failure-tolerance)。
-
-可以通过静态成员信息或动态发现的方式配置 etcd 集群。
-有关集群的详细信息,请参阅
-[etcd 集群文档](https://etcd.io/docs/current/op-guide/clustering/)。
-
-例如,考虑运行以下客户端 URL 的五个成员的 etcd 集群:`http://$IP1:2379`,
-`http://$IP2:2379`,`http://$IP3:2379`,`http://$IP4:2379` 和 `http://$IP5:2379`。
-要启动 Kubernetes API 服务器:
-
1. 运行以下命令:
```shell
etcd --listen-client-urls=http://$IP1:2379,http://$IP2:2379,http://$IP3:2379,http://$IP4:2379,http://$IP5:2379 --advertise-client-urls=http://$IP1:2379,http://$IP2:2379,http://$IP3:2379,http://$IP4:2379,http://$IP5:2379
```
-2. 使用参数 `--etcd-servers=$IP1:2379,$IP2:2379,$IP3:2379,$IP4:2379,$IP5:2379`
+2. 使用参数 `--etcd-servers=$IP1:2379,$IP2:2379,$IP3:2379,$IP4:2379,$IP5:2379`
启动 Kubernetes API 服务器。
确保将 `IP` 变量设置为客户端 IP 地址。
@@ -184,7 +180,7 @@ To run a load balancing etcd cluster:
For example, let the address of the load balancer be `$LB`.
3. Start Kubernetes API Servers with the flag `--etcd-servers=$LB:2379`.
-->
-### 使用负载均衡的多节点 etcd 集群
+### 使用负载均衡的多节点 etcd 集群 {#multi-node-etcd-cluster-with-load-balancer}
要运行负载均衡的 etcd 集群:
@@ -194,12 +190,19 @@ To run a load balancing etcd cluster:
+## 加固 etcd 集群 {#securing-etcd-clusters}
+
+对 etcd 的访问相当于集群中的 root 权限,因此理想情况下只有 API 服务器才能访问它。
+考虑到数据的敏感性,建议只向需要访问 etcd 集群的节点授予权限。
+
-## 安全的 etcd 集群
-
-对 etcd 的访问相当于集群中的 root 权限,因此理想情况下只有 API 服务器才能访问它。
-考虑到数据的敏感性,建议只向需要访问 etcd 集群的节点授予权限。
-
想要确保 etcd 的安全,可以设置防火墙规则或使用 etcd 提供的安全特性,这些安全特性依赖于 x509 公钥基础设施(PKI)。
首先,通过生成密钥和证书对来建立安全的通信通道。
例如,使用密钥对 `peer.key` 和 `peer.cert` 来保护 etcd 成员之间的通信,
@@ -224,76 +222,75 @@ authentication.
+### 安全通信 {#securing-communication}
+
+若要使用安全对等通信对 etcd 进行配置,请指定参数 `--peer-key-file=peer.key`
+和 `--peer-cert-file=peer.cert`,并使用 HTTPS 作为 URL 模式。
+
-### 安全通信
-
-若要使用安全对等通信对 etcd 进行配置,请指定参数 `--peer-key-file=peer.key`
-和 `--peer-cert-file=peer.cert`,并使用 HTTPS 作为 URL 模式。
-
-类似地,要使用安全客户端通信对 etcd 进行配置,请指定参数 `--key-file=k8sclient.key`
+类似地,要使用安全客户端通信对 etcd 进行配置,请指定参数 `--key-file=k8sclient.key`
和 `--cert-file=k8sclient.cert`,并使用 HTTPS 作为 URL 模式。
使用安全通信的客户端命令的示例:
```
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 \
- --cert=/etc/kubernetes/pki/etcd/client.crt \
- --key=/etc/kubernetes/pki/etcd/client.key \
+ --cert=/etc/kubernetes/pki/etcd/server.crt \
+ --key=/etc/kubernetes/pki/etcd/server.key \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
member list
```
+### 限制 etcd 集群的访问 {#limiting-access-of-etcd-clusters}
+
+配置安全通信后,限制只有 Kubernetes API 服务器可以访问 etcd 集群。使用 TLS 身份验证来完成此任务。
+
+例如,考虑由 CA `etcd.ca` 信任的密钥对 `k8sclient.key` 和 `k8sclient.cert`。
+当 etcd 配置为 `--client-cert-auth` 和 TLS 时,它使用系统 CA 或由 `--trusted-ca-file`
+参数传入的 CA 验证来自客户端的证书。指定参数 `--client-cert-auth=true` 和
+`--trusted-ca-file=etcd.ca` 将限制对具有证书 `k8sclient.cert` 的客户端的访问。
+
+一旦正确配置了 etcd,只有具有有效证书的客户端才能访问它。要让 Kubernetes API 服务器访问,
+可以使用参数 `--etcd-certfile=k8sclient.cert`、`--etcd-keyfile=k8sclient.key` 和 `--etcd-cafile=ca.cert` 配置。
+
-### 限制 etcd 集群的访问
-
-配置安全通信后,将 etcd 集群的访问限制在 Kubernetes API 服务器上。使用 TLS 身份验证来完成此任务。
-
-例如,考虑由 CA `etcd.ca` 信任的密钥对 `k8sclient.key` 和 `k8sclient.cert`。
-当 etcd 配置为 `--client-cert-auth` 和 TLS 时,它使用系统 CA 或由 `--trusted-ca-file` 参数传入的 CA 验证来自客户端的证书。
-指定参数 `--client-cert-auth=true` 和 `--trusted-ca-file=etcd.ca` 将限制对具有证书 `k8sclient.cert` 的客户端的访问。
-
-一旦正确配置了 etcd,只有具有有效证书的客户端才能访问它。要让 Kubernetes API 服务器访问,
-可以使用参数 `--etcd-certfile=k8sclient.cert`,`--etcd-keyfile=k8sclient.key` 和 `--etcd-cafile=ca.cert` 配置。
-
{{< note >}}
Kubernetes 目前不支持 etcd 身份验证。
想要了解更多信息,请参阅相关的问题
@@ -302,93 +299,43 @@ Kubernetes 目前不支持 etcd 身份验证。
+## 替换失败的 etcd 成员 {#replacing-a-failed-etcd-member}
+
+etcd 集群通过容忍少数成员故障实现高可用性。
+但是,要改善集群的整体健康状况,请立即替换失败的成员。当多个成员失败时,逐个替换它们。
+替换失败成员需要两个步骤:删除失败成员和添加新成员。
+
-## 替换失败的 etcd 成员
-
-etcd 集群通过容忍少数成员故障实现高可用性。
-但是,要改善集群的整体健康状况,请立即替换失败的成员。当多个成员失败时,逐个替换它们。
-替换失败成员需要两个步骤:删除失败成员和添加新成员。
-
虽然 etcd 在内部保留唯一的成员 ID,但建议为每个成员使用唯一的名称,以避免人为错误。
-例如,考虑一个三成员的 etcd 集群。让 URL 为:`member1=http://10.0.0.1`, `member2=http://10.0.0.2`
+例如,考虑一个三成员的 etcd 集群。假定 URL 分别为:`member1=http://10.0.0.1`、`member2=http://10.0.0.2`
和 `member3=http://10.0.0.3`。当 `member1` 失败时,将其替换为 `member4=http://10.0.0.4`。
+
1. 获取失败的 `member1` 的成员 ID:
```shell
etcdctl --endpoints=http://10.0.0.2,http://10.0.0.3 member list
```
+
显示以下信息:
```console
@@ -397,30 +344,45 @@ etcd 集群通过容忍少数成员故障实现高可用性。
fd422379fda50e48, started, member3, http://10.0.0.3:2380, http://10.0.0.3:2379
```
+
2. 移除失败的成员
```shell
etcdctl member remove 8211f1d0f64f3269
```
+
显示以下信息:
```console
Removed member 8211f1d0f64f3269 from cluster
```
+
3. 增加新成员:
```shell
etcdctl member add member4 --peer-urls=http://10.0.0.4:2380
```
+
显示以下信息:
```console
Member 2be1eb8f84b7f63e added to cluster ef37ad9dc622a7c4
```
+
4. 在 IP 为 `10.0.0.4` 的机器上启动新增加的成员:
```shell
@@ -430,12 +392,27 @@ etcd 集群通过容忍少数成员故障实现高可用性。
etcd [flags]
```
-5. 做以下事情之一:
+
+5. 执行以下操作之一:
+
+ 1. 更新 Kubernetes API 服务器的 `--etcd-servers` 参数,使 Kubernetes
+ 知道配置已更改,然后重新启动 Kubernetes API 服务器。
2. 如果在 deployment 中使用了负载均衡,更新负载均衡配置。
-有关集群重新配置的详细信息,请参阅 [etcd 重构文档](https://etcd.io/docs/current/op-guide/runtime-configuration/#remove-a-member)。
+
+有关集群重新配置的详细信息,请参阅
+[etcd 重构文档](https://etcd.io/docs/current/op-guide/runtime-configuration/#remove-a-member)。
-## 备份 etcd 集群
+## 备份 etcd 集群 {#backing-up-an-etcd-cluster}
所有 Kubernetes 对象都存储在 etcd 上。定期备份 etcd 集群数据对于在灾难场景(例如丢失所有控制平面节点)下恢复 Kubernetes 集群非常重要。
快照文件包含所有 Kubernetes 状态和关键信息。为了保证敏感的 Kubernetes 数据的安全,可以对快照文件进行加密。
@@ -458,47 +435,33 @@ snapshot and volume snapshot.
+### 内置快照 {#built-in-snapshot}
+
-### 内置快照
-
etcd 支持内置快照。快照可以从使用 `etcdctl snapshot save` 命令的活动成员中获取,
也可以通过从 etcd [数据目录](https://etcd.io/docs/current/op-guide/configuration/#--data-dir)
复制 `member/snap/db` 文件,该 etcd 数据目录目前没有被 etcd 进程使用。获取快照不会影响成员的性能。
+
下面是一个示例,用于获取 `$ENDPOINT` 所提供的键空间的快照到文件 `snapshotdb`:
```shell
ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
```
-
+
验证快照:
```shell
@@ -515,94 +478,120 @@ ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshotdb
+### 卷快照 {#volume-snapshot}
+
+如果 etcd 运行在支持备份的存储卷(如 Amazon Elastic Block
+存储)上,则可以通过获取存储卷的快照来备份 etcd 数据。
+
+### 使用 etcdctl 选项的快照 {#snapshot-using-etcdctl-options}
+
+我们还可以使用 etcdctl 提供的各种选项来制作快照。例如:
```shell
ETCDCTL_API=3 etcdctl -h
-```
+```
+
+列出 etcdctl 可用的各种选项。例如,你可以通过指定端点、证书等来制作快照,如下所示:
```shell
ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 \
--cacert= --cert= --key= \
snapshot save
```
+
+
+可以从 etcd Pod 的描述中获得 `trusted-ca-file`、`cert-file` 和 `key-file`。
+
+## 为 etcd 集群扩容 {#scaling-up-etcd-clusters}
+
+通过交换性能,对 etcd 集群扩容可以提高可用性。缩放不会提高集群性能和能力。
+一般情况下不要扩大或缩小 etcd 集群的集合。不要为 etcd 集群配置任何自动缩放组。
+强烈建议始终在任何官方支持的规模上运行生产 Kubernetes 集群时使用静态的五成员 etcd 集群。
+
-### 卷快照
-
-如果 etcd 运行在支持备份的存储卷(如 Amazon Elastic Block 存储)上,则可以通过获取存储卷的快照来备份 etcd 数据。
-
-### 使用 etcdctl 选项的快照
-
-我们还可以使用 etcdctl 提供的各种选项来拍摄快照。例如:
-
-```shell
-ETCDCTL_API=3 etcdctl -h
-```
-
-列出 etcdctl 可用的各种选项。例如,你可以通过指定端点,证书等来拍摄快照,如下所示:
-
-```shell
-ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 \
- --cacert= --cert= --key= \
- snapshot save
-```
-可以从 etcd Pod 的描述中获得 `trusted-ca-file`, `cert-file` 和 `key-file` 。
-
-## 扩展 etcd 集群
-
-通过交换性能,扩展 etcd 集群可以提高可用性。缩放不会提高集群性能和能力。
-一般情况下不要扩大或缩小 etcd 集群的集合。不要为 etcd 集群配置任何自动缩放组。
-强烈建议始终在任何官方支持的规模上运行生产 Kubernetes 集群时使用静态的五成员 etcd 集群。
-
合理的扩展是在需要更高可靠性的情况下,将三成员集群升级为五成员集群。
请参阅 [etcd 重新配置文档](https://etcd.io/docs/current/op-guide/runtime-configuration/#remove-a-member)
以了解如何将成员添加到现有集群中的信息。
+## 恢复 etcd 集群 {#restoring-an-etcd-cluster}
+
+etcd 支持从 [major.minor](http://semver.org/) 或其他不同 patch 版本的 etcd 进程中获取的快照进行恢复。
+还原操作用于恢复失败的集群的数据。
+
+在启动还原操作之前,必须有一个快照文件。它可以是来自以前备份操作的快照文件,
+也可以是来自剩余[数据目录](https://etcd.io/docs/current/op-guide/configuration/#--data-dir)的快照文件。
+例如:
```shell
ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb
```
+
+恢复时也可以指定操作选项,例如:
+
+```shell
+ETCDCTL_API=3 etcdctl --data-dir snapshot restore snapshotdb
+```
+
+
+有关从快照文件还原集群的详细信息和示例,请参阅
+[etcd 灾难恢复文档](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster)。
+
+如果还原的集群的访问 URL 与前一个集群不同,则必须相应地重新配置 Kubernetes API 服务器。
+在本例中,使用参数 `--etcd-servers=$NEW_ETCD_CLUSTER` 而不是参数 `--etcd-servers=$OLD_ETCD_CLUSTER` 重新启动 Kubernetes API 服务器。
+用相应的 IP 地址替换 `$NEW_ETCD_CLUSTER` 和 `$OLD_ETCD_CLUSTER`。如果在 etcd 集群前面使用负载平衡,则可能需要更新负载均衡器。
+
+如果大多数 etcd 成员永久失败,则认为 etcd 集群失败。在这种情况下,Kubernetes 不能对其当前状态进行任何更改。
+虽然已调度的 pod 可能继续运行,但新的 pod 无法调度。在这种情况下,恢复 etcd 集群并可能需要重新配置 Kubernetes API 服务器以修复问题。
+
-## 恢复 etcd 集群
-
-etcd 支持从 [major.minor](http://semver.org/) 或其他不同 patch 版本的 etcd 进程中获取的快照进行恢复。
-还原操作用于恢复失败的集群的数据。
-
-在启动还原操作之前,必须有一个快照文件。它可以是来自以前备份操作的快照文件,
-也可以是来自剩余[数据目录]( https://etcd.io/docs/current/op-guide/configuration/#--data-dir)的快照文件。
-例如:
-
-```shell
-ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb
-```
-
-恢复时也可以指定操作选项,例如:
-
-```
-ETCDCTL_API=3 etcdctl --data-dir snapshot restore snapshotdb
-```
-
-有关从快照文件还原集群的详细信息和示例,请参阅
-[etcd 灾难恢复文档](https://etcd.io/docs/current/op-guide/recovery/#restoring-a-cluster)。
-
-如果还原的集群的访问 URL 与前一个集群不同,则必须相应地重新配置 Kubernetes API 服务器。
-在本例中,使用参数 `--etcd-servers=$NEW_ETCD_CLUSTER` 而不是参数 `--etcd-servers=$OLD_ETCD_CLUSTER` 重新启动 Kubernetes API 服务器。
-用相应的 IP 地址替换 `$NEW_ETCD_CLUSTER` 和 `$OLD_ETCD_CLUSTER`。如果在 etcd 集群前面使用负载平衡,则可能需要更新负载均衡器。
-
-如果大多数 etcd 成员永久失败,则认为 etcd 集群失败。在这种情况下,Kubernetes 不能对其当前状态进行任何更改。
-虽然已调度的 pod 可能继续运行,但新的 pod 无法调度。在这种情况下,恢复 etcd 集群并可能需要重新配置 Kubernetes API 服务器以修复问题。
-
{{< note >}}
如果集群中正在运行任何 API 服务器,则不应尝试还原 etcd 的实例。相反,请按照以下步骤还原 etcd:
-- 停止 *所有* API 服务实例
+- 停止**所有** API 服务实例
- 在所有 etcd 实例中恢复状态
- 重启所有 API 服务实例
@@ -674,17 +643,20 @@ ETCDCTL_API=3 etcdctl --data-dir snapshot restore snapshotdb
{{< /note >}}
+## 升级 etcd 集群 {#upgrading-etcd-clusters}
+
+有关 etcd 升级的更多详细信息,请参阅 [etcd 升级](https://etcd.io/docs/latest/upgrades/)文档。
+
-## 升级 etcd 集群
-有关 etcd 升级的更多详细信息,请参阅 [etcd 升级](https://etcd.io/docs/latest/upgrades/)文档。
{{< note >}}
在开始升级之前,请先备份你的 etcd 集群。
{{< /note >}}
diff --git a/content/zh/docs/tasks/administer-cluster/cpu-management-policies.md b/content/zh/docs/tasks/administer-cluster/cpu-management-policies.md
index 3d684ec5f5..4ef3aa5057 100644
--- a/content/zh/docs/tasks/administer-cluster/cpu-management-policies.md
+++ b/content/zh/docs/tasks/administer-cluster/cpu-management-policies.md
@@ -23,7 +23,7 @@ acceptably. The kubelet provides methods to enable more complex workload
placement policies while keeping the abstraction free from explicit placement
directives.
-->
-按照设计,Kubernetes 对 pod 执行相关的很多方面进行了抽象,使得用户不必关心。
+按照设计,Kubernetes 对 Pod 执行相关的很多方面进行了抽象,使得用户不必关心。
然而,为了正常运行,有些工作负载要求在延迟和/或性能方面有更强的保证。
为此,kubelet 提供方法来实现更复杂的负载放置策略,同时保持抽象,避免显式的放置指令。
@@ -62,12 +62,16 @@ management policies to determine some placement preferences on the node.
### 配置
-CPU 管理策略通过 kubelet 参数 `--cpu-manager-policy` 来指定。支持两种策略:
+CPU 管理策略通过 kubelet 参数 `--cpu-manager-policy`
+或 [KubeletConfiguration](/zh/docs/reference/config-api/kubelet-config.v1beta1/)
+中的 `cpuManagerPolicy` 字段来指定。
+支持两种策略:
* `none`: 默认策略,表示现有的调度行为。
-* `static`: 允许为节点上具有某些资源特征的 pod 赋予增强的 CPU 亲和性和独占性。
+* `static`: 允许为节点上具有某些资源特征的 Pod 赋予增强的 CPU 亲和性和独占性。
Static 策略的行为可以使用 `--cpu-manager-policy-options` 参数来微调。
该参数采用一个逗号分隔的 `key=value` 策略选项列表。
+此特性可以通过 `CPUManagerPolicyOptions` 特性门控来完全禁用。
+
+
+策略选项分为两组:alpha 质量(默认隐藏)和 beta 质量(默认可见)。
+这些组分别由 `CPUManagerPolicyAlphaOptions` 和 `CPUManagerPolicyBetaOptions` 特性门控来管控。
+不同于 Kubernetes 标准,这里是由这些特性门控来管控选项组,因为为每个单独选项都添加一个特性门控过于繁琐。
+
+
+### 更改 CPU 管理器策略
+
+由于 CPU 管理器策略只能在 kubelet 生成新 Pod 时应用,所以简单地从 "none" 更改为 "static"
+将不会对现有的 Pod 起作用。
+因此,为了正确更改节点上的 CPU 管理器策略,请执行以下步骤:
+
+
+1. [腾空](/zh/docs/tasks/administer-cluster/safely-drain-node)节点。
+2. 停止 kubelet。
+3. 删除旧的 CPU 管理器状态文件。该文件的路径默认为 `/var/lib/kubelet/cpu_manager_state`。
+ 这将清除 CPUManager 维护的状态,以便新策略设置的 cpu-sets 不会与之冲突。
+4. 编辑 kubelet 配置以将 CPU 管理器策略更改为所需的值。
+5. 启动 kubelet。
+
+
+对需要更改其 CPU 管理器策略的每个节点重复此过程。
+跳过此过程将导致 kubelet crashlooping 并出现以下错误:
+
+```
+could not restore state from checkpoint: configured policy "static" differs from state checkpoint policy "none", please drain this node and delete the CPU manager checkpoint file "/var/lib/kubelet/cpu_manager_state" before restarting Kubelet
+```
-该策略管理一个共享 CPU 资源池,最初,该资源池包含节点上所有的 CPU 资源。可用
-的独占性 CPU 资源数量等于节点的 CPU 总量减去通过 `--kube-reserved` 或 `--system-reserved` 参数保留的 CPU 。从1.17版本开始,CPU保留列表可以通过 kublet 的 '--reserved-cpus' 参数显式地设置。
-通过 '--reserved-cpus' 指定的显式CPU列表优先于使用 '--kube-reserved' 和 '--system-reserved' 参数指定的保留CPU。 通过这些参数预留的 CPU 是以整数方式,按物理内
-核 ID 升序从初始共享池获取的。 共享池是 `BestEffort` 和 `Burstable` pod 运行
-的 CPU 集合。`Guaranteed` pod 中的容器,如果声明了非整数值的 CPU `requests` ,也将运行在共享池的 CPU 上。只有 `Guaranteed` pod 中,指定了整数型 CPU `requests` 的容器,才会被分配独占 CPU 资源。
+此策略管理一个 CPU 共享池,该共享池最初包含节点上所有的 CPU 资源。
+可独占性 CPU 资源数量等于节点的 CPU 总量减去通过 kubelet `--kube-reserved` 或 `--system-reserved`
+参数保留的 CPU 资源。
+从 1.17 版本开始,可以通过 kubelet `--reserved-cpus` 参数显式地指定 CPU 预留列表。
+由 `--reserved-cpus` 指定的显式 CPU 列表优先于由 `--kube-reserved` 和 `--system-reserved`
+指定的 CPU 预留。
+通过这些参数预留的 CPU 是以整数方式,按物理核心 ID 升序从初始共享池获取的。
+共享池是 `BestEffort` 和 `Burstable` Pod 运行的 CPU 集合。
+`Guaranteed` Pod 中的容器,如果声明了非整数值的 CPU `requests`,也将运行在共享池的 CPU 上。
+只有 `Guaranteed` Pod 中,指定了整数型 CPU `requests` 的容器,才会被分配独占 CPU 资源。
-该 pod 属于 `Burstable` QoS 类型,因为其资源 `requests` 不等于 `limits`。
+该 Pod 属于 `Burstable` QoS 类型,因为其资源 `requests` 不等于 `limits`。
所以该容器运行在共享 CPU 池中。
```yaml
@@ -322,19 +388,35 @@ equal to one. The `nginx` container is granted 2 exclusive CPUs.
#### Static 策略选项
-如果使用 `full-pcpus-only` 策略选项,static 策略总是会分配完整的物理核心。
-你可以通过在 CPUManager 策略选项里加上 `full-pcups-only=true` 来启用该选项。
+你可以使用以下特性门控根据成熟度级别打开或关闭选项组:
+* `CPUManagerPolicyBetaOptions` 默认启用。禁用以隐藏 beta 级选项。
+* `CPUManagerPolicyAlphaOptions` 默认禁用。启用以显示 alpha 级选项。
+你仍然必须使用 `CPUManagerPolicyOptions` kubelet 选项启用每个选项。
+
+静态 `CPUManager` 策略存在以下策略选项:
+* `full-pcpus-only`(beta,默认可见)
+* `distribute-cpus-across-numa`(alpha,默认隐藏)
+
+如果使用 `full-pcpus-only` 策略选项,static 策略总是会分配完整的物理核心。
默认情况下,如果不使用该选项,static 策略会使用拓扑感知最适合的分配方法来分配 CPU。
在启用了 SMT 的系统上,此策略所分配是与硬件线程对应的、独立的虚拟核。
这会导致不同的容器共享相同的物理核心,该行为进而会导致
@@ -344,5 +426,47 @@ With the option enabled, the pod will be admitted by the kubelet only if the CPU
can be fulfilled by allocating full physical cores.
If the pod does not pass the admission, it will be put in Failed state with the message `SMTAlignmentError`.
-->
-启用该选项之后,只有当一个 Pod 里所有容器的 CPU 请求都能够分配到完整的物理核心时,kubelet 才会接受该 Pod。
-如果 Pod 没有被准入,它会被置于 Failed 状态,错误消息是 `SMTAlignmentError`。
\ No newline at end of file
+启用该选项之后,只有当一个 Pod 里所有容器的 CPU 请求都能够分配到完整的物理核心时,
+kubelet 才会接受该 Pod。
+如果 Pod 没有被准入,它会被置于 Failed 状态,错误消息是 `SMTAlignmentError`。
+
+
+如果使用 `distribute-cpus-across-numa` 策略选项,
+在需要多个 NUMA 节点来满足分配的情况下,
+static 策略会在 NUMA 节点上平均分配 CPU。
+默认情况下,`CPUManager` 会将 CPU 分配到一个 NUMA 节点上,直到它被填满,
+剩余的 CPU 会简单地溢出到下一个 NUMA 节点。
+这会导致依赖于同步屏障(以及类似的同步原语)的并行代码出现不期望的瓶颈,
+因为此类代码的运行速度往往取决于最慢的工作线程
+(由于至少一个 NUMA 节点存在可用 CPU 较少的情况,因此速度变慢)。
+通过在 NUMA 节点上平均分配 CPU,
+应用程序开发人员可以更轻松地确保没有某个工作线程单独受到 NUMA 影响,
+从而提高这些类型应用程序的整体性能。
+
+
+可以通过将 `full-pcups-only=true` 添加到 CPUManager 策略选项来启用 `full-pcpus-only` 选项。
+同样地,可以通过将 `distribute-cpus-across-numa=true`
+添加到 CPUManager 策略选项来启用 `distribute-cpus-across-numa` 选项。
+当两者都设置时,它们是“累加的”,因为 CPU 将分布在 NUMA 节点的 full-pcpus 块中,
+而不是单个核心。
diff --git a/content/zh/docs/tasks/administer-cluster/ip-masq-agent.md b/content/zh/docs/tasks/administer-cluster/ip-masq-agent.md
index e4d8bc8297..6d5e5af58c 100644
--- a/content/zh/docs/tasks/administer-cluster/ip-masq-agent.md
+++ b/content/zh/docs/tasks/administer-cluster/ip-masq-agent.md
@@ -9,9 +9,9 @@ content_type: task
-此页面展示如何配置和启用 ip-masq-agent。
+此页面展示如何配置和启用 `ip-masq-agent`。
## {{% heading "prerequisites" %}}
@@ -24,9 +24,9 @@ This page shows how to configure and enable the ip-masq-agent.
## IP Masquerade Agent 用户指南
-ip-masq-agent 配置 iptables 规则以隐藏位于集群节点 IP 地址后面的 Pod 的 IP 地址。
+`ip-masq-agent` 配置 iptables 规则以隐藏位于集群节点 IP 地址后面的 Pod 的 IP 地址。
这通常在将流量发送到集群的 Pod
[CIDR](https://zh.wikipedia.org/wiki/%E6%97%A0%E7%B1%BB%E5%88%AB%E5%9F%9F%E9%97%B4%E8%B7%AF%E7%94%B1)
范围之外的目的地时使用。
@@ -96,23 +96,26 @@ The agent configuration file must be written in YAML or JSON syntax, and may con
代理配置文件必须使用 YAML 或 JSON 语法编写,并且可能包含三个可选值:
-* **nonMasqueradeCIDRs:**
+* `nonMasqueradeCIDRs`:
[CIDR](https://zh.wikipedia.org/wiki/%E6%97%A0%E7%B1%BB%E5%88%AB%E5%9F%9F%E9%97%B4%E8%B7%AF%E7%94%B1)
表示法中的字符串列表,用于指定不需伪装的地址范围。
-* **masqLinkLocal:** 布尔值 (true / false),表示是否将流量伪装到
- 本地链路前缀 169.254.0.0/16。默认为 false。
+* `masqLinkLocal`:布尔值 (true/false),表示是否为本地链路前缀 169.254.0.0/16 的流量提供伪装。
+ 默认为 false。
-* **resyncInterval:** 代理尝试从磁盘重新加载配置的时间间隔。
- 例如 '30s',其中 's' 是秒,'ms' 是毫秒等...
+* `resyncInterval`:代理从磁盘重新加载配置的重试时间间隔。
+ 例如 '30s',其中 's' 是秒,'ms' 是毫秒。
-默认情况下,从 Kubernetes 1.7.0 版本开始的 GCE/Google Kubernetes Engine 中,
-如果启用了网络策略,或者你使用的集群 CIDR 不在 10.0.0.0/8 范围内,
-则 ip-masq-agent 将在你的集群中运行。
-如果你在其他环境中运行,则可以将 ip-masq-agent
-[DaemonSet](/zh/docs/concepts/workloads/controllers/daemonset/) 添加到你的集群:
+默认情况下,在 GCE/Google Kubernetes Engine 中,如果启用了网络策略,
+或者你使用的集群 CIDR 不在 10.0.0.0/8 范围内,
+则 `ip-masq-agent` 将在你的集群中运行。
+如果你在其他环境中运行,可以将 `ip-masq-agent`
+[DaemonSet](/zh/docs/concepts/workloads/controllers/daemonset/) 添加到你的集群中。
@@ -172,7 +182,7 @@ More information can be found in the ip-masq-agent documentation [here](https://
-在大多数情况下,默认的规则集应该足够;但是,如果你的群集不是这种情况,则可以创建并应用
+在大多数情况下,默认的规则集应该足够;但是,如果你的集群不是这种情况,则可以创建并应用
[ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/)
来自定义受影响的 IP 范围。
例如,要允许 ip-masq-agent 仅作用于 10.0.0.0/8,你可以在一个名为 “config” 的文件中创建以下
@@ -180,12 +190,12 @@ In most cases, the default set of rules should be sufficient; however, if this i
{{< note >}}
重要的是,该文件之所以被称为 config,因为默认情况下,该文件将被用作
-ip-masq-agent 查找的主键:
+`ip-masq-agent` 查找的主键:
-```
+```yaml
nonMasqueradeCIDRs:
- 10.0.0.0/8
resyncInterval: 60s
@@ -195,22 +205,25 @@ resyncInterval: 60s
-运行以下命令将配置映射添加到你的集群:
+运行以下命令将 ConfigMap 添加到你的集群:
-```
+```shell
kubectl create configmap ip-masq-agent --from-file=config --namespace=kube-system
```
-这将更新位于 */etc/config/ip-masq-agent* 的一个文件,该文件以 *resyncInterval*
+这将更新位于 `/etc/config/ip-masq-agent` 的一个文件,该文件以 `resyncInterval`
为周期定期检查并应用于集群节点。
重新同步间隔到期后,你应该看到你的更改在 iptables 规则中体现:
-```
+```shell
iptables -t nat -L IP-MASQ-AGENT
+```
+
+```none
Chain IP-MASQ-AGENT (1 references)
target prot opt source destination
RETURN all -- anywhere 169.254.0.0/16 /* ip-masq-agent: cluster-local traffic should not be subject to MASQUERADE */ ADDRTYPE match dst-type !LOCAL
@@ -219,13 +232,13 @@ MASQUERADE all -- anywhere anywhere /* ip-masq-agent:
```
默认情况下,本地链路范围 (169.254.0.0/16) 也由 ip-masq agent 处理,
该代理设置适当的 iptables 规则。 要使 ip-masq-agent 忽略本地链路,
-可以在配置映射中将 *masqLinkLocal* 设置为 true。
+可以在 ConfigMap 中将 `masqLinkLocal` 设置为 true。
-```
+```yaml
nonMasqueradeCIDRs:
- 10.0.0.0/8
resyncInterval: 60s
diff --git a/content/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes.md b/content/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes.md
index 377b5f3956..323dbd5cf0 100644
--- a/content/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes.md
+++ b/content/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes.md
@@ -25,7 +25,6 @@ You can use Kubernetes to run a mixture of Linux and Windows nodes, so you can m
混合使用运行于 Linux 上的 Pod 和运行于 Windows 上的 Pod。
本页面展示如何将 Windows 节点注册到你的集群。
-
## {{% heading "prerequisites" %}}
{{< version-check >}}
@@ -36,6 +35,7 @@ If you are using VXLAN/Overlay networking you must have also have [KB4489899](ht
* A Linux-based Kubernetes kubeadm cluster in which you have access to the control plane (see [Creating a single control-plane cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)).
-->
+
* 获取 [Windows Server 2019 或更高版本的授权](https://www.microsoft.com/en-us/cloud-platform/windows-server-pricing)
以便配置托管 Windows 容器的 Windows 节点。
如果你在使用 VXLAN/覆盖(Overlay)联网设施,则你还必须安装 [KB4489899](https://support.microsoft.com/help/4489899)。
@@ -275,55 +275,12 @@ Windows 工作节点上具有提升的权限(Administrator)。
{{< /note >}}
{{< tabs name="tab-windows-kubeadm-runtime-installation" >}}
-{{% tab name="Docker EE" %}}
-
-#### 安装 Docker EE
-
-```powershell
-Install-WindowsFeature -Name containers
-```
-
-安装 Docker
-操作指南在 [Install Docker Engine - Enterprise on Windows Servers](https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=Windows-Server#install-docker)。
-
-
-#### 安装 wins、kubelet 和 kubeadm
-
- ```PowerShell
- curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/kubeadm/scripts/PrepareNode.ps1
- .\PrepareNode.ps1 -KubernetesVersion {{< param "fullversion" >}}
- ```
-
-
-#### 运行 `kubeadm` 添加节点
-
- 当你在控制面主机上运行 `kubeadm init` 时,输出了一个命令。现在运行这个命令。
- 如果你找不到这个命令,或者命令中对应的令牌已经过期,你可以(在一个控制面主机上)运行
- `kubeadm token create --print-join-command` 来生成新的令牌和 join 命令。
-
-{{% /tab %}}
{{% tab name="CRI-containerD" %}}
-
#### 安装 containerD
```powershell
@@ -335,16 +292,12 @@ curl.exe -LO https://github.com/kubernetes-sigs/sig-windows-tools/releases/lates
-要安装特定版本的 containerD,使用参数 -ContainerDVersion指定版本。
+要安装特定版本的 containerD,使用参数 -ContainerDVersion 指定版本。
```powershell
# Example
.\Install-Containerd.ps1 -ContainerDVersion 1.4.1
```
-
-{{< /note >}}
-
-{{< note >}}
@@ -360,12 +313,18 @@ If you're using a different interface rather than Ethernet (i.e. "Ethernet0 2")
-#### 安装 wins,kubelet 和 kubeadm
+#### 安装 wins、kubelet 和 kubeadm
```PowerShell
curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/kubeadm/scripts/PrepareNode.ps1
.\PrepareNode.ps1 -KubernetesVersion {{< param "fullversion" >}} -ContainerRuntime containerD
```
+
+从 [cri-tools](https://github.com/kubernetes-sigs/cri-tools) 项目安装 `crtctl`。
+`crictl` 是必需的,kubeadm 使用它与 CRI 端点通信。
#### 运行 `kubeadm` 添加节点
- 使用当你在控制面主机上运行 `kubeadm init` 时得到的命令。
- 如果你找不到这个命令,或者命令中对应的令牌已经过期,你可以(在一个控制面主机上)运行
- `kubeadm token create --print-join-command` 来生成新的令牌和 join 命令。
+ 使用当你在控制面主机上运行 `kubeadm init` 时得到的命令。
+ 如果你找不到这个命令,或者命令中对应的令牌已经过期,你可以(在一个控制面主机上)运行
+ `kubeadm token create --print-join-command` 来生成新的令牌和 join 命令。
+
+{{% /tab %}}
+
+
+{{% tab name="Docker Engine" %}}
+
+
+
+#### 安装 Docker Engine
+
+安装 `Containers` 功能特性
+
+```powershell
+Install-WindowsFeature -Name containers
+```
+
+
+
+安装 Docker
+
+操作指南在
+[Install Docker Engine - Enterprise on Windows Servers](https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=Windows-Server#install-docker)。
+
+
+
+[安装 cri-dockerd](https://github.com/Mirantis/cri-dockerd)。kubelet 可以通过 cri-dockerd
+在 CRI 兼容的节点上与 Docker 通信。
+
{{< note >}}
-If using **CRI-containerD** add `--cri-socket "npipe:////./pipe/containerd-containerd"` to the kubeadm call
+
+Docker Engine 没有实现 [CRI](/zh/docs/concepts/architecture/cri/),
+而 CRI 是容器运行时能够与 Kubernetes 一起工作的要求。
+出于这个原因,必须安装一个额外的服务 [cri-dockerd](https://github.com/Mirantis/cri-dockerd)。
+cri-dockerd 是一个基于原来的内置 Docker Engine 支持的项目,
+而这一支持在 1.24 版本的 kubelet 中[已被移除](/zh/dockershim)。
{{< /note >}}
+
+从 [cri-tools](https://github.com/kubernetes-sigs/cri-tools) 项目安装 `crictl`。
+kubeadm 需要 `crictl` 才能与 CRI 端点通信。
+
+
+#### 安装 wins、kubelet 和 kubeadm
+
+```PowerShell
+curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/kubeadm/scripts/PrepareNode.ps1
+.\PrepareNode.ps1 -KubernetesVersion {{< param "fullversion" >}}
+```
+
+#### 运行 `kubeadm` 添加节点
+
+当你在控制面主机上运行 `kubeadm init` 时,输出了一个命令。现在运行这个命令。
+如果你找不到这个命令,或者命令中对应的令牌已经过期,你可以(在一个控制面主机上)运行
+`kubeadm token create --print-join-command` 来生成新的令牌和 join 命令。
+
{{% /tab %}}
{{< /tabs >}}
diff --git a/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md b/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
index a2c9194729..2004388301 100644
--- a/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
+++ b/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md
@@ -15,11 +15,13 @@ weight: 10
{{< feature-state for_k8s_version="v1.15" state="stable" >}}
-
由 [kubeadm](/zh/docs/reference/setup-tools/kubeadm/) 生成的客户端证书在 1 年后到期。
-本页说明如何使用 kubeadm 管理证书续订。
+本页说明如何使用 kubeadm 管理证书续订,同时也涵盖其他与 kubeadm 证书管理相关的说明。
## {{% heading "prerequisites" %}}
@@ -39,16 +41,16 @@ You can override this behavior by providing your own certificates.
## 使用自定义的证书 {#custom-certificates}
-默认情况下, kubeadm 会生成运行一个集群所需的全部证书。
+默认情况下,kubeadm 会生成运行一个集群所需的全部证书。
你可以通过提供你自己的证书来改变这个行为策略。
-如果要这样做, 你必须将证书文件放置在通过 `--cert-dir` 命令行参数或者 kubeadm 配置中的
-`CertificatesDir` 配置项指明的目录中。默认的值是 `/etc/kubernetes/pki`。
+如果要这样做,你必须将证书文件放置在通过 `--cert-dir` 命令行参数或者 kubeadm 配置中的
+`certificatesDir` 配置项指明的目录中。默认的值是 `/etc/kubernetes/pki`。
如果在运行 `kubeadm init` 之前存在给定的证书和私钥对,kubeadm 将不会重写它们。
-例如,这意味着您可以将现有的 CA 复制到 `/etc/kubernetes/pki/ca.crt` 和
+例如,这意味着你可以将现有的 CA 复制到 `/etc/kubernetes/pki/ca.crt` 和
`/etc/kubernetes/pki/ca.key` 中,而 kubeadm 将使用此 CA 对其余证书进行签名。
## 外部 CA 模式 {#external-ca-mode}
@@ -80,7 +83,7 @@ this condition and activates the "External CA" mode. kubeadm will proceed withou
Instead, run the controller-manager standalone with `--controllers=csrsigner` and
point to the CA certificate and key.
-->
-否则, kubeadm 将独立运行 controller-manager,附加一个
+否则,kubeadm 将独立运行 controller-manager,附加一个
`--controllers=csrsigner` 的参数,并且指明 CA 证书和密钥。
[PKI 证书和要求](/zh/docs/setup/best-practices/certificates/)包括集群使用外部 CA 的设置指南。
-
-## 检查证书是否过期
+## 检查证书是否过期 {#check-certificate-expiration}
你可以使用 `check-expiration` 子命令来检查证书何时过期
@@ -102,8 +105,8 @@ You can use the `check-expiration` subcommand to check when certificates expire:
kubeadm certs check-expiration
```
-
输出类似于以下内容:
@@ -126,17 +129,17 @@ etcd-ca Dec 28, 2029 23:36 UTC 9y no
front-proxy-ca Dec 28, 2029 23:36 UTC 9y no
```
-
-该命令显示 `/etc/kubernetes/pki` 文件夹中的客户端证书以及
-kubeadm(`admin.conf`, `controller-manager.conf` 和 `scheduler.conf`)
+该命令显示 `/etc/kubernetes/pki` 文件夹中的客户端证书以及
+kubeadm(`admin.conf`、`controller-manager.conf` 和 `scheduler.conf`)
使用的 KUBECONFIG 文件中嵌入的客户端证书的到期时间/剩余时间。
-
-另外, kubeadm 会通知用户证书是否由外部管理;
+另外,kubeadm 会通知用户证书是否由外部管理;
在这种情况下,用户应该小心的手动/使用其他工具来管理证书更新。
{{< note >}}
上面的列表中没有包含 `kubelet.conf`,因为 kubeadm 将 kubelet 配置为
-[自动更新证书](/docs/tasks/tls/certificate-rotation/)。
+[自动更新证书](/zh/docs/tasks/tls/certificate-rotation/)。
轮换的证书位于目录 `/var/lib/kubelet/pki`。
要修复过期的 kubelet 客户端证书,请参阅
[kubelet 客户端证书轮换失败](/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert)。
@@ -180,35 +183,35 @@ client-key: /var/lib/kubelet/pki/kubelet-client-current.pem
```
{{< /warning >}}
-
-## 自动更新证书
+## 自动更新证书 {#automatic-certificate-renewal}
-`kubeadm` 会在控制面
+kubeadm 会在控制面
[升级](/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
的时候更新所有证书。
-
这个功能旨在解决最简单的用例;如果你对此类证书的更新没有特殊要求,
并且定期执行 Kubernetes 版本升级(每次升级之间的间隔时间少于 1 年),
则 kubeadm 将确保你的集群保持最新状态并保持合理的安全性。
-
{{< note >}}
最佳的做法是经常升级集群以确保安全。
{{< /note >}}
-
如果你对证书更新有更复杂的需求,则可通过将 `--certificate-renewal=false` 传递给
`kubeadm upgrade apply` 或者 `kubeadm upgrade node`,从而选择不采用默认行为。
@@ -224,16 +227,16 @@ kubeadm 在 1.17 版本之前有一个[缺陷](https://github.com/kubernetes/kub
在这种情况下,你需要显式地设置 `--certificate-renewal=true`。
{{< /warning >}}
-
-## 手动更新证书
+## 手动更新证书 {#manual-certificate-renewal}
你能随时通过 `kubeadm certs renew` 命令手动更新你的证书。
-
-此命令用 CA (或者 front-proxy-CA )证书和存储在 `/etc/kubernetes/pki` 中的密钥执行更新。
+此命令用 CA(或者 front-proxy-CA )证书和存储在 `/etc/kubernetes/pki` 中的密钥执行更新。
执行完此命令之后你需要重启控制面 Pods。因为动态证书重载目前还不被所有组件和证书支持,所有这项操作是必须的。
[静态 Pods](/zh/docs/tasks/configure-pod-container/static-pod/) 是被本地 kubelet 而不是 API Server 管理,
所以 kubectl 不能用来删除或重启他们。
要重启静态 Pod 你可以临时将清单文件从 `/etc/kubernetes/manifests/` 移除并等待 20 秒
-(参考 [KubeletConfiguration 结构](/docs/reference/config-api/kubelet-config.v1beta1/) 中的`fileCheckFrequency` 值)。
-如果 Pod 不在清单目录里,kubelet将会终止它。
+(参考 [KubeletConfiguration 结构](/zh/docs/reference/config-api/kubelet-config.v1beta1/) 中的`fileCheckFrequency` 值)。
+如果 Pod 不在清单目录里,kubelet 将会终止它。
在另一个 `fileCheckFrequency` 周期之后你可以将文件移回去,为了组件可以完成 kubelet 将重新创建 Pod 和证书更新。
-
{{< warning >}}
如果你运行了一个 HA 集群,这个命令需要在所有控制面板节点上执行。
{{< /warning >}}
-
{{< note >}}
-`certs renew` 使用现有的证书作为属性 (Common Name、Organization、SAN 等) 的权威来源,
-而不是 kubeadm-config ConfigMap 。强烈建议使它们保持同步。
+`certs renew` 使用现有的证书作为属性(Common Name、Organization、SAN 等)的权威来源,
+而不是 kubeadm-config ConfigMap。强烈建议使它们保持同步。
{{< /note >}}
-`kubeadm certs renew`提供以下选项:
+`kubeadm certs renew` 提供以下选项:
Kubernetes 证书通常在一年后到期。
-
@@ -294,14 +296,14 @@ Kubernetes 证书通常在一年后到期。
-## 用 Kubernetes 证书 API 更新证书
+## 用 Kubernetes 证书 API 更新证书 {#renew-certificates-with-the-kubernetes-certificates-api}
本节提供有关如何使用 Kubernetes 证书 API 执行手动证书更新的更多详细信息。
-
{{< caution >}}
这些是针对需要将其组织的证书基础结构集成到 kubeadm 构建的集群中的用户的高级主题。
@@ -312,27 +314,24 @@ These are advanced topics for users who need to integrate their organization's c
### Set up a signer
The Kubernetes Certificate Authority does not work out of the box.
-You can configure an external signer such as [cert-manager](https://cert-manager.io/docs/configuration/ca/), or you can use the build-in signer.
+You can configure an external signer such as [cert-manager](https://cert-manager.io/docs/configuration/ca/), or you can use the built-in signer.
The built-in signer is part of [`kube-controller-manager`](/docs/reference/command-line-tools-reference/kube-controller-manager/).
-To activate the build-in signer, you must pass the `--cluster-signing-cert-file` and `--cluster-signing-key-file` flags.
+To activate the built-in signer, you must pass the `--cluster-signing-cert-file` and `--cluster-signing-key-file` flags.
-->
-### 设置一个签名者(Signer)
+### 设置一个签名者(Signer) {#set-up-a-signer}
-Kubernetes 证书颁发机构不是开箱即用。
-你可以配置外部签名者,例如
-[cert-manager](https://cert-manager.io/docs/configuration/ca/),
+Kubernetes 证书颁发机构不是开箱即用。你可以配置外部签名者,例如 [cert-manager](https://cert-manager.io/docs/configuration/ca/),
也可以使用内置签名者。
内置签名者是
-[`kube-controller-manager`](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/)
-的一部分。
+[`kube-controller-manager`](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/) 的一部分。
要激活内置签名者,请传递 `--cluster-signing-cert-file` 和 `--cluster-signing-key-file` 参数。
如果你正在创建一个新的集群,你可以使用 kubeadm 的
-[配置文件](/docs/reference/config-api/kubeadm-config.v1beta3/)。
+[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta3/)。
```yaml
apiVersion: kubeadm.k8s.io/v1beta3
@@ -343,10 +342,10 @@ controllerManager:
cluster-signing-key-file: /etc/kubernetes/pki/ca.key
```
-
-### 创建证书签名请求 (CSR)
+### 创建证书签名请求 (CSR) {#create-certificate-signing-requests-csr}
-## 通过外部 CA 更新证书
+## 通过外部 CA 更新证书 {#renew-certificates-with-external-ca}
本节提供有关如何使用外部 CA 执行手动更新证书的更多详细信息。
@@ -372,8 +371,8 @@ In kubeadm terms, any certificate that would normally be signed by an on-disk CA
CSR 表示向 CA 请求客户的签名证书。
在 kubeadm 术语中,通常由磁盘 CA 签名的任何证书都可以作为 CSR 生成。但是,CA 不能作为 CSR 生成。
-
-### 创建证书签名请求 (CSR)
+### 创建证书签名请求 (CSR) {#create-certificate-signing-requests-csr-1}
你可以通过 `kubeadm certs renew --csr-only` 命令创建证书签名请求。
CSR 和随附的私钥都在输出中给出。
你可以传入一个带有 `--csr-dir` 的目录,将 CRS 输出到指定位置。
-如果未指定 `--csr-dir` ,则使用默认证书目录(`/etc/kubernetes/pki`)。
+如果未指定 `--csr-dir`,则使用默认证书目录(`/etc/kubernetes/pki`)。
使用首选方法对证书签名后,必须将证书和私钥复制到 PKI 目录(默认为 `/etc/kubernetes/pki` )。
@@ -431,7 +430,7 @@ Kubeadm does not support rotation or replacement of CA certificates out of the b
For more information about manual rotation or replacement of CA, see [manual rotation of CA certificates](/docs/tasks/tls/manual-rotation-of-ca-certificates/).
-->
-## 证书机构(CA)轮换 {#certificate-authority-rotation}
+## 证书机构(CA)轮换 {#certificate-authority-rotation}
kubeadm 并不直接支持对 CA 证书的轮换或者替换。
@@ -449,9 +448,9 @@ kubelet cannot be secured with TLS.
To configure the kubelets in a new kubeadm cluster to obtain properly signed serving
certificates you must pass the following minimal configuration to `kubeadm init`:
-->
-## 启用已签名的 kubelet 服务证书 {#kubelet-serving-certs}
+## 启用已签名的 kubelet 服务证书 {#kubelet-serving-certs}
-默认情况下,kubeadm 所部署的 kubelet 服务证书是自签名(Self-Signed))。
+默认情况下,kubeadm 所部署的 kubelet 服务证书是自签名(Self-Signed)。
这意味着从 [metrics-server](https://github.com/kubernetes-sigs/metrics-server)
这类外部服务发起向 kubelet 的链接时无法使用 TLS 来完成保护。
@@ -501,7 +500,7 @@ These CSRs can be viewed using:
字段 `serverTLSBootstrap` 将允许启动引导 kubelet 的服务证书,方式
是从 `certificates.k8s.io` API 处读取。这种方式的一种局限在于这些
证书的 CSR(证书签名请求)不能被 kube-controller-manager 中默认的
-签名组件
+签名组件
[`kubernetes.io/kubelet-serving`](/zh/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers)
批准。需要用户或者第三方控制器来执行此操作。
@@ -554,7 +553,7 @@ the node identity with an out of band mechanism.
也可以使用第三方定制的控制器:
-- [kubelet-rubber-stamp](https://github.com/kontena/kubelet-rubber-stamp)
+- [kubelet-csr-approver](https://github.com/postfinance/kubelet-csr-approver)
除非既能够验证 CSR 中的 CommonName,也能检查请求的 IP 和域名,
这类控制器还算不得安全的机制。
只有完成彻底的检查,才有可能避免有恶意的、能够访问 kubelet 客户端证书的第三方
为任何 IP 或域名请求服务证书。
+
+## 为其他用户生成 kubeconfig 文件 {#kubeconfig-additional-users}
+
+
+在集群创建过程中,kubeadm 对 `admin.conf` 中的证书进行签名时,将其配置为
+`Subject: O = system:masters, CN = kubernetes-admin`。
+[`system:masters`](/zh/docs/reference/access-authn-authz/rbac/#user-facing-roles)
+是一个例外的超级用户组,可以绕过鉴权层(例如 RBAC)。
+强烈建议不要将 `admin.conf` 文件与任何人共享。
+
+
+你要使用 [`kubeadm kubeconfig user`](/zh/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig)
+命令为其他用户生成 kubeconfig 文件,这个命令支持命令行参数和
+[kubeadm 配置结构](/zh/docs/reference/config-api/kubeadm-config.v1beta3/)。
+以上命令会将 kubeconfig 打印到终端上,也可以使用 `kubeadm kubeconfig user ... > somefile.conf`
+输出到一个文件中。
+
+
+如下 kubeadm 可以在 `--config` 后加的配置文件示例:
+
+```yaml
+# example.yaml
+apiVersion: kubeadm.k8s.io/v1beta3
+kind: ClusterConfiguration
+# kubernetes 将作为 kubeconfig 中集群名称
+clusterName: "kubernetes"
+# some-dns-address:6443 将作为集群 kubeconfig 文件中服务地址(IP 或者 DNS 名称)
+controlPlaneEndpoint: "some-dns-address:6443"
+# 从本地挂载集群的 CA 秘钥和 CA 证书
+certificatesDir: "/etc/kubernetes/pki"
+```
+
+
+确保这些设置与所需的目标集群设置相匹配。可以使用以下命令查看现有集群的设置:
+
+```shell
+kubectl get cm kubeadm-config -n kube-system -o=jsonpath="{.data.ClusterConfiguration}"
+```
+
+
+以下示例将为在 `appdevs` 组的 `johndoe` 用户创建一个有效期为 24 小时的 kubeconfig 文件:
+
+```shell
+kubeadm kubeconfig user --config example.yaml --org appdevs --client-name johndoe --validity-period 24h
+```
+
+
+以下示例将为管理员创建一个有效期有一周的 kubeconfig 文件:
+
+```shell
+kubeadm kubeconfig user --config example.yaml --client-name admin --validity-period 168h
+```
\ No newline at end of file
diff --git a/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md b/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
index 9704cf3760..68b5f63b4d 100644
--- a/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
+++ b/content/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade.md
@@ -58,7 +58,7 @@ The upgrade workflow at high level is the following:
## {{% heading "prerequisites" %}}
-本页介绍如何为命名空间中容器和 Pod 使用的 CPU 资源设置最小和最大值。
+本页介绍如何为{{< glossary_tooltip text="命名空间" term_id="namespace" >}}中的容器和 Pod
+设置其所使用的 CPU 资源的最小和最大值。
你可以通过
-[LimitRange](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#limitrange-v1-core)
-对象声明 CPU 的最小和最大值. 如果 Pod 不能满足 LimitRange 的限制,它就不能在命名空间中创建。
+[LimitRange](/docs/reference/kubernetes-api/policy-resources/limit-range-v1/)
+对象声明 CPU 的最小和最大值.
+如果 Pod 不能满足 LimitRange 的限制,就无法在该命名空间中被创建。
## {{% heading "prerequisites" %}}
-{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
+{{< include "task-tutorial-prereqs.md" >}}
-你的集群中每个节点至少要有 1 个 CPU 可用才能运行本任务示例。
+在你的集群里你必须要有创建命名空间的权限。
+
+集群中的每个节点都必须至少有 1.0 个 CPU 可供 Pod 使用。
+
+请阅读 [CPU 的含义](/zh/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu)
+理解 "1 CPU" 在 Kubernetes 中的含义。
@@ -52,11 +69,11 @@ kubectl create namespace constraints-cpu-example
## 创建 LimitRange 和 Pod
-这里给出了 LimitRange 的配置文件:
+以下为 {{< glossary_tooltip text="LimitRange" term_id="limitrange" >}} 的示例清单:
{{< codenew file="admin/resource/cpu-constraints.yaml" >}}
@@ -100,24 +117,25 @@ limits:
```
-现在不管什么时候在 constraints-cpu-example 命名空间中创建容器,Kubernetes 都会执行下面这些步骤:
+现在,每当你在 constraints-mem-example 命名空间中创建 Pod 时,或者某些其他的
+Kubernetes API 客户端创建了等价的 Pod 时,Kubernetes 就会执行下面的步骤:
-* 如果容器没有声明自己的 CPU 请求和限制,将为容器指定默认 CPU 请求和限制。
+* 如果 Pod 中的任何容器未声明自己的 CPU 请求和限制,控制面将为该容器设置默认的 CPU 请求和限制。
-* 核查容器声明的 CPU 请求确保其大于或者等于 200 millicpu。
+* 确保该 Pod 中的每个容器的 CPU 请求至少 200 millicpu。
-* 核查容器声明的 CPU 限制确保其小于或者等于 800 millicpu。
+* 确保该 Pod 中每个容器 CPU 请求不大于 800 millicpu。
-这里给出了包含一个容器的 Pod 的配置文件。
-该容器声明了 500 millicpu 的 CPU 请求和 800 millicpu 的 CPU 限制。
+以下为某个仅包含一个容器的 Pod 的清单。
+该容器声明了 CPU 请求 500 millicpu 和 CPU 限制 800 millicpu 。
这些参数满足了 LimitRange 对象规定的 CPU 最小和最大限制。
{{< codenew file="admin/resource/cpu-constraints-pod.yaml" >}}
@@ -143,16 +161,16 @@ minimum and maximum CPU constraints imposed by the LimitRange.
-创建Pod:
+创建 Pod:
```shell
kubectl apply -f https://k8s.io/examples/admin/resource/cpu-constraints-pod.yaml --namespace=constraints-cpu-example
```
-确认一下 Pod 中的容器在运行:
+确认 Pod 正在运行,并且其容器处于健康状态:
```shell
kubectl get pod constraints-cpu-demo --namespace=constraints-cpu-example
@@ -168,10 +186,10 @@ kubectl get pod constraints-cpu-demo --output=yaml --namespace=constraints-cpu-e
```
-输出结果表明容器的 CPU 请求为 500 millicpu,CPU 限制为 800 millicpu。
+输出结果显示该 Pod 的容器的 CPU 请求为 500 millicpu,CPU 限制为 800 millicpu。
这些参数满足 LimitRange 规定的限制范围。
```yaml
@@ -214,10 +232,11 @@ kubectl apply -f https://k8s.io/examples/admin/resource/cpu-constraints-pod-2.ya
```
-输出结果表明 Pod 没有创建成功,因为容器声明的 CPU 限制太大了:
+输出结果表明 Pod 没有创建成功,因为其中定义了一个无法被接受的容器。
+该容器之所以无法被接受是因为其中设定了过高的 CPU 限制值:
```
Error from server (Forbidden): error when creating "examples/admin/resource/cpu-constraints-pod-2.yaml":
@@ -227,12 +246,12 @@ pods "constraints-cpu-demo-2" is forbidden: maximum cpu usage per Container is 8
## 尝试创建一个不满足最小 CPU 请求的 Pod
-这里给出了包含一个容器的 Pod 的配置文件。该容器声明了100 millicpu的 CPU 请求和800 millicpu的 CPU 限制。
+以下为某个只有一个容器的 Pod 的清单。该容器声明了 CPU 请求 100 millicpu 和 CPU 限制 800 millicpu。
{{< codenew file="admin/resource/cpu-constraints-pod-3.yaml" >}}
@@ -246,10 +265,12 @@ kubectl apply -f https://k8s.io/examples/admin/resource/cpu-constraints-pod-3.ya
```
-输出结果显示 Pod 没有创建成功,因为容器声明的 CPU 请求太小了:
+输出结果显示 Pod 没有创建成功,因为其中定义了一个无法被接受的容器。
+该容器无法被接受的原因是其中所设置的 CPU 请求小于最小值的限制:
```
Error from server (Forbidden): error when creating "examples/admin/resource/cpu-constraints-pod-3.yaml":
@@ -259,12 +280,12 @@ pods "constraints-cpu-demo-4" is forbidden: minimum cpu usage per Container is 2
## 创建一个没有声明 CPU 请求和 CPU 限制的 Pod
-这里给出了包含一个容器的 Pod 的配置文件。该容器没有设定 CPU 请求和 CPU 限制。
+以下为一个只有一个容器的 Pod 的清单。该容器没有声明 CPU 请求,也没有声明 CPU 限制。
{{< codenew file="admin/resource/cpu-constraints-pod-4.yaml" >}}
@@ -287,11 +308,14 @@ kubectl get pod constraints-cpu-demo-4 --namespace=constraints-cpu-example --out
```
-输出结果显示 Pod 的容器有个 800 millicpu 的 CPU 请求和 800 millicpu 的 CPU 限制。
-容器是怎样得到那些值的呢?
+输出结果显示 Pod 的唯一容器的 CPU 请求为 800 millicpu,CPU 限制为 800 millicpu。
+
+容器是怎样获得这些数值的呢?
+
```yaml
resources:
@@ -302,26 +326,27 @@ resources:
```
-因为你的 Container 没有声明自己的 CPU 请求和限制,LimitRange 给它指定了
-[默认的 CPU 请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)
+因为这一容器没有声明自己的 CPU 请求和限制,
+控制面会根据命名空间中配置 LimitRange
+设置[默认的 CPU 请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)。
-此时,你的容器可能运行也可能没有运行。
-回想一下,本任务的先决条件是你的节点要有 1 个 CPU。
-如果你的每个节点仅有 1 个 CPU,那么可能没有任何一个节点可以满足 800 millicpu 的 CPU 请求。
-如果你在用的节点恰好有两个 CPU,那么你才可能有足够的 CPU 来满足 800 millicpu 的请求。
+此时,你的 Pod 可能已经运行起来也可能没有运行起来。
+回想一下我们本次任务的先决条件是你的每个节点都至少有 1 CPU。
+如果你的每个节点都只有 1 CPU,那将没有一个节点拥有足够的可分配 CPU 来满足 800 millicpu 的请求。
+如果你在用的节点恰好有 2 CPU,那么有可能有足够的 CPU 来满足 800 millicpu 的请求。
```
kubectl delete pod constraints-cpu-demo-4 --namespace=constraints-cpu-example
diff --git a/content/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md b/content/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md
index e0da942183..203fcc95eb 100644
--- a/content/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md
+++ b/content/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace.md
@@ -107,8 +107,8 @@ file for the LimitRange, they were created automatically.
Now whenever you define a Pod within the constraints-mem-example namespace, Kubernetes
performs these steps:
-* If any container in that Pod does not specify its own memory request and limit, assign
-the default memory request and limit to that container.
+* If any container in that Pod does not specify its own memory request and limit,
+the control plane assig nthe default memory request and limit to that container.
* Verify that every container in that Pod requests at least 500 MiB of memory.
@@ -121,7 +121,7 @@ minimum and maximum memory constraints imposed by the LimitRange.
-->
现在,每当在 constraints-mem-example 命名空间中创建 Pod 时,Kubernetes 就会执行下面的步骤:
-* 如果 Pod 中的任何容器未声明自己的内存请求和限制,将为该容器设置默认的内存请求和限制。
+* 如果 Pod 中的任何容器未声明自己的内存请求和限制,控制面将为该容器设置默认的内存请求和限制。
* 确保该 Pod 中的每个容器的内存请求至少 500 MiB。
diff --git a/content/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md b/content/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md
index 2a1345364c..a88e74255d 100644
--- a/content/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md
+++ b/content/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace.md
@@ -2,35 +2,55 @@
title: 为命名空间配置默认的内存请求和限制
content_type: task
weight: 10
+description: >-
+ 为命名空间定义默认的内存资源限制,在该命名空间中每个新建的 Pod 都会被配置上内存资源限制。
---
+本章介绍如何为{{< glossary_tooltip text="命名空间" term_id="namespace" >}}配置默认的内存请求和限制。
+
+一个 Kubernetes 集群可被划分为多个命名空间。
+如果你在具有默认内存[限制](/zh/docs/concepts/configuration/manage-resources-containers/#requests-and-limits)
+的命名空间内尝试创建一个 Pod,并且这个 Pod 中的容器没有声明自己的内存资源限制,
+那么{{< glossary_tooltip text="控制面" term_id="control-plane" >}}会为该容器设定默认的内存限制。
-本文介绍怎样给命名空间配置默认的内存请求和限制。
-如果在一个有默认内存限制的命名空间创建容器,该容器没有声明自己的内存限制时,
-将会被指定默认内存限制。
Kubernetes 还为某些情况指定了默认的内存请求,本章后面会进行介绍。
## {{% heading "prerequisites" %}}
-{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
+{{< include "task-tutorial-prereqs.md" >}}
+在你的集群里你必须要有创建命名空间的权限。
+
你的集群中的每个节点必须至少有 2 GiB 的内存。
@@ -52,12 +72,14 @@ kubectl create namespace default-mem-example
## 创建 LimitRange 和 Pod
-这里给出了一个限制范围对象的配置文件。该配置声明了一个默认的内存请求和一个默认的内存限制。
+以下为 {{< glossary_tooltip text="LimitRange" term_id="limitrange" >}} 的示例清单。
+清单中声明了默认的内存请求和默认的内存限制。
{{< codenew file="admin/resource/memory-defaults.yaml" >}}
@@ -71,19 +93,20 @@ kubectl apply -f https://k8s.io/examples/admin/resource/memory-defaults.yaml --n
```
-现在,如果在 default-mem-example 命名空间创建容器,并且该容器没有声明自己的内存请求和限制值,
-它将被指定默认的内存请求 256 MiB 和默认的内存限制 512 MiB。
+现在如果你在 default-mem-example 命名空间中创建一个 Pod,
+并且该 Pod 中所有容器都没有声明自己的内存请求和内存限制,
+{{< glossary_tooltip text="控制面" term_id="control-plane" >}}
+会将内存的默认请求值 256MiB 和默认限制值 512MiB 应用到 Pod 上。
-下面是具有一个容器的 Pod 的配置文件。
-容器未指定内存请求和限制。
+以下为只包含一个容器的 Pod 的清单。该容器没有声明内存请求和限制。
{{< codenew file="admin/resource/memory-defaults-pod.yaml" >}}
@@ -106,7 +129,7 @@ kubectl get pod default-mem-demo --output=yaml --namespace=default-mem-example
```
输出内容显示该 Pod 的容器有 256 MiB 的内存请求和 512 MiB 的内存限制。
@@ -134,14 +157,14 @@ kubectl delete pod default-mem-demo --namespace=default-mem-example
```
## 声明容器的限制而不声明它的请求会怎么样?
-这里给出了包含一个容器的 Pod 的配置文件。该容器声明了内存限制,而没有声明内存请求:
+以下为只包含一个容器的 Pod 的清单。该容器声明了内存限制,而没有声明内存请求。
{{< codenew file="admin/resource/memory-defaults-pod-2.yaml" >}}
@@ -164,8 +187,8 @@ kubectl get pod default-mem-demo-2 --output=yaml --namespace=default-mem-example
```
输出结果显示容器的内存请求被设置为它的内存限制相同的值。注意该容器没有被指定默认的内存请求值 256MiB。
@@ -178,15 +201,15 @@ resources:
```
## 声明容器的内存请求而不声明内存限制会怎么样?
-这里给出了一个包含一个容器的 Pod 的配置文件。该容器声明了内存请求,但没有内存限制:
+以下为只包含一个容器的 Pod 的清单。该容器声明了内存请求,但没有内存限制:
{{< codenew file="admin/resource/memory-defaults-pod-3.yaml" >}}
@@ -209,12 +232,12 @@ kubectl get pod default-mem-demo-3 --output=yaml --namespace=default-mem-example
```
-输出结果显示该容器的内存请求被设置为了容器配置文件中声明的数值。
-容器的内存限制被设置为 512MiB,即命名空间的默认内存限制。
+输出结果显示所创建的 Pod 中,容器的内存请求为 Pod 清单中声明的值。
+然而同一容器的内存限制被设置为 512MiB,此值是该命名空间的默认内存限制值。
```
resources:
@@ -227,27 +250,45 @@ resources:
## 设置默认内存限制和请求的动机
-如果你的命名空间有资源配额,那么默认内存限制是很有帮助的。
-下面是一个例子,通过资源配额为命名空间设置两项约束:
+如果你的命名空间设置了内存 {{< glossary_tooltip text="资源配额" term_id="resource-quota" >}},
+那么为内存限制设置一个默认值会很有帮助。
+以下是内存资源配额对命名空间的施加的三条限制:
+
+* 命名空间中运行的每个 Pod 中的容器都必须有内存限制。
+ (如果为 Pod 中的每个容器声明了内存限制,
+ Kubernetes 可以通过将其容器的内存限制相加推断出 Pod 级别的内存限制)。
+
+* 内存限制用来在 Pod 被调度到的节点上执行资源预留。
+ 预留给命名空间中所有 Pod 使用的内存总量不能超过规定的限制。
+
+* 命名空间中所有 Pod 实际使用的内存总量也不能超过规定的限制。
-* 运行在命名空间中的每个容器必须有自己的内存限制。
-* 命名空间中所有容器的内存使用量之和不能超过声明的限制值。
+When you add a LimitRange:
-
-如果一个容器没有声明自己的内存限制,会被指定默认限制,然后它才会被允许在限定了配额的命名空间中运行。
+当你添加 LimitRange 时:
+
+如果该命名空间中的任何 Pod 的容器未指定内存限制,
+控制面将默认内存限制应用于该容器,
+这样 Pod 可以在受到内存 ResourceQuota 限制的命名空间中运行。
-本文介绍怎样为命名空间设置容器可用的内存和 CPU 总量。你可以通过
-[ResourceQuota](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#resourcequota-v1-core)
+本文介绍如何为{{< glossary_tooltip text="命名空间" term_id="namespace" >}}下运行的所有 Pod 设置总的内存和 CPU 配额。
+你可以通过使用
+[ResourceQuota](/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/)
对象设置配额.
## {{% heading "prerequisites" %}}
-{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
+{{< include "task-tutorial-prereqs.md" >}}
+在你的集群里你必须要有创建命名空间的权限。
+
集群中每个节点至少有 1 GiB 的内存。
@@ -51,11 +61,11 @@ kubectl create namespace quota-mem-cpu-example
## 创建 ResourceQuota
-这里给出一个 ResourceQuota 对象的配置文件:
+下面是 ResourceQuota 的示例清单:
{{< codenew file="admin/resource/quota-mem-cpu.yaml" >}}
@@ -80,28 +90,33 @@ kubectl get resourcequota mem-cpu-demo --namespace=quota-mem-cpu-example --outpu
ResourceQuota 在 quota-mem-cpu-example 命名空间中设置了如下要求:
-* 每个容器必须有内存请求和限制,以及 CPU 请求和限制。
-* 所有容器的内存请求总和不能超过1 GiB。
-* 所有容器的内存限制总和不能超过2 GiB。
-* 所有容器的 CPU 请求总和不能超过1 cpu。
-* 所有容器的 CPU 限制总和不能超过2 cpu。
+* 在该命名空间中的每个 Pod 的所有容器都必须要有内存请求和限制,以及 CPU 请求和限制。
+* 在该命名空间中所有 Pod 的内存请求总和不能超过 1 GiB。
+* 在该命名空间中所有 Pod 的内存限制总和不能超过 2 GiB。
+* 在该命名空间中所有 Pod 的 CPU 请求总和不能超过 1 cpu。
+* 在该命名空间中所有 Pod 的 CPU 限制总和不能超过 2 cpu。
+请阅读 [CPU 的含义](/zh/docs/concepts/configuration/manage-resources-containers/#meaning-of-cpu)
+理解 "1 CPU" 在 Kubernetes 中的含义。
## 创建 Pod
-这里给出 Pod 的配置文件:
+以下是 Pod 的示例清单:
{{< codenew file="admin/resource/quota-mem-cpu-pod.yaml" >}}
@@ -115,11 +130,11 @@ kubectl apply -f https://k8s.io/examples/admin/resource/quota-mem-cpu-pod.yaml -
```
-检查下 Pod 中的容器在运行:
+确认 Pod 正在运行,并且其容器处于健康状态:
-```
+```shell
kubectl get pod quota-mem-cpu-demo --namespace=quota-mem-cpu-example
```
@@ -128,7 +143,7 @@ Once again, view detailed information about the ResourceQuota:
-->
再查看 ResourceQuota 的详情:
-```
+```shell
kubectl get resourcequota mem-cpu-demo --namespace=quota-mem-cpu-example --output=yaml
```
@@ -153,27 +168,38 @@ status:
requests.memory: 600Mi
```
+
+如果有 `jq` 工具的话,你可以通过(使用 [JSONPath](/zh/docs/reference/kubectl/jsonpath/))
+直接查询 `used` 字段的值,并且输出整齐的 JSON 格式。
+
+```shell
+kubectl get resourcequota mem-cpu-demo --namespace=quota-mem-cpu-example -o jsonpath='{ .status.used }' | jq .
+```
+
## 尝试创建第二个 Pod
-这里给出了第二个 Pod 的配置文件:
+以下为第二个 Pod 的清单:
{{< codenew file="admin/resource/quota-mem-cpu-pod-2.yaml" >}}
-配置文件中,你可以看到 Pod 的内存请求为 700 MiB。
-请注意新的内存请求与已经使用的内存请求只和超过了内存请求的配额。
+在清单中,你可以看到 Pod 的内存请求为 700 MiB。
+请注意新的内存请求与已经使用的内存请求之和超过了内存请求的配额:
600 MiB + 700 MiB > 1 GiB。
尝试创建 Pod:
@@ -198,19 +224,20 @@ requested: requests.memory=700Mi,used: requests.memory=600Mi, limited: requests.
## Discussion
As you have seen in this exercise, you can use a ResourceQuota to restrict
-the memory request total for all Containers running in a namespace.
+the memory request total for all Pods running in a namespace.
You can also restrict the totals for memory limit, cpu request, and cpu limit.
-If you want to restrict individual Containers, instead of totals for all Containers, use a
-[LimitRange](/docs/tasks/administer-cluster/memory-constraint-namespace/).
+Instead of managing total resource use within a namespace, you might want to restrict
+individual Pods, or the containers in those Pods. To achieve that kind of limiting, use a
+[LimitRange](/docs/concepts/policy/limit-range/).
-->
## 讨论
-如你在本练习中所见,你可以用 ResourceQuota 限制命名空间中所有容器的内存请求总量。
+如你在本练习中所见,你可以用 ResourceQuota 限制命名空间中所有 Pod 的内存请求总量。
同样你也可以限制内存限制总量、CPU 请求总量、CPU 限制总量。
-如果你想对单个容器而不是所有容器进行限制,就请使用
-[LimitRange](/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)。
+除了可以管理命名空间资源使用的总和,如果你想限制单个 Pod,或者限制这些 Pod 中的容器资源,
+可以使用 [LimitRange](/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) 实现这类的功能。
+
-本文主要描述如何配置一个命名空间下可运行的 Pod 个数配额。
-你可以使用
-[ResourceQuota](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#resourcequota-v1-core)
+本文主要介绍如何在{{< glossary_tooltip text="命名空间" term_id="namespace" >}}中设置可运行 Pod 总数的配额。
+你可以通过使用
+[ResourceQuota](/zh/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/)
对象来配置配额。
## {{% heading "prerequisites" %}}
-{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
+{{< include "task-tutorial-prereqs.md" >}}
+
+
+在你的集群里你必须要有创建命名空间的权限。
@@ -40,11 +55,11 @@ kubectl create namespace quota-pod-example
## 创建 ResourceQuota
-下面是一个 ResourceQuota 的配置文件:
+下面是 ResourceQuota 的示例清单:
{{< codenew file="admin/resource/quota-pod.yaml" >}}
@@ -83,18 +98,20 @@ status:
```
-下面是一个 Deployment 的配置文件:
+下面是一个 {{< glossary_tooltip term_id="deployment" >}} 的示例清单:
{{< codenew file="admin/resource/quota-pod-deployment.yaml" >}}
-在配置文件中,`replicas: 3` 告诉 Kubernetes 尝试创建三个 Pods,且运行相同的应用。
+在清单中,`replicas: 3` 告诉 Kubernetes 尝试创建三个 Pods,
+且运行相同的应用。
创建这个 Deployment:
@@ -113,7 +130,7 @@ kubectl get deployment pod-quota-demo --namespace=quota-pod-example --output=yam
从输出的信息我们可以看到,尽管尝试创建三个 Pod,但是由于配额的限制,只有两个 Pod 能被成功创建。
@@ -125,11 +142,24 @@ spec:
status:
availableReplicas: 2
...
-lastUpdateTime: 2017-07-07T20:57:05Z
+lastUpdateTime: 2021-04-02T20:57:05Z
message: 'unable to create pods: pods "pod-quota-demo-1650323038-" is forbidden:
exceeded quota: pod-demo, requested: pods=1, used: pods=2, limited: pods=2'
```
+
+### 资源的选择
+在此任务中,你定义了一个限制 Pod 总数的 ResourceQuota,
+你也可以限制其他类型对象的总数。例如,
+你可以限制在一个命名空间中可以创建的 {{< glossary_tooltip text="CronJobs" term_id="cronjob" >}} 的数量。
+
+Dockershim 在 Kubernetes v1.24 版本已经被移除。
+如果你集群内是通过 dockershim 使用 Docker 作为容器运行时,并希望 Kubernetes 升级到 v1.24,
+建议你迁移到其他容器运行时或使用其他方法以获得 Docker 引擎支持。
+
+
+你的集群中可以有不止一种类型的节点,尽管这不是常见的情况。
+
+下面这些任务可以帮助你完成迁移:
+
+* [检查弃用 Dockershim 对你的影响](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-deprecation-affects-you/)
+* [dockershim 迁移](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/)
+* [从 dockershim 迁移遥测和安全代理](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/migrating-telemetry-and-security-agents/)
+
+
+## 下一步
+
+* 查看[容器运行时](/zh/docs/setup/production-environment/container-runtimes/)了解可选的容器运行时。
+* [GitHub 问题](https://github.com/kubernetes/kubernetes/issues/106917)跟踪有关 dockershim 的弃用和删除的讨论。
+* 如果你发现与 dockershim 迁移相关的缺陷或其他技术问题,
+ 可以在 Kubernetes 项目[报告问题](https://github.com/kubernetes/kubernetes/issues/new/choose)。
+
\ No newline at end of file
diff --git a/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md b/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
index 44f4a9f008..1690588b64 100644
--- a/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
+++ b/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
@@ -81,11 +81,11 @@ for detailed steps to install containerd.
1. Install the `containerd.io` package from the official Docker repositories.
Instructions for setting up the Docker repository for your respective Linux distribution and
installing the `containerd.io` package can be found at
- [Install Docker Engine](https://docs.docker.com/engine/install/#server).
+ [Getting started with containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md).
-->
1. 从官方的 Docker 仓库安装 `containerd.io` 包。关于为你所使用的 Linux 发行版来设置
Docker 仓库,以及安装 `containerd.io` 包的详细说明,可参见
- [Install Docker Engine](https://docs.docker.com/engine/install/#server)。
+ [开始使用 containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md)。
+
Kubernetes 的 `dockershim` 组件使得你可以把 Docker 用作 Kubernetes 的
{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}。
-在 Kubernetes v1.20 版本中,内建组件 `dockershim` 被[弃用](/zh/blog/2020/12/08/kubernetes-1-20-release-announcement/#dockershim-deprecation)。
+在 Kubernetes v1.24 版本中,内建组件 `dockershim` 被移除。
本页讲解你的集群把 Docker 用作容器运行时的运作机制,
并提供使用 `dockershim` 时,它所扮演角色的详细信息,
@@ -67,6 +66,18 @@ dependency on Docker:
- SSH to nodes to troubleshoot;
- Node startup scripts;
- Monitoring and security agents installed on nodes directly.
+-->
+1. 确认没有特权 Pod 执行 Docker 命令(如 `docker ps`)、重新启动 Docker
+ 服务(如 `systemctl restart docker.service`)或修改 Docker 配置文件
+ `/etc/docker/daemon.json`。
+2. 检查 Docker 配置文件(如 `/etc/docker/daemon.json`)中容器镜像仓库的镜像(mirror)站点设置。
+ 这些配置通常需要针对不同容器运行时来重新设置。
+3. 检查确保在 Kubernetes 基础设施之外的节点上运行的脚本和应用程序没有执行 Docker 命令。
+ 可能的情况有:
+ - SSH 到节点排查故障;
+ - 节点启动脚本;
+ - 直接安装在节点上的监控和安全代理。
+
-1. 确认没有特权 Pod 执行 Docker 命令(如 `docker ps`)、重新启动 Docker
- 服务(如 `systemctl restart docker.service`)或修改 Docker 配置文件
- `/etc/docker/daemon.json`。
-2. 检查 Docker 配置文件(如 `/etc/docker/daemon.json`)中容器镜像仓库的镜像(mirror)站点设置。
- 这些配置通常需要针对不同容器运行时来重新设置。
-3. 检查确保在 Kubernetes 基础设施之外的节点上运行的脚本和应用程序没有执行 Docker 命令。
- 可能的情况如:
- - SSH 到节点排查故障;
- - 节点启动脚本;
- - 直接安装在节点上的监控和安全代理。
-4. 检查执行上述特权操作的第三方工具。详细操作请参考
- [从 dockershim 迁移遥测和安全代理](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/migrating-telemetry-and-security-agents)。
+4. 检查执行上述特权操作的第三方工具。
+ 详细操作请参考[从 dockershim 迁移遥测和安全代理](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/migrating-telemetry-and-security-agents)。
5. 确认没有对 dockershim 行为的间接依赖。这是一种极端情况,不太可能影响你的应用。
一些工具很可能被配置为使用了 Docker 特性,比如,基于特定指标发警报,
或者在故障排查指令的一个环节中搜索特定的日志信息。
@@ -106,7 +107,8 @@ and scheduling of Pods; on each node, the {{< glossary_tooltip text="kubelet" te
uses the container runtime interface as an abstraction so that you can use any compatible
container runtime.
-->
-[容器运行时](/zh/docs/concepts/containers/#container-runtimes)是一个软件,用来运行组成 Kubernetes Pod 的容器。
+[容器运行时](/zh/docs/concepts/containers/#container-runtimes)是一个软件,
+用来运行组成 Kubernetes Pod 的容器。
Kubernetes 负责编排和调度 Pod;在每一个节点上,{{< glossary_tooltip text="kubelet" term_id="kubelet" >}}
使用抽象的容器运行时接口,所以你可以任意选用兼容的容器运行时。
@@ -119,8 +121,8 @@ adapter component, `dockershim`. The dockershim adapter allows the kubelet to in
if Docker were a CRI compatible runtime.
-->
在早期版本中,Kubernetes 提供的兼容性支持一个容器运行时:Docker。
-在 Kubernetes 发展历史中,集群运营人员希望采用更多的容器运行时。
-于是 CRI 被设计出来满足这类灵活性需要 - 而 kubelet 亦开始支持 CRI。
+在 Kubernetes 后来的发展历史中,集群运营人员希望采用别的容器运行时。
+于是 CRI 被设计出来满足这类灵活性需求 - 而 kubelet 亦开始支持 CRI。
然而,因为 Docker 在 CRI 规范创建之前就已经存在,Kubernetes 就创建了一个适配器组件 `dockershim`。
dockershim 适配器允许 kubelet 与 Docker 交互,就好像 Docker 是一个 CRI 兼容的运行时一样。
@@ -140,7 +142,7 @@ now, since containers schedule directly with the container runtime, they are not
So any Docker tooling or fancy UI you might have used
before to check on these containers is no longer available.
-->
-切换到容器运行时 Containerd 可以消除掉中间环节。
+切换到 Containerd 容器运行时可以消除掉中间环节。
所有相同的容器都可由 Containerd 这类容器运行时来运行。
但是现在,由于直接用容器运行时调度容器,它们对 Docker 是不可见的。
因此,你以前用来检查这些容器的 Docker 工具或漂亮的 UI 都不再可用。
@@ -153,12 +155,12 @@ or execute something inside container using `docker exec`.
你不能再使用 `docker ps` 或 `docker inspect` 命令来获取容器信息。
由于你不能列出容器,因此你不能获取日志、停止容器,甚至不能通过 `docker exec` 在容器中执行命令。
+{{< note >}}
-{{< note >}}
如果你在用 Kubernetes 运行工作负载,最好通过 Kubernetes API 停止容器,
而不是通过容器运行时来停止它们
(此建议适用于所有容器运行时,不仅仅是针对 Docker)。
@@ -174,12 +176,13 @@ by Kubernetes.
但用 Docker 创建、下载的镜像,对于容器运行时和 Kubernetes,均不可见。
为了在 Kubernetes 中使用,需要把镜像推送(push)到某镜像仓库。
-
-## {{% heading "whatsnext" %}}
+- 阅读[从 dockershim 迁移](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/),
+ 以了解你的下一步工作。
+- 阅读[dockershim 弃用常见问题解答](/zh/blog/2020/12/02/dockershim-faq/)文章,了解更多信息。
-- 阅读[从 dockershim 迁移](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/)以了解你的下一步工作
-- 阅读[dockershim 弃用常见问题解答](/zh/blog/2020/12/02/dockershim-faq/)文章了解更多信息。
\ No newline at end of file
diff --git a/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md b/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md
index 7a6f3c8df9..4e1380322b 100644
--- a/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md
+++ b/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use.md
@@ -44,7 +44,7 @@ Install and configure `kubectl`. See [Install Tools](/docs/tasks/tools/#kubectl)
Use `kubectl` to fetch and show node information:
-->
-## 查明节点所使用的容器运行时
+## 查明节点所使用的容器运行时 {#find-out-the-container-runtime-used-on-a-node}
使用 `kubectl` 来读取并显示节点信息:
@@ -55,16 +55,34 @@ kubectl get nodes -o wide
输出如下面所示。`CONTAINER-RUNTIME` 列给出容器运行时及其版本。
+对于 Docker Engine,输出类似于:
```none
-# For dockershim
NAME STATUS VERSION CONTAINER-RUNTIME
node-1 Ready v1.16.15 docker://19.3.1
node-2 Ready v1.16.15 docker://19.3.1
node-3 Ready v1.16.15 docker://19.3.1
```
+
+
+如果你的容器运行时显示为 Docker Engine,你仍然可能不会被 1.24 中 dockershim 的移除所影响。
+通过[检查运行时端点](#which-endpoint),可以查看你是否在使用 dockershim。
+如果你没有使用 dockershim,你就不会被影响。
+看下是否是使用的 dockershim,如何是 dockershim 则会受到在 Kubernetes 1.24 中移除 dockershim 的影响。
+反之则不会受到影响。
+
+对于 containerd,输出类似于这样:
```none
# For containerd
@@ -76,8 +94,93 @@ node-3 Ready v1.19.6 containerd://1.4.1
你可以在[容器运行时](/zh/docs/setup/production-environment/container-runtimes/)
页面找到与容器运行时相关的更多信息。
+
+## 检查当前使用的运行时端点 {#which-endpoint}
+
+
+
+容器运行时使用 Unix Socket 与 kubelet 通信,这一通信使用基于 gRPC 框架的
+[CRI 协议](/zh/docs/concepts/architecture/cri/)。kubelet 扮演客户端,运行时扮演服务器端。
+在某些情况下,你可能想知道你的节点使用的是哪个 socket。
+如若集群是 Kubernetes 1.24 及以后的版本,
+或许你想知道当前运行时是否是使用 dockershim 的 Docker Engine。
+
+
+
+{{}}
+如果你的节点在通过 `cri-dockerd` 使用 Docker Engine,
+那么集群不会受到 Kubernetes 移除 dockershim 的影响。
+{{}}
+
+
+可以通过检查 kubelet 的参数得知当前使用的是哪个 socket。
+
+
+1. 查看 kubelet 进程的启动命令
+
+ ```
+ tr \\0 ' ' < /proc/"$(pgrep kubelet)"/cmdline
+ ```
+ 如有节点上没有 `tr` 或者 `pgrep`,就需要手动检查 kubelet 的启动命令
+
+
+2. 在命令的输出中,查找 `--container-runtime` 和 `--container-runtime-endpoint` 标志。
+
+ * 如果 Kubernetes 集群版本是 v1.23 或者更早的版本,并且这两个参数不存在,
+ 或者 `container-runtime` 标志值不是 `remote`,则你在通过 dockershim 套接字使用
+ Docker Engine。
+ 或者如果集群使用的 Docker engine 和 dockershim socket,则输出结果中 `--container-runtime` 不是 `remote`,
+ * 如果设置了 `--container-runtime-endpoint` 参数,查看套接字名称即可得知当前使用的运行时。
+ 如若套接字 `unix:///run/containerd/containerd.sock` 是 containerd 的端点。
+
+
+如果你通过 dockershim 来使用 Docker Engine,可在
+[迁移到不同的运行时](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/)
+找到更多信息。或者,如果你想在 Kubernetes v1.24 及以后的版本仍使用 Docker Engine,
+可以安装 CRI 兼容的适配器实现,如 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)。
+[`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)。
\ No newline at end of file
diff --git a/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/migrate-dockershim-dockerd.md b/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/migrate-dockershim-dockerd.md
new file mode 100644
index 0000000000..43a80ef2df
--- /dev/null
+++ b/content/zh/docs/tasks/administer-cluster/migrating-from-dockershim/migrate-dockershim-dockerd.md
@@ -0,0 +1,233 @@
+---
+title: 将 Docker Engine 节点从 dockershim 迁移到 cri-dockerd
+weight: 9
+content_type: task
+---
+
+
+
+{{% thirdparty-content %}}
+
+
+本页面为你展示如何迁移你的 Docker Engine 节点,使之使用 `cri-dockerd` 而不是 dockershim。
+在以下场景中,你可以遵从这里的步骤执行操作:
+
+* 你期望不再使用 dockershim,但仍然使用 Docker Engine 来在 Kubernetes 中运行容器。
+* 你希望升级到 Kubernetes v{{< skew currentVersion >}} 且你的现有集群依赖于 dockershim,
+ 因此你必须放弃 dockershim,而 `cri-dockerd` 是你的一种选项。
+
+要进一步了解 dockershim 的移除,请阅读 [FAQ 页面](/zh/dockershim)。
+
+
+## cri-dockerd 是什么? {#what-is-cri-dockerd}
+
+在 Kubernetes v1.24 及更早版本中,你可以在 Kubernetes 中使用 Docker Engine,
+依赖于一个称作 _dockershim_ 的内置 Kubernetes 组件。
+dockershim 组件在 Kubernetes v1.24 发行版本中已被移除;不过,一种来自第三方的替代品,
+`cri-dockerd` 是可供使用的。`cri-dockerd` 适配器允许你通过
+{{}}
+来使用 Docker Engine。
+
+{{}}
+
+如果你已经在使用 `cri-dockerd`,那么你不会被 dockershim 的移除影响到。
+在开始之前,[检查你的节点是否在使用 dockershim](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use/)。
+{{}}
+
+
+如果你想要迁移到 `cri-dockerd` 以便继续使用 Docker Engine 作为你的容器运行时,
+你需要在所有被影响的节点上执行以下操作:
+
+1. 安装 `cri-dockerd`;
+1. 隔离(Cordon)并腾空(Drain)该节点;
+1. 配置 kubelet 使用 `cri-dockerd`;
+1. 重新启动 kubelet;
+1. 验证节点处于健康状态。
+
+
+首先在非关键节点上测试这一迁移过程。
+
+你应该针对所有希望迁移到 `cri-dockerd` 的节点执行以下步骤。
+
+## {{% heading "prerequisites" %}}
+
+
+* 安装了 [`cri-dockerd`](https://github.com/mirantis/cri-dockerd#build-and-install)
+ 并且该服务已经在各节点上启动;
+* 一个[网络插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)。
+
+
+## 隔离并腾空节点 {#cordon-and-drain-the-node}
+
+1. 隔离节点,阻止新的 Pod 被调度到节点上:
+
+ ```shell
+ kubectl cordon
+ ```
+
+ 将 `` 替换为节点名称。
+
+
+2. 腾空节点以安全地逐出所有运行中的 Pod:
+
+ ```shell
+ kubectl drain --ignore-daemonsets
+ ```
+
+
+## 配置 kubelet 使用 cri-dockerd {#configure-the-kubelet-to-use-cri-dockerd}
+
+下面的步骤适用于用 kubeadm 工具安装的集群。如果你使用不同的工具,
+你需要使用针对该工具的配置指令来修改 kubelet。
+
+
+1. 在每个被影响的节点上,打开 `/var/lib/kubelet/kubeadm-flags.env` 文件;
+1. 将 `--container-runtime-endpoint` 标志,将其设置为 `unix:///var/run/cri-dockerd.sock`。
+
+
+kubeadm 工具将节点上的套接字存储为控制面上 `Node` 对象的注解。
+要为每个被影响的节点更改此套接字:
+
+
+1. 编辑 `Node` 对象的 YAML 表示:
+
+ ```shell
+ KUBECONFIG=/path/to/admin.conf kubectl edit no
+ ```
+
+ 根据下面的说明执行替换:
+
+ * `/path/to/admin.conf`:指向 kubectl 配置文件 `admin.conf` 的路径;
+ * ``:你要修改的节点的名称。
+
+1. 将 `kubeadm.alpha.kubernetes.io/cri-socket` 标志从
+ `/var/run/dockershim.sock` 更改为 `unix:///var/run/cri-dockerd.sock`;
+1. 保存所作更改。保存时,`Node` 对象被更新
+
+
+
+## 重启 kubelet {#restart-the-kubelet}
+
+```shell
+systemctl restart kubelet
+```
+
+
+## 验证节点处于健康状态 {#verify-that-the-node-is-healthy}
+
+要检查节点是否在使用 `cri-dockerd` 端点,
+按照[找出你所使用的运行时](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/find-out-runtime-you-use/)页面所给的指令操作。
+kubelet 的 `--container-runtime-endpoint` 标志取值应该是 `unix:///var/run/cri-dockerd.sock`。
+
+
+## 解除节点隔离 {#uncordon-the-node}
+
+```shell
+kubectl uncordon
+```
+
+## {{% heading "whatsnext" %}}
+
+
+* 阅读 [dockershim 移除常见问题](/zh/dockershim)。
+* [了解如何从基于 dockershim 的 Docker Engine 迁移到 containerd](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd/)。
+
diff --git a/content/zh/docs/tasks/administer-cluster/nodelocaldns.md b/content/zh/docs/tasks/administer-cluster/nodelocaldns.md
index b68fd3ed1e..acb02c6cfc 100644
--- a/content/zh/docs/tasks/administer-cluster/nodelocaldns.md
+++ b/content/zh/docs/tasks/administer-cluster/nodelocaldns.md
@@ -11,7 +11,9 @@ content_type: task
-->
+
{{< feature-state for_k8s_version="v1.18" state="stable" >}}
+
@@ -29,10 +31,17 @@ This page provides an overview of NodeLocal DNSCache feature in Kubernetes.
## 引言
NodeLocal DNSCache 通过在集群节点上作为 DaemonSet 运行 DNS 缓存代理来提高集群 DNS 性能。
-在当今的体系结构中,运行在 ClusterFirst DNS 模式下的 Pod 可以连接到 kube-dns `serviceIP` 进行 DNS 查询。
+在当今的体系结构中,运行在 'ClusterFirst' DNS 模式下的 Pod 可以连接到 kube-dns `serviceIP` 进行 DNS 查询。
通过 kube-proxy 添加的 iptables 规则将其转换为 kube-dns/CoreDNS 端点。
借助这种新架构,Pods 将可以访问在同一节点上运行的 DNS 缓存代理,从而避免 iptables DNAT 规则和连接跟踪。
本地缓存代理将查询 kube-dns 服务以获取集群主机名的缓存缺失(默认为 "`cluster.local`" 后缀)。
@@ -43,22 +52,29 @@ NodeLocal DNSCache 通过在集群节点上作为 DaemonSet 运行 DNS 缓存代
## 动机
* 使用当前的 DNS 体系结构,如果没有本地 kube-dns/CoreDNS 实例,则具有最高 DNS QPS
的 Pod 可能必须延伸到另一个节点。
在这种场景下,拥有本地缓存将有助于改善延迟。
* 跳过 iptables DNAT 和连接跟踪将有助于减少
[conntrack 竞争](https://github.com/kubernetes/kubernetes/issues/56903)
并避免 UDP DNS 条目填满 conntrack 表。
* 从本地缓存代理到 kube-dns 服务的连接可以升级为 TCP 。
TCP conntrack 条目将在连接关闭时被删除,相反 UDP 条目必须超时
@@ -66,14 +82,16 @@ Having a local cache will help improve the latency in such scenarios.
`nf_conntrack_udp_timeout` 是 30 秒)。
* 将 DNS 查询从 UDP 升级到 TCP 将减少由于被丢弃的 UDP 包和 DNS 超时而带来的尾部等待时间;
这类延时通常长达 30 秒(3 次重试 + 10 秒超时)。
由于 nodelocal 缓存监听 UDP DNS 查询,应用不需要变更。
* 在节点级别对 DNS 请求的度量和可见性。
@@ -101,8 +119,14 @@ This is the path followed by DNS Queries after NodeLocal DNSCache is enabled:
## Configuration
-->
## 配置
+
{{< note >}}
@@ -117,32 +141,40 @@ This feature can be enabled using the following steps:
可以使用以下步骤启动此功能:
* 根据示例 [`nodelocaldns.yaml`](https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml)
准备一个清单,把它保存为 `nodelocaldns.yaml`。
+
-* 如果使用 IPv6,在使用 IP:Port 格式的时候需要把 CoreDNS 配置文件里的所有 IPv6 地址用方括号包起来。
+* 如果使用 IPv6,在使用 'IP:Port' 格式的时候需要把 CoreDNS 配置文件里的所有 IPv6 地址用方括号包起来。
如果你使用上述的示例清单,需要把
[配置行 L70](https://github.com/kubernetes/kubernetes/blob/b2ecd1b3a3192fbbe2b9e348e095326f51dc43dd/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml#L70)
- 修改为 `health [__PILLAR__LOCAL__DNS__]:8080`。
+ 修改为: "`health [__PILLAR__LOCAL__DNS__]:8080`"。
+
* 把清单里的变量更改为正确的值:
- ```
+ ```shell
kubedns=`kubectl get svc kube-dns -n kube-system -o jsonpath={.spec.clusterIP}`
domain=
localdns=
@@ -152,15 +184,17 @@ If you are using the sample manifest from the previous point, this will require
NodeLocal DNSCache 选择的本地侦听 IP 地址。
+ `__PILLAR__CLUSTER__DNS__` and `__PILLAR__UPSTREAM__SERVERS__` will be populated by
+ the `node-local-dns` pods.
+ In this mode, the `node-local-dns` pods listen on both the kube-dns service IP
+ as well as ``, so pods can lookup DNS records using either IP address.
+-->
* 如果 kube-proxy 运行在 IPTABLES 模式:
``` bash
@@ -170,44 +204,57 @@ If you are using the sample manifest from the previous point, this will require
node-local-dns Pods 会设置 `__PILLAR__CLUSTER__DNS__` 和 `__PILLAR__UPSTREAM__SERVERS__`。
在此模式下, node-local-dns Pods 会同时侦听 kube-dns 服务的 IP 地址和
`` 的地址,以便 Pods 可以使用其中任何一个 IP 地址来查询 DNS 记录。
-
* 如果 kube-proxy 运行在 IPVS 模式:
``` bash
- sed -i "s/__PILLAR__LOCAL__DNS__/$localdns/g; s/__PILLAR__DNS__DOMAIN__/$domain/g; s/__PILLAR__DNS__SERVER__//g; s/__PILLAR__CLUSTER__DNS__/$kubedns/g" nodelocaldns.yaml
+ sed -i "s/__PILLAR__LOCAL__DNS__/$localdns/g; s/__PILLAR__DNS__DOMAIN__/$domain/g; s/,__PILLAR__DNS__SERVER__//g; s/__PILLAR__CLUSTER__DNS__/$kubedns/g" nodelocaldns.yaml
```
在此模式下,node-local-dns Pods 只会侦听 `` 的地址。
node-local-dns 接口不能绑定 kube-dns 的集群 IP 地址,因为 IPVS 负载均衡
使用的接口已经占用了该地址。
node-local-dns Pods 会设置 `__PILLAR__UPSTREAM__SERVERS__`。
-
+
* 运行 `kubectl create -f nodelocaldns.yaml`
+
* 如果 kube-proxy 运行在 IPVS 模式,需要修改 kubelet 的 `--cluster-dns` 参数
NodeLocal DNSCache 正在侦听的 `` 地址。
否则,不需要修改 `--cluster-dns` 参数,因为 NodeLocal DNSCache 会同时侦听
kube-dns 服务的 IP 地址和 `` 的地址。
-启用后,node-local-dns Pods 将在每个集群节点上的 kube-system 名字空间中运行。
-此 Pod 在缓存模式下运行 [CoreDNS](https://github.com/coredns/coredns) ,
+启用后,`node-local-dns` Pods 将在每个集群节点上的 `kube-system` 名字空间中运行。
+此 Pod 在缓存模式下运行 [CoreDNS](https://github.com/coredns/coredns),
因此每个节点都可以使用不同插件公开的所有 CoreDNS 指标。
如果要禁用该功能,你可以使用 `kubectl delete -f ` 来删除 DaemonSet。
@@ -240,7 +287,9 @@ In those cases, the `kube-dns` ConfigMap can be updated.
## 设置内存限制
@@ -267,13 +316,13 @@ using the `max_concurrent` option in the forward plugin.
你可以在 forward 插件中使用 `max_concurrent` 选项设置并发查询数量上限。
diff --git a/content/zh/docs/tasks/administer-cluster/quota-api-object.md b/content/zh/docs/tasks/administer-cluster/quota-api-object.md
index f1b5050523..80336fb9c4 100644
--- a/content/zh/docs/tasks/administer-cluster/quota-api-object.md
+++ b/content/zh/docs/tasks/administer-cluster/quota-api-object.md
@@ -34,7 +34,7 @@ object.
Create a namespace so that the resources you create in this exercise are
isolated from the rest of your cluster.
-->
-## 创建命名空间
+## 创建命名空间 {#create-a-namespace}
创建一个命名空间以便本例中创建的资源和集群中的其余部分相隔离。
@@ -47,7 +47,7 @@ kubectl create namespace quota-object-example
Here is the configuration file for a ResourceQuota object:
-->
-## 创建 ResourceQuota
+## 创建 ResourceQuota {#create-a-resourcequota}
下面是一个 ResourceQuota 对象的配置文件:
@@ -96,7 +96,7 @@ status:
Here is the configuration file for a PersistentVolumeClaim object:
-->
-## 创建 PersistentVolumeClaim
+## 创建 PersistentVolumeClaim {#create-a-persistentvolumeclaim}
下面是一个 PersistentVolumeClaim 对象的配置文件:
@@ -135,7 +135,7 @@ pvc-quota-demo Pending
Here is the configuration file for a second PersistentVolumeClaim:
-->
-## 尝试创建第二个 PersistentVolumeClaim
+## 尝试创建第二个 PersistentVolumeClaim {#attempt-to-create-a-second-persistentvolumeclaim}
下面是第二个 PersistentVolumeClaim 的配置文件:
@@ -147,8 +147,9 @@ Attempt to create the second PersistentVolumeClaim:
尝试创建第二个 PersistentVolumeClaim:
```shell
-kubectl create -f https://k8s.io/examples/admin/resource/quota-objects-pvc-2.yaml --namespace=quota-object-example
+kubectl apply -f https://k8s.io/examples/admin/resource/quota-objects-pvc-2.yaml --namespace=quota-object-example
```
+
-## 说明
+## 说明 {#notes}
下面这些字符串可被用来标识那些能被配额限制的 API 资源:
+
字符串
API 对象
"pods"
Pod
"services"
Service
@@ -180,7 +184,13 @@ by quotas:
"secrets"
Secret
"configmaps"
ConfigMap
"persistentvolumeclaims"
PersistentVolumeClaim
+
"services.nodeports"
NodePort 类型的 Service
+
"services.loadbalancers"
LoadBalancer 类型的 Service
@@ -189,7 +199,7 @@ by quotas:
Delete your namespace:
-->
-## 清理
+## 清理 {#clean-up}
删除你的命名空间:
@@ -202,20 +212,20 @@ kubectl delete namespace quota-object-example
-### 集群管理员参考
+### 集群管理员参考 {#for-cluster-administrators}
* [为命名空间配置默认的内存请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)
* [为命名空间配置默认的 CPU 请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)
@@ -234,7 +244,7 @@ kubectl delete namespace quota-object-example
* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/)
-->
-### 应用开发者参考
+### 应用开发者参考 {#for-app-developers}
* [为容器和 Pod 分配内存资源](/zh/docs/tasks/configure-pod-container/assign-memory-resource/)
* [为容器和 Pod 分配 CPU 资源](/zh/docs/tasks/configure-pod-container/assign-cpu-resource/)
diff --git a/content/zh/docs/tasks/administer-cluster/reconfigure-kubelet.md b/content/zh/docs/tasks/administer-cluster/reconfigure-kubelet.md
index e0e47d3299..c6208c405d 100644
--- a/content/zh/docs/tasks/administer-cluster/reconfigure-kubelet.md
+++ b/content/zh/docs/tasks/administer-cluster/reconfigure-kubelet.md
@@ -1,6 +1,7 @@
---
title: 在运行中的集群上重新配置节点的 kubelet
content_type: task
+min-kubernetes-server-version: v1.11
---
{{< caution >}}
[动态 kubelet 配置](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/281-dynamic-kubelet-configuration)
-已经废弃不建议使用。请选择其他方法将配置分发到集群中的节点。
+功能在 Kubernetes 1.22 版本弃用,并在 1.24 版本中移除。
+请选择其他方法将配置分发到集群中的节点。
{{< /caution >}}
[动态 kubelet 配置](https://github.com/kubernetes/enhancements/issues/281)
-允许你通过部署一个所有节点都会使用的 ConfigMap
-达到在运行中的 Kubernetes 集群中更改 kubelet 配置的目的。
+允许你通过部署并配置{{< glossary_tooltip text="节点" term_id="node" >}}使用的
+{{< glossary_tooltip text="ConfigMap" term_id="configmap" >}},
+达到更改正在运行的 Kubernetes 集群的 {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 配置的目的。
-{{< warning >}}
-所有 kubelet 配置参数都可以被动态更改,但对某些参数来说这类更改是不安全的。
-在决定动态更改参数之前,你需要深刻理解这个改动将会如何影响集群的行为。
-在将变更扩散到整个集群之前,你需要先在小规模的节点集合上仔细地测试这些配置变动。
-特定字段相关的配置建议可以在文档
-[`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/)中找到。
-{{< /warning >}}
-
-## {{% heading "prerequisites" %}}
+请在 [早期版本的文档](https://v1-23.docs.kubernetes.io/zh/docs/tasks/administer-cluster/reconfigure-kubelet/) 中找到有关此功能的文档。
-你需要一个 Kubernetes 集群。
-你还需要 `kubectl`,[安装](/zh/docs/tasks/tools/#kubectl)并配置好与集群的通信。
-{{< version-check >}}
-确保你使用的 `kubectl` 版本与集群 [兼容](/releases/version-skew-policy/)。
+## 不再使用动态 Kubelet 配置
+
+这里没有跨不同的 Kubernetes 发行版替换这个功能的建议方法。
+如果你使用托管 Kubernetes 版本,
+请咨询托管 Kubernetes 的供应商,以获得自定义 Kubernetes 的最佳实践。
+如果你使用的是 `kubeadm`,请参考
+[使用 kubeadm 配置集群中的每个 kubelet](/zh/docs/setup/production-environment/tools/kubeadm/kubelet-integration/)。
-在某些例子中使用了命令行工具 [jq](https://stedolan.github.io/jq/)。
-你并不一定需要 `jq` 才能完成这些任务,因为总是有一些手工替代的方式。
-
-针对你重新配置的每个节点,你必须设置 kubelet 的标志
-`-dynamic-config-dir`,使之指向一个可写的目录。
-
-
+为了停止使用动态 Kubelet 配置功能,
+应该使用替代机制分发 kubelet 配置文件。
+为了使配置生效,必须更新配置文件并重新启动 kubelet。
+请参考[通过配置文件设置 Kubelet 参数](/zh/docs/tasks/administer-cluster/kubelet-config-file/)。
-## 重配置 集群中运行节点上的 kubelet
-
-### 基本工作流程概览
-
-
-在运行中的集群中配置 kubelet 的基本工作流程如下:
-
-1. 编写一个包含 kubelet 配置的 YAML 或 JSON 文件。
-2. 将此文件包装在 ConfigMap 中并将其保存到 Kubernetes 控制平面。
-3. 更新 kubelet 所在节点对象以使用此 ConfigMap。
-
-
-每个 kubelet 都会在其各自的节点对象上监测(Watch)配置引用。当引用更改时,kubelet 将下载新的配置文件,
-更新本地引用指向该文件,然后退出。
-为了使该功能正常地工作,你必须运行操作系统级别的服务管理器(如 systemd),
-它将会在 kubelet 退出后将其重启。
-kubelet 重新启动时,将开始使用新配置。
-
-
-新配置将会完全地覆盖 `--config` 所提供的配置,并被命令行标志覆盖。
-新配置中未指定的值将收到适合配置版本的默认值
-(e.g. `kubelet.config.k8s.io/v1beta1`),除非被命令行标志覆盖。
-
-
-节点 kubelet 配置状态可通过 `node.spec.status.config` 获取。
-一旦你更新了一个节点去使用新的 ConfigMap,
-就可以通过观察此状态来确认该节点是否正在使用预期配置。
-
-
-本文中使用命令 `kubectl edit` 来编辑节点,还有其他的方式可以修改节点的规约,
-比如更利于脚本化工作流程的 `kubectl patch`。
-
-
-本文仅仅讲述在单节点上使用每个 ConfigMap。请注意对于多个节点使用相同的 ConfigMap
-也是合法的。
-
-
-{{< warning >}}
-尽管通过就地更新 ConfigMap 来更改配置是 *可能的*。
-但是这样做会导致所有使用该 ConfigMap 配置的 kubelet 同时更新。
-更安全的做法是按惯例将 ConfigMap 视为不可变更的,借助于
-`kubectl` 的 `--append-hash` 选项逐步把更新推广到 `node.spec.configSource`。
-{{< /warning >}}
-
-
-### 节点鉴权器的自动 RBAC 规则
-
-以前,你需要手动创建 RBAC 规则以允许节点访问其分配的 ConfigMap。节点鉴权器现在
-能够自动配置这些规则。
-
-
-### 生成包含当前配置的文件
-
-动态 kubelet 配置特性允许你为整个配置对象提供一个重载配置,而不是靠单个字段的叠加。
-这是一个更简单的模型,可以更轻松地跟踪配置值的来源,更便于调试问题。
-然而,相应的代价是你必须首先了解现有配置,以确保你只更改你打算修改的字段。
-
-
-组件 kubelet 从其配置文件中加载配置数据,不过你可以通过设置命令行标志
-来重载文件中的一些配置。这意味着,如果你仅知道配置文件的内容,而你不知道
-命令行重载了哪些配置,你就无法知道 kubelet 的运行时配置是什么。
-
-
-因为你需要知道运行时所使用的配置才能重载之,你可以从 kubelet 取回其运行时配置。
-你可以通过访问 kubelet 的 `configz` 末端来生成包含节点当前配置的配置文件;
-这一操作可以通过 `kubectl proxy` 来完成。
-下一节解释如何完成这一操作。
-
-
-{{< caution >}}
-组件 `kubelet` 上的 `configz` 末端是用来协助调试的,并非 kubelet 稳定行为的一部分。
-请不要在产品环境下依赖此末端的行为,也不要在自动化工具中使用此末端。
-{{< /caution >}}
-
-
-关于如何使用配置文件来配置 kubelet 行为的更多信息可参见
-[通过配置文件设置 kubelet 参数](/zh/docs/tasks/administer-cluster/kubelet-config-file)
-文档。
-
-
-#### 生成配置文件
-
-
-{{< note >}}
-下面的任务步骤中使用了 `jq` 命令以方便处理 JSON 数据。为了完成这里讲述的任务,
-你需要安装 `jq`。如果你更希望手动提取 `kubeletconfig` 子对象,也可以对这里
-的对应步骤做一些调整。
-{{< /note >}}
-
-
-1. 选择要重新配置的节点。在本例中,此节点的名称为 `NODE_NAME`。
-2. 使用以下命令在后台启动 kubectl 代理:
-
- ```shell
- kubectl proxy --port=8001 &
- ```
-
-3. 运行以下命令从 `configz` 端点中下载并解压配置。这个命令很长,因此在复制粘贴时要小心。
- **如果你使用 zsh**,请注意常见的 zsh 配置要添加反斜杠转义 URL 中变量名称周围的大括号。
- 例如:在粘贴时,`${NODE_NAME}` 将被重写为 `$\{NODE_NAME\}`。
- 你必须在运行命令之前删除反斜杠,否则命令将失败。
-
- ```bash
- NODE_NAME="the-name-of-the-node-you-are-reconfiguring"; curl -sSL "http://localhost:8001/api/v1/nodes/${NODE_NAME}/proxy/configz" | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' > kubelet_configz_${NODE_NAME}
- ```
-
-
-{{< note >}}
-你需要手动将 `kind` 和 `apiVersion` 添加到下载对象中,因为它们不是由 `configz` 末端
-返回的。
-{{< /note >}}
-
-
-#### 修改配置文件
-
-使用文本编辑器,改变上述操作生成的文件中一个参数。
-例如,你或许会修改 QPS 参数 `eventRecordQPS`。
-
-
-#### 把配置文件推送到控制平面
-
-用以下命令把编辑后的配置文件推送到控制平面:
-
-```bash
-kubectl -n kube-system create configmap my-node-config \
- --from-file=kubelet=kubelet_configz_${NODE_NAME} \
- --append-hash -o yaml
-```
-
-
-下面是合法响应的一个例子:
-
-```yaml
-apiVersion: v1
-kind: ConfigMap
-metadata:
- creationTimestamp: 2017-09-14T20:23:33Z
- name: my-node-config-gkt4c2m4b2
- namespace: kube-system
- resourceVersion: "119980"
- selfLink: /api/v1/namespaces/kube-system/configmaps/my-node-config-gkt4c2m4b2
- uid: 946d785e-998a-11e7-a8dd-42010a800006
-data:
- kubelet: |
- {...}
-```
-
-
-你会在 `kube-system` 命名空间中创建 ConfigMap,因为 kubelet 是 Kubernetes 的系统组件。
-
-
-`--append-hash` 选项给 ConfigMap 内容附加了一个简短校验和。
-这对于先编辑后推送的工作流程很方便,
-因为它自动并确定地为新 ConfigMap 生成新的名称。
-在以下示例中,包含生成的哈希字符串的对象名被称为 `CONFIG_MAP_NAME`。
-
-
-#### 配置节点使用新的配置
-
-```bash
-kubectl edit node ${NODE_NAME}
-```
-
-
-在你的文本编辑器中,在 `spec` 下增添以下 YAML:
-
-```yaml
-configSource:
- configMap:
- name: CONFIG_MAP_NAME
- namespace: kube-system
- kubeletConfigKey: kubelet
-```
-
-
-你必须同时指定 `name`、`namespace` 和 `kubeletConfigKey` 这三个属性。
-`kubeletConfigKey` 这个参数通知 kubelet ConfigMap 中的哪个键下面包含所要的配置。
-
-
-#### 观察节点开始使用新配置
-
-用 `kubectl get node ${NODE_NAME} -o yaml` 命令读取节点并检查 `node.status.config` 内容。
-状态部分报告了对应 `active`(使用中的)配置、`assigned`(被赋予的)配置和
-`lastKnownGood`(最近已知可用的)配置的配置源。
-
-- `active` 是 kubelet 当前运行时所使用的版本。
-- `assigned` 参数是 kubelet 基于 `node.spec.configSource` 所解析出来的最新版本。
-- `lastKnownGood` 参数是 kubelet 的回退版本;如果在 `node.spec.configSource` 中
- 包含了无效的配置值,kubelet 可以回退到这个版本。
-
-
-如果用本地配置部署节点,使其设置成默认值,这个 `lastKnownGood` 配置可能不存在。
-在 kubelet 配置好后,将更新 `lastKnownGood` 为一个有效的 `assigned` 配置。
-决定如何确定某配置成为 `lastKnownGood` 配置的细节并不在 API 保障范畴,
-不过目前实现中采用了 10 分钟的宽限期。
-
-
-你可以使用以下命令(使用 `jq`)过滤出配置状态:
-
-```bash
-kubectl get no ${NODE_NAME} -o json | jq '.status.config'
-```
-
-
-以下是一个响应示例:
-
-```json
-{
- "active": {
- "configMap": {
- "kubeletConfigKey": "kubelet",
- "name": "my-node-config-9mbkccg2cc",
- "namespace": "kube-system",
- "resourceVersion": "1326",
- "uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
- }
- },
- "assigned": {
- "configMap": {
- "kubeletConfigKey": "kubelet",
- "name": "my-node-config-9mbkccg2cc",
- "namespace": "kube-system",
- "resourceVersion": "1326",
- "uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
- }
- },
- "lastKnownGood": {
- "configMap": {
- "kubeletConfigKey": "kubelet",
- "name": "my-node-config-9mbkccg2cc",
- "namespace": "kube-system",
- "resourceVersion": "1326",
- "uid": "705ab4f5-6393-11e8-b7cc-42010a800002"
- }
- }
-}
-```
-
-
-如果你没有安装 `jq`,你可以查看整个响应对象,查找其中的 `node.status.config`
-部分。
-
-
-如果发生错误,kubelet 会在 `Node.Status.Config.Error` 中显示出错误信息的结构体。
-错误可能出现在列表[理解节点状态配置错误信息](#understanding-node-config-status-errors)中。
-你可以在 kubelet 日志中搜索相同的文本以获取更多详细信息和有关错误的上下文。
-
-
-#### 做出更多的改变 {#make-more-changes}
-
-按照下面的工作流程做出更多的改变并再次推送它们。
-你每次推送一个 ConfigMap 的新内容时,kubectl 的 `--append-hash` 选项都会给
-ConfigMap 创建一个新的名称。
-最安全的上线策略是首先创建一个新的 ConfigMap,然后更新节点以使用新的 ConfigMap。
-
-
-#### 重置节点以使用其本地默认配置
-
-要重置节点,使其使用节点创建时使用的配置,可以用
-`kubectl edit node $ {NODE_NAME}` 命令编辑节点,并删除 `node.spec.configSource`
-字段。
-
-
-#### 观察节点正在使用本地默认配置
-
-在删除此字段后,`node.status.config` 最终变成空,所有配置源都已重置为 `nil`。
-这表示本地默认配置成为了 `assigned`、`active` 和 `lastKnownGood` 配置,
-并且没有报告错误。
-
-
-
-
-## `kubectl patch` 示例
-
-你可以使用几种不同的机制来更改节点的 configSource。
-
-本例使用`kubectl patch`:
-
-```bash
-kubectl patch node ${NODE_NAME} -p "{\"spec\":{\"configSource\":{\"configMap\":{\"name\":\"${CONFIG_MAP_NAME}\",\"namespace\":\"kube-system\",\"kubeletConfigKey\":\"kubelet\"}}}}"
-```
-
-## 了解 Kubelet 如何为配置生成检查点
-
-当为节点赋予新配置时,kubelet 会下载并解压配置负载为本地磁盘上的一组文件。
-kubelet 还记录一些元数据,用以在本地跟踪已赋予的和最近已知良好的配置源,以便
-kubelet 在重新启动时知道使用哪个配置,即使 API 服务器变为不可用。
-在为配置信息和相关元数据生成检查点之后,如果检测到已赋予的配置发生改变,则 kubelet 退出。
-当 kubelet 被 OS 级服务管理器(例如 `systemd`)重新启动时,它会读取新的元数据并使用新配置。
-
-
-当记录的元数据已被完全解析时,意味着它包含选择一个指定的配置版本所需的所有信息
--- 通常是 `UID` 和 `ResourceVersion`。
-这与 `node.spec.configSource` 形成对比,后者通过幂等的 `namespace/name` 声明来标识
-目标 ConfigMap;kubelet 尝试使用此 ConfigMap 的最新版本。
-
-
-当你在调试节点上问题时,可以检查 kubelet 的配置元数据和检查点。kubelet 的检查点目录结构是:
-
-
-
-```none
-- --dynamic-config-dir (用于管理动态配置的根目录)
-|-- meta
- | - assigned (编码后的 kubeletconfig/v1beta1.SerializedNodeConfigSource 对象,对应赋予的配置)
- | - last-known-good (编码后的 kubeletconfig/v1beta1.SerializedNodeConfigSource 对象,对应最近已知可用配置)
-| - checkpoints
- | - uid1 (用 uid1 来标识的对象版本目录)
- | - resourceVersion1 (uid1 对象 resourceVersion1 版本下所有解压文件的目录)
- | - ...
- | - ...
-```
-
-
-## 理解 `Node.Status.Config.Error` 消息 {#understanding-node-config-status-errors}
-
-下表描述了使用动态 kubelet 配置时可能发生的错误消息。
-你可以在 kubelet 日志中搜索相同的文本来获取有关错误的其他详细信息和上下文。
-
-
-
-{{< table caption = "理解 node.status.config.error 消息" >}}
- 错误信息 | 可能的原因
-:----------------| :----------------
-failed to load config, see Kubelet log for details | kubelet 可能无法解析下载配置的有效负载,或者当尝试从磁盘中加载有效负载时,遇到文件系统错误。
-failed to validate config, see Kubelet log for details | 有效负载中的配置,与命令行标志所产生的覆盖配置以及特行门控的组合、配置文件本身、远程负载被 kubelet 判定为无效。
-invalid NodeConfigSource, exactly one subfield must be non-nil, but all were nil | 由于 API 服务器负责对 node.spec.configSource 执行验证,检查其中是否包含至少一个非空子字段,这个消息可能意味着 kubelet 比 API 服务器版本低,因而无法识别更新的源类型。
-failed to sync: failed to download config, see Kubelet log for details | kubelet 无法下载配置数据。可能是 node.spec.configSource 无法解析为具体的 API 对象,或者网络错误破坏了下载。处于此错误状态时,kubelet 将重新尝试下载。
-failed to sync: internal failure, see Kubelet log for details | kubelet 遇到了一些内部问题,因此无法更新其配置。 例如:发生文件系统错误或无法从内部缓存中读取对象。
-internal failure, see Kubelet log for details | 在对配置进行同步的循环之外操作配置时,kubelet 遇到了一些内部问题。
-
-{{< /table >}}
-
-## {{% heading "whatsnext" %}}
-
-
-- [使用配置文件设置 kubelet 参数](/zh/docs/tasks/administer-cluster/kubelet-config-file)说明了配置 kubelet 的方法。
-- 阅读 Node 的参考文档,包括 [.spec](/docs/reference/kubernetes-api/cluster-resources/node-v1/#NodeSpec) 里的 `configSource` 字段
-- 查阅[`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/)文献进一步了解 kubelet
- 配置信息。
\ No newline at end of file
+请注意,从 v1.24 开始 `DynamicKubeletConfig` 特性门控无法在 kubelet 上设置,
+因为不会生效。在 v1.26 之前 API 服务器和控制器管理器不会移除该特性门控。
+这是专为控制面支持有旧版本 kubelet 的节点以及满足 [Kubernetes 版本偏差策略](/releases/version-skew-policy/)。
\ No newline at end of file
diff --git a/content/zh/docs/tasks/administer-cluster/reserve-compute-resources.md b/content/zh/docs/tasks/administer-cluster/reserve-compute-resources.md
index 9e48a09112..885b232fb5 100644
--- a/content/zh/docs/tasks/administer-cluster/reserve-compute-resources.md
+++ b/content/zh/docs/tasks/administer-cluster/reserve-compute-resources.md
@@ -1,8 +1,4 @@
---
-reviewers:
-- vishh
-- derekwaynecarr
-- dashpole
title: 为系统守护进程预留计算资源
content_type: task
min-kubernetes-server-version: 1.8
@@ -28,7 +24,7 @@ node.
The `kubelet` exposes a feature named 'Node Allocatable' that helps to reserve
compute resources for system daemons. Kubernetes recommends cluster
-administrators to configure `Node Allocatable` based on their workload density
+administrators to configure 'Node Allocatable' based on their workload density
on each node.
-->
Kubernetes 的节点可以按照 `Capacity` 调度。默认情况下 pod 能够使用节点全部可用容量。
@@ -36,7 +32,7 @@ Kubernetes 的节点可以按照 `Capacity` 调度。默认情况下 pod 能够
除非为这些系统守护进程留出资源,否则它们将与 pod 争夺资源并导致节点资源短缺问题。
`kubelet` 公开了一个名为 'Node Allocatable' 的特性,有助于为系统守护进程预留计算资源。
-Kubernetes 推荐集群管理员按照每个节点上的工作负载密度配置 `Node Allocatable`。
+Kubernetes 推荐集群管理员按照每个节点上的工作负载密度配置 “Node Allocatable”。
## {{% heading "prerequisites" %}}
@@ -72,7 +68,7 @@ Resources can be reserved for two categories of system daemons in the `kubelet`.
Kubernetes 节点上的 'Allocatable' 被定义为 pod 可用计算资源量。
调度器不会超额申请 'Allocatable'。
-目前支持 'CPU', 'memory' 和 'ephemeral-storage' 这几个参数。
+目前支持 'CPU'、'memory' 和 'ephemeral-storage' 这几个参数。
可分配的节点暴露为 API 中 `v1.Node` 对象的一部分,也是 CLI 中
`kubectl describe node` 的一部分。
@@ -87,7 +83,7 @@ enable the new cgroup hierarchy via the `--cgroups-per-qos` flag. This flag is
enabled by default. When enabled, the `kubelet` will parent all end-user pods
under a cgroup hierarchy managed by the `kubelet`.
-->
-### 启用 QoS 和 Pod 级别的 cgroups
+### 启用 QoS 和 Pod 级别的 cgroups {#enabling-qos-and-pod-level-cgroups}
为了恰当的在节点范围实施节点可分配约束,你必须通过 `--cgroups-per-qos`
标志启用新的 cgroup 层次结构。这个标志是默认启用的。
@@ -110,10 +106,10 @@ transient slices for resources that are supported by that init system.
Depending on the configuration of the associated container runtime,
operators may have to choose a particular cgroup driver to ensure
proper system behavior. For example, if operators use the `systemd`
-cgroup driver provided by the `docker` runtime, the `kubelet` must
+cgroup driver provided by the `containerd` runtime, the `kubelet` must
be configured to use the `systemd` cgroup driver.
-->
-### 配置 cgroup 驱动
+### 配置 cgroup 驱动 {#configuring-a-cgroup-driver}
`kubelet` 支持在主机上使用 cgroup 驱动操作 cgroup 层次结构。
驱动通过 `--cgroup-driver` 标志配置。
@@ -127,7 +123,7 @@ be configured to use the `systemd` cgroup driver.
取决于相关容器运行时的配置,操作员可能需要选择一个特定的 cgroup 驱动
来保证系统正常运行。
-例如,如果操作员使用 `docker` 运行时提供的 `systemd` cgroup 驱动时,
+例如,如果操作员使用 `containerd` 运行时提供的 `systemd` cgroup 驱动时,
必须配置 `kubelet` 使用 `systemd` cgroup 驱动。
### 显式保留的 CPU 列表 {#explicitly-reserved-cpu-list}
{{< feature-state for_k8s_version="v1.17" state="stable" >}}
--**Kubelet 标志**: `--reserved-cpus=0-3`
+
+**Kubelet 标志**:`--reserved-cpus=0-3`
### 驱逐阈值 {#eviction-Thresholds}
-- **Kubelet 标志**: `--eviction-hard=[memory.available<500Mi]`
+**Kubelet 标志**:`--eviction-hard=[memory.available<500Mi]`
节点级别的内存压力将导致系统内存不足,这将影响到整个节点及其上运行的所有 Pod。
节点可以暂时离线直到内存已经回收为止。
@@ -314,7 +310,7 @@ available for pods.
### 实施节点可分配约束 {#enforcing-node-allocatable}
--**Kubelet 标志**: `--enforce-node-allocatable=pods[,][system-reserved][,][kube-reserved]`
+**Kubelet 标志**:`--enforce-node-allocatable=pods[,][system-reserved][,][kube-reserved]`
调度器将 'Allocatable' 视为 Pod 可用的 `capacity`(资源容量)。
@@ -344,7 +340,7 @@ respectively.
可通过设置 kubelet `--enforce-node-allocatable` 标志值为 `pods` 控制这个措施。
可选地,通过在同一标志中同时指定 `kube-reserved` 和 `system-reserved` 值,
-可以使 `kubelet` 强制实施 `kube-reserved` 和 `system-reserved`约束。
+可以使 `kubelet` 强制实施 `kube-reserved` 和 `system-reserved` 约束。
请注意,要想执行 `kube-reserved` 或者 `system-reserved` 约束,
需要对应设置 `--kube-reserved-cgroup` 或者 `--system-reserved-cgroup`。
@@ -355,7 +351,7 @@ System daemons are expected to be treated similar to
[Guaranteed pods](/docs/tasks/configure-pod-container/quality-service-pod/#create-a-pod-that-gets-assigned-a-qos-class-of-guaranteed).
System daemons can burst within their bounding control groups and this behavior needs
to be managed as part of kubernetes deployments. For example, `kubelet` should
-have its own control group and share `Kube-reserved` resources with the
+have its own control group and share `kube-reserved` resources with the
container runtime. However, Kubelet cannot burst and use up all available Node
resources if `kube-reserved` is enforced.
-->
@@ -366,7 +362,7 @@ resources if `kube-reserved` is enforced.
一样对待。
系统守护进程可以在与其对应的控制组中出现突发资源用量,这一行为要作为
kubernetes 部署的一部分进行管理。
-例如,`kubelet` 应该有它自己的控制组并和容器运行时共享 `Kube-reserved` 资源。
+例如,`kubelet` 应该有它自己的控制组并和容器运行时共享 `kube-reserved` 资源。
不过,如果执行了 `kube-reserved` 约束,则 kubelet 不可出现突发负载并用光
节点的所有可用资源。
@@ -391,7 +387,7 @@ ability to recover if any process in that group is oom-killed.
* 作为起步,可以先针对 `pods` 上执行 'Allocatable' 约束。
* 一旦用于追踪系统守护进程的监控和告警的机制到位,可尝试基于用量估计的
- 方式执行 `kube-reserved`策略。
+ 方式执行 `kube-reserved` 策略。
* 随着时间推进,在绝对必要的时候可以执行 `system-reserved` 策略。
在这个场景下,'Allocatable' 将会是 14.5 CPUs、28.5Gi 内存以及 `88Gi` 本地存储。
调度器保证这个节点上的所有 Pod 的内存 `requests` 总量不超过 28.5Gi,
@@ -448,6 +444,6 @@ kubelet 将会驱逐它们。
14.5 CPUs 的资源。
当没有执行 `kube-reserved` 和/或 `system-reserved` 策略且系统守护进程
-使用量超过其预留时,如果节点内存用量高于 31.5Gi 或`存储`大于 90Gi,
+使用量超过其预留时,如果节点内存用量高于 31.5Gi 或 `storage` 大于 90Gi,
kubelet 将会驱逐 Pod。
diff --git a/content/zh/docs/tasks/administer-cluster/topology-manager.md b/content/zh/docs/tasks/administer-cluster/topology-manager.md
index 6208fe60d1..c01fb50f4b 100644
--- a/content/zh/docs/tasks/administer-cluster/topology-manager.md
+++ b/content/zh/docs/tasks/administer-cluster/topology-manager.md
@@ -33,7 +33,7 @@ In order to extract the best performance, optimizations related to CPU isolation
但是,在 Kubernetes 中,这些优化由各自独立的组件集合来处理。
_拓扑管理器(Topology Manager)_ 是一个 kubelet 的一部分,旨在协调负责这些优化的一组组件。
@@ -46,16 +46,16 @@ _拓扑管理器(Topology Manager)_ 是一个 kubelet 的一部分,旨在
-## 拓扑管理器如何工作
+## 拓扑管理器如何工作 {#how-topology-manager-works}
-在引入拓扑管理器之前, Kubernetes 中的 CPU 和设备管理器相互独立地做出资源分配决策。
+在引入拓扑管理器之前,Kubernetes 中的 CPU 和设备管理器相互独立地做出资源分配决策。
这可能会导致在多处理系统上出现并非期望的资源分配;由于这些与期望相左的分配,对性能或延迟敏感的应用将受到影响。
-这里的不符合期望意指,例如, CPU 和设备是从不同的 NUMA 节点分配的,因此会导致额外的延迟。
+这里的不符合期望意指,例如,CPU 和设备是从不同的 NUMA 节点分配的,因此会导致额外的延迟。
-### 启用拓扑管理器功能特性
+### 启用拓扑管理器功能特性 {#enable-the-topology-manager-feature}
对拓扑管理器的支持要求启用 `TopologyManager`
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
从 Kubernetes 1.18 版本开始,这一特性默认是启用的。
-### 拓扑管理器作用域和策略
+## 拓扑管理器作用域和策略 {#topology-manager-scopes-and-policies}
拓扑管理器目前:
- 对所有 QoS 类的 Pod 执行对齐操作
@@ -151,7 +151,7 @@ The Topology Manager can deal with the alignment of resources in a couple of dis
Either option can be selected at a time of the kubelet startup, with `--topology-manager-scope` flag.
-->
-### 拓扑管理器作用域
+### 拓扑管理器作用域 {#topology-manager-scopes}
拓扑管理器可以在以下不同的作用域内进行资源对齐:
@@ -165,7 +165,7 @@ Either option can be selected at a time of the kubelet startup, with `--topology
The `container` scope is used by default.
-->
-### 容器作用域
+### 容器作用域 {#container-scope}
默认使用的是 `container` 作用域。
@@ -187,7 +187,7 @@ The notion of grouping the containers was endorsed and implemented on purpose in
To select the `pod` scope, start the kubelet with the command line option `--topology-manager-scope=pod`.
-->
-### Pod 作用域
+### Pod 作用域 {#pod-scope}
使用命令行选项 `--topology-manager-scope=pod` 来启动 kubelet,就可以选择 `pod` 作用域。
@@ -250,7 +250,7 @@ To recap, Topology Manager first computes a set of NUMA nodes and then tests it
-### 拓扑管理器策略
+### 拓扑管理器策略 {#topology-manager-policies}
### best-effort 策略 {#policy-best-effort}
-对于 Guaranteed 类的 Pod 中的每个容器,具有 `best-effort` 拓扑管理策略的
+对于 Pod 中的每个容器,具有 `best-effort` 拓扑管理策略的
kubelet 将调用每个建议提供者以确定资源可用性。
使用此信息,拓扑管理器存储该容器的首选 NUMA 节点亲和性。
如果亲和性不是首选,则拓扑管理器将存储该亲和性,并且无论如何都将 pod 接纳到该节点。
@@ -315,7 +315,7 @@ resource allocation decision.
### restricted 策略 {#policy-restricted}
-对于 Guaranteed 类 Pod 中的每个容器, 配置了 `restricted` 拓扑管理策略的 kubelet
+对于 Pod 中的每个容器,配置了 `restricted` 拓扑管理策略的 kubelet
调用每个建议提供者以确定其资源可用性。。
使用此信息,拓扑管理器存储该容器的首选 NUMA 节点亲和性。
-如果亲和性不是首选,则拓扑管理器将从节点中拒绝此 Pod 。
+如果亲和性不是首选,则拓扑管理器将从节点中拒绝此 Pod。
这将导致 Pod 处于 `Terminated` 状态,且 Pod 无法被节点接纳。
### single-numa-node 策略 {#policy-single-numa-node}
-对于 Guaranteed 类 Pod 中的每个容器, 配置了 `single-numa-nodde` 拓扑管理策略的
+对于 Pod 中的每个容器,配置了 `single-numa-nodde` 拓扑管理策略的
kubelet 调用每个建议提供者以确定其资源可用性。
使用此信息,拓扑管理器确定单 NUMA 节点亲和性是否可能。
如果是这样,则拓扑管理器将存储此信息,然后 *建议提供者* 可以在做出资源分配决定时使用此信息。
@@ -375,7 +375,7 @@ An external control loop could be also implemented to trigger a redeployment of
Consider the containers in the following pod specs:
-->
-### Pod 与拓扑管理器策略的交互
+### Pod 与拓扑管理器策略的交互 {#pod-interactions-with-topology-manager-policies}
考虑以下 pod 规范中的容器:
@@ -410,7 +410,7 @@ This pod runs in the `Burstable` QoS class because requests are less than limits
由于 requests 数少于 limits,因此该 Pod 以 `Burstable` QoS 类运行。
如果选择的策略是 `none` 以外的任何其他策略,拓扑管理器都会评估这些 Pod 的规范。
拓扑管理器会咨询建议提供者,获得拓扑建议。
@@ -434,8 +434,7 @@ spec:
```
此 Pod 以 `Guaranteed` QoS 类运行,因为其 `requests` 值等于 `limits` 值。
@@ -459,12 +458,12 @@ This pod runs in the `BestEffort` QoS class because there are no CPU and memory
因为未指定 CPU 和内存请求,所以 Pod 以 `BestEffort` QoS 类运行。
拓扑管理器将考虑以上两个 Pod。拓扑管理器将咨询建议提供者即 CPU 和设备管理器,以获取 Pod 的拓扑提示。
-对于 `Guaranteed` 类的 CPU 请求数为整数的 Pod,`static` CPU 管理器策略将返回与 CPU 请求有关的提示,
+对于 `Guaranteed` 类的 CPU 请求数为整数的 Pod,`static` CPU 管理器策略将返回独占 CPU 相关的拓扑提示,
而设备管理器将返回有关所请求设备的提示。
-### 已知的局限性
+### 已知的局限性 {#known-limitations}
1. 拓扑管理器所能处理的最大 NUMA 节点个数是 8。若 NUMA 节点数超过 8,
枚举可能的 NUMA 亲和性并为之生成提示时会发生状态爆炸。
diff --git a/content/zh/docs/tasks/configure-pod-container/assign-memory-resource.md b/content/zh/docs/tasks/configure-pod-container/assign-memory-resource.md
index d8a9d37b03..d245d94da6 100644
--- a/content/zh/docs/tasks/configure-pod-container/assign-memory-resource.md
+++ b/content/zh/docs/tasks/configure-pod-container/assign-memory-resource.md
@@ -78,7 +78,7 @@ v1beta1.metrics.k8s.io
Create a namespace so that the resources you create in this exercise are
isolated from the rest of your cluster.
-->
-## 创建命名空间
+## 创建命名空间 {#create-a-namespace}
创建一个命名空间,以便将本练习中创建的资源与集群的其余部分隔离。
@@ -96,7 +96,7 @@ In this exercise, you create a Pod that has one Container. The Container has a m
request of 100 MiB and a memory limit of 200 MiB. Here's the configuration file
for the Pod:
-->
-## 指定内存请求和限制
+## 指定内存请求和限制 {#specify-a-memory-request-and-a-memory-limit}
要为容器指定内存请求,请在容器资源清单中包含 `resources:requests` 字段。
同理,要指定内存限制,请包含 `resources:limits`。
@@ -196,7 +196,7 @@ its limit, the Container becomes a candidate for termination. If the Container c
consume memory beyond its limit, the Container is terminated. If a terminated Container can be
restarted, the kubelet restarts it, as with any other type of runtime failure.
-->
-## 超过容器限制的内存
+## 超过容器限制的内存 {#exceed-a-container-s-memory-limit}
当节点拥有足够的可用内存时,容器可以使用其请求的内存。
但是,容器不允许使用超过其限制的内存。
@@ -260,7 +260,7 @@ The output shows that the Container was killed because it is out of memory (OOM)
-->
输出结果显示:由于内存溢出(OOM),容器已被杀掉:
-```shell
+```yaml
lastState:
terminated:
containerID: 65183c1877aaec2e8427bc95609cc52677a454b56fcb24340dbd22917c23b10f
@@ -352,7 +352,7 @@ of a Pod as having a memory request and limit. The memory request for the Pod is
sum of the memory requests for all the Containers in the Pod. Likewise, the memory
limit for the Pod is the sum of the limits of all the Containers in the Pod.
-->
-## 超过整个节点容量的内存
+## 超过整个节点容量的内存 {#specify-a-memory-request-that-is-too-big-for-your-nodes}
内存请求和限制是与容器关联的,但将 Pod 视为具有内存请求和限制,也是很有用的。
Pod 的内存请求是 Pod 中所有容器的内存请求之和。
@@ -419,7 +419,7 @@ The output shows that the Container cannot be scheduled because of insufficient
-->
输出结果显示:由于节点内存不足,该容器无法被调度:
-```shell
+```
Events:
... Reason Message
------ -------
@@ -433,14 +433,14 @@ The memory resource is measured in bytes. You can express memory as a plain inte
fixed-point integer with one of these suffixes: E, P, T, G, M, K, Ei, Pi, Ti, Gi, Mi, Ki.
For example, the following represent approximately the same value:
-->
-## 内存单位
+## 内存单位 {#memory-units}
内存资源的基本单位是字节(byte)。你可以使用这些后缀之一,将内存表示为
纯整数或定点整数:E、P、T、G、M、K、Ei、Pi、Ti、Gi、Mi、Ki。
例如,下面是一些近似相同的值:
-```shell
-128974848, 129e6, 129M , 123Mi
+```
+128974848, 129e6, 129M, 123Mi
```
-## 如果你没有指定内存限制
+## 如果你没有指定内存限制 {#if-you-do-not-specify-a-memory-limit}
如果你没有为一个容器指定内存限制,则自动遵循以下情况之一:
@@ -486,7 +486,7 @@ cluster, you can make efficient use of the memory resources available on your cl
Nodes. By keeping a Pod's memory request low, you give the Pod a good chance of being
scheduled. By having a memory limit that is greater than the memory request, you accomplish two things:
-->
-## 内存请求和限制的目的
+## 内存请求和限制的目的 {#motivation-for-memory-requests-and-limits}
通过为集群中运行的容器配置内存请求和限制,你可以有效利用集群节点上可用的内存资源。
通过将 Pod 的内存请求保持在较低水平,你可以更好地安排 Pod 调度。
@@ -504,7 +504,7 @@ scheduled. By having a memory limit that is greater than the memory request, you
Delete your namespace. This deletes all the Pods that you created for this task:
-->
-## 清理
+## 清理 {#clean-up}
删除命名空间。下面的命令会删除你根据这个任务创建的所有 Pod:
@@ -521,7 +521,7 @@ kubectl delete namespace mem-example
* [Configure Quality of Service for Pods](/docs/tasks/configure-pod-container/quality-service-pod/)
-->
-### 应用开发者扩展阅读
+### 应用开发者扩展阅读 {#for-app-developers}
* [为容器和 Pod 分配 CPU 资源](/zh/docs/tasks/configure-pod-container/assign-cpu-resource/)
@@ -545,7 +545,7 @@ kubectl delete namespace mem-example
* [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/)
-->
-### 集群管理员扩展阅读
+### 集群管理员扩展阅读 {#for-cluster-administrators}
* [为命名空间配置默认的内存请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)
* [为命名空间配置默认的 CPU 请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/)
diff --git a/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md b/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md
index 6fece7c5e3..398e0e8c71 100644
--- a/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md
+++ b/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md
@@ -21,7 +21,7 @@ Many applications rely on configuration which is used during either application
Most of the times there is a requirement to adjust values assigned to configuration parameters.
ConfigMaps is the kubernetes way to inject application pods with configuration data.
-ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps.
+ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. This page provides a series of usage examples demonstrating how to create ConfigMaps and configure Pods using data stored in ConfigMaps.
-->
很多应用在其初始化或运行期间要依赖一些配置信息。大多数时候,
存在要调整配置参数所设置的数值的需求。
@@ -41,7 +41,7 @@ ConfigMap 允许你将配置文件与镜像文件分离,以使容器化的应
You can use either `kubectl create configmap` or a ConfigMap generator in `kustomization.yaml` to create a ConfigMap. Note that `kubectl` starts to support `kustomization.yaml` since 1.14.
-->
-## 创建 ConfigMap
+## 创建 ConfigMap {#create-a-configmap}
你可以使用 `kubectl create configmap` 或者在 `kustomization.yaml` 中的 ConfigMap
生成器来创建 ConfigMap。注意,`kubectl` 从 1.14 版本开始支持 `kustomization.yaml`。
@@ -49,15 +49,20 @@ You can use either `kubectl create configmap` or a ConfigMap generator in `kusto
-### 使用 kubectl create configmap 创建 ConfigMap
+### 使用 kubectl create configmap 创建 ConfigMap {#create-a-configmap-using-kubectl-create-configmap}
你可以使用 `kubectl create configmap`
命令基于[目录](#create-configmaps-from-directories)、
[文件](#create-configmaps-from-files)或者[字面值](#create-configmaps-from-literal-values)来创建
ConfigMap:
+
```shell
kubectl create configmap <映射名称> <数据源>
```
@@ -107,11 +112,24 @@ For example:
例如:
+
```shell
# 创建本地目录
mkdir -p configure-pod-container/configmap/
-# 将实例文件下载到 `configure-pod-container/configmap/` 目录
+# 将示例文件下载到 `configure-pod-container/configmap/` 目录
wget https://kubernetes.io/examples/configmap/game.properties -O configure-pod-container/configmap/game.properties
wget https://kubernetes.io/examples/configmap/ui.properties -O configure-pod-container/configmap/ui.properties
@@ -186,7 +204,6 @@ metadata:
name: game-config
namespace: default
resourceVersion: "516"
- selfLink: /api/v1/namespaces/default/configmaps/game-config
uid: b4952dc3-d670-11e5-8cd0-68f728db1985
data:
game.properties: |
@@ -264,9 +281,9 @@ kubectl create configmap game-config-2 --from-file=configure-pod-container/confi
```
-描述上面创建的 `game-config-2` ConfigMap:
+你可以使用以下命令显示 `game-config-2` ConfigMap 的详细信息:
```shell
kubectl describe configmaps game-config-2
@@ -334,6 +351,9 @@ cat configure-pod-container/configmap/game-env-file.properties
enemies=aliens
lives=3
allowed="true"
+
+# This comment and the empty line above it are ignored
+```
-->
Env 文件包含环境变量列表。其中适用以下语法规则:
@@ -402,18 +422,6 @@ specified multiple times to create a ConfigMap from multiple data sources.
-->
从 Kubernetes 1.23 版本开始,`kubectl` 支持多次指定 `--from-env-file` 参数来从多个数据源创建 ConfigMap。
-
-下面是一个多次使用 `--from-env-file` 参数的示例:
-
-
```shell
kubectl create configmap config-multi-env-files \
--from-env-file=configure-pod-container/configmap/game-env-file.properties \
@@ -442,7 +450,6 @@ metadata:
name: config-multi-env-files
namespace: default
resourceVersion: "810136"
- selfLink: /api/v1/namespaces/default/configmaps/config-multi-env-files
uid: 252c4572-eb35-11e7-887b-42010a8002b8
data:
allowed: '"true"'
@@ -458,21 +465,28 @@ data:
You can define a key other than the file name to use in the `data` section of your ConfigMap when using the `--from-file` argument:
-->
-#### 定义从文件创建 ConfigMap 时要使用的键
+#### 定义从文件创建 ConfigMap 时要使用的键 {#define-the-key-to-use-when-generating-a-configmap-from-a-file}
在使用 `--from-file` 参数时,你可以定义在 ConfigMap 的 `data` 部分出现键名,
而不是按默认行为使用文件名:
+
```shell
kubectl create configmap game-config-3 --from-file=<我的键名>=<文件路径>
```
`<我的键名>` 是你要在 ConfigMap 中使用的键名,`<文件路径>` 是你想要键所表示的数据源文件的位置。
-
+
例如:
```shell
@@ -488,7 +502,9 @@ would produce the following ConfigMap:
kubectl get configmaps game-config-3 -o yaml
```
-
+
输出类似以下内容:
```yaml
@@ -499,7 +515,6 @@ metadata:
name: game-config-3
namespace: default
resourceVersion: "530"
- selfLink: /api/v1/namespaces/default/configmaps/game-config-3
uid: 05f8da22-d671-11e5-8cd0-68f728db1985
data:
game-special-key: |
@@ -548,7 +563,6 @@ metadata:
name: special-config
namespace: default
resourceVersion: "651"
- selfLink: /api/v1/namespaces/default/configmaps/special-config
uid: dadce046-d673-11e5-8cd0-68f728db1985
data:
special.how: very
@@ -563,7 +577,7 @@ You can also create a ConfigMap from generators and then apply it to create the
the Apiserver. The generators
should be specified in a `kustomization.yaml` inside a directory.
-->
-### 基于生成器创建 ConfigMap
+### 基于生成器创建 ConfigMap {#create-a-configmap-from-generator}
自 1.14 开始,`kubectl` 开始支持 `kustomization.yaml`。
你还可以基于生成器(Generators)创建 ConfigMap,然后将其应用于 API 服务器上创建对象。
@@ -572,20 +586,31 @@ should be specified in a `kustomization.yaml` inside a directory.
-#### 基于文件生成 ConfigMap
+#### 基于文件生成 ConfigMap {#generate-configmaps-from-files}
-例如,要基于 `configure-pod-container/configmap/kubectl/game.properties`
+例如,要基于 `configure-pod-container/configmap/game.properties`
文件生成一个 ConfigMap:
+
```shell
# 创建包含 ConfigMapGenerator 的 kustomization.yaml 文件
cat <./kustomization.yaml
configMapGenerator:
- name: game-config-4
files:
- - configure-pod-container/configmap/kubectl/game.properties
+ - configure-pod-container/configmap/game.properties
EOF
```
@@ -648,22 +673,33 @@ new ConfigMap is generated each time the content is modified.
#### Define the key to use when generating a ConfigMap from a file
You can define a key other than the file name to use in the ConfigMap generator.
-For example, to generate a ConfigMap from files `configure-pod-container/configmap/kubectl/game.properties`
+For example, to generate a ConfigMap from files `configure-pod-container/configmap/game.properties`
with the key `game-special-key`
-->
-#### 定义从文件生成 ConfigMap 时要使用的键
+#### 定义从文件生成 ConfigMap 时要使用的键 {#define-the-key-to-use-when-generating-a-configmap-from-a-file}
在 ConfigMap 生成器中,你可以定义一个非文件名的键名。
例如,从 `configure-pod-container/configmap/game.properties` 文件生成 ConfigMap,
但使用 `game-special-key` 作为键名:
+
```shell
# 创建包含 ConfigMapGenerator 的 kustomization.yaml 文件
cat <./kustomization.yaml
configMapGenerator:
- name: game-config-5
files:
- - game-special-key=configure-pod-container/configmap/kubectl/game.properties
+ - game-special-key=configure-pod-container/configmap/game.properties
EOF
```
@@ -684,13 +720,25 @@ configmap/game-config-5-m67dt67794 created
#### Generate ConfigMaps from Literals
To generate a ConfigMap from literals `special.type=charm` and `special.how=very`,
-you can specify the ConfigMap generator in `kusotmization.yaml` as
+you can specify the ConfigMap generator in `kustomization.yaml` as
-->
-#### 基于字面值生成 ConfigMap
+#### 基于字面值生成 ConfigMap {#generate-configmaps-from-literals}
要基于字符串 `special.type=charm` 和 `special.how=very` 生成 ConfigMap,
-可以在 `kusotmization.yaml` 中配置 ConfigMap 生成器:
+可以在 `kustomization.yaml` 中配置 ConfigMap 生成器:
+
```shell
# 创建带有 ConfigMapGenerator 的 kustomization.yaml 文件
cat <./kustomization.yaml
@@ -720,9 +768,9 @@ configmap/special-config-2-c92b5mmcf2 created
### Define a container environment variable with data from a single ConfigMap
-->
-## 使用 ConfigMap 数据定义容器环境变量
+## 使用 ConfigMap 数据定义容器环境变量 {#define-container-environment-variables-using-configmap-data}
-### 使用单个 ConfigMap 中的数据定义容器环境变量
+### 使用单个 ConfigMap 中的数据定义容器环境变量 {#define-a-container-environment-variable-with-data-from-a-single-configmap}
+
创建 Pod:
```shell
kubectl create -f https://kubernetes.io/examples/pods/pod-single-configmap-env-variable.yaml
```
-
+
现在,Pod 的输出包含环境变量 `SPECIAL_LEVEL_KEY=very`。
-### 使用来自多个 ConfigMap 的数据定义容器环境变量
+### 使用来自多个 ConfigMap 的数据定义容器环境变量 {#define-container-environment-variables-with-data-from-multiple-configmaps}
-
+
* 与前面的示例一样,首先创建 ConfigMap。
{{< codenew file="configmap/configmaps.yaml" >}}
-
+
创建 ConfigMap:
```shell
@@ -774,20 +830,24 @@ configmap/special-config-2-c92b5mmcf2 created
{{< codenew file="pods/pod-multiple-configmap-env-variable.yaml" >}}
-
+
创建 Pod:
```shell
kubectl create -f https://kubernetes.io/examples/pods/pod-multiple-configmap-env-variable.yaml
```
-
+
现在,Pod 的输出包含环境变量 `SPECIAL_LEVEL_KEY=very` 和 `LOG_LEVEL=INFO`。
-## 将 ConfigMap 中的所有键值对配置为容器环境变量
+## 将 ConfigMap 中的所有键值对配置为容器环境变量 {#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables}
+
创建 ConfigMap:
```shell
@@ -818,20 +880,24 @@ Kubernetes v1.6 和更高版本支持此功能。
{{< codenew file="pods/pod-configmap-envFrom.yaml" >}}
-
+
创建 Pod:
```shell
kubectl create -f https://kubernetes.io/examples/pods/pod-configmap-envFrom.yaml
```
-
+
现在,Pod 的输出包含环境变量 `SPECIAL_LEVEL=very` 和 `SPECIAL_TYPE=charm`。
-## 在 Pod 命令中使用 ConfigMap 定义的环境变量
+## 在 Pod 命令中使用 ConfigMap 定义的环境变量 {#use-configmap-defined-environment-variables-in-pod-commands}
-## 将 ConfigMap 数据添加到一个卷中
+## 将 ConfigMap 数据添加到一个卷中 {#add-configmap-data-to-a-volume}
-如基于文件创建 [ConfigMap](#create-configmaps-from-files) 中所述,当你使用
+如基于文件创建 [ConfigMap](#create-configmaps-from-files) 中所述,当你使用
`--from-file` 创建 ConfigMap 时,文件名成为存储在 ConfigMap 的 `data` 部分中的键,
文件内容成为键对应的值。
@@ -896,18 +962,20 @@ kubectl create -f https://kubernetes.io/examples/configmap/configmap-multikeys.y
Add the ConfigMap name under the `volumes` section of the Pod specification.
This adds the ConfigMap data to the directory specified as `volumeMounts.mountPath` (in this case, `/etc/config`).
-The `command` section references the `special.level` item stored in the ConfigMap.
+The `command` section lists directory files with names that match the keys in ConfigMap.
-->
-### 使用存储在 ConfigMap 中的数据填充卷
+### 使用存储在 ConfigMap 中的数据填充卷 {#populate-a-volume-with-data-stored-in-a-configmap}
在 Pod 规约的 `volumes` 部分下添加 ConfigMap 名称。
这会将 ConfigMap 数据添加到 `volumeMounts.mountPath` 所指定的目录
(在本例中为 `/etc/config`)。
-`command` 部分引用存储在 ConfigMap 中的 `special.level`。
+`command` 部分列出了名称与 ConfigMap 中的键匹配的目录文件。
{{< codenew file="pods/pod-configmap-volume.yaml" >}}
-
+
创建 Pod:
```shell
@@ -919,7 +987,7 @@ When the pod runs, the command `ls /etc/config/` produces the output below:
-->
Pod 运行时,命令 `ls /etc/config/` 产生下面的输出:
-```shell
+```
SPECIAL_LEVEL
SPECIAL_TYPE
```
@@ -944,7 +1012,7 @@ Text data is exposed as files using the UTF-8 character encoding. To use some ot
Use the `path` field to specify the desired file path for specific ConfigMap items.
In this case, the `SPECIAL_LEVEL` item will be mounted in the `config-volume` volume at `/etc/config/keys`.
-->
-### 将 ConfigMap 数据添加到卷中的特定路径
+### 将 ConfigMap 数据添加到卷中的特定路径 {#add-configmap-data-to-a-specific-path-in-the-volume}
使用 `path` 字段为特定的 ConfigMap 项目指定预期的文件路径。
在这里,ConfigMap 中键 `SPECIAL_LEVEL` 的内容将挂载在 `config-volume`
@@ -983,7 +1051,7 @@ Like before, all previous files in the `/etc/config/` directory will be deleted.
You can project keys to specific paths and specific permissions on a per-file
basis. The [Secrets](/docs/concepts/configuration/secret/#using-secrets-as-files-from-a-pod) user guide explains the syntax.
-->
-### 映射键到指定路径并设置文件访问权限
+### 映射键到指定路径并设置文件访问权限 {#project-keys-to-specific-paths-and-file-permissions}
你可以将指定键名投射到特定目录,也可以逐个文件地设定访问权限。
[Secret 用户指南](/zh/docs/concepts/configuration/secret/#using-secrets-as-files-from-a-pod)
@@ -1042,7 +1110,7 @@ A container using a ConfigMap as a [subPath](/docs/concepts/storage/volumes/#usi
The ConfigMap API resource stores configuration data as key-value pairs. The data can be consumed in pods or provide the configurations for system components such as controllers. ConfigMap is similar to [Secrets](/docs/concepts/configuration/secret/), but provides a means of working with strings that don't contain sensitive information. Users and system components alike can store configuration data in ConfigMap.
-->
-## 了解 ConfigMap 和 Pod
+## 了解 ConfigMap 和 Pod {#understanding-configmaps-and-pods}
ConfigMap API 资源将配置数据存储为键值对。
数据可以在 Pod 中使用,也可以用来提供系统组件(如控制器)的配置。
@@ -1067,6 +1135,25 @@ ConfigMap 的 `data` 字段包含配置数据。如下例所示,它可以简
(如用 `--from-literal` 的单个属性定义)或复杂
(如用 `--from-file` 的配置文件或 JSON blob定义)。
+
```yaml
apiVersion: v1
kind: ConfigMap
@@ -1107,7 +1194,9 @@ data:
kubectl get events
```
-
+
输出与此类似:
```
@@ -1124,7 +1213,7 @@ data:
-- 你不能将 ConfigMap 用于{{< glossary_tooltip text="静态 Pod" term_id="static-pod" >}},
+- 你不能将 ConfigMap 用于{{< glossary_tooltip text="静态 Pod" term_id="static-pod" >}},
因为 Kubernetes 不支持这种用法。
## {{% heading "whatsnext" %}}
@@ -1133,5 +1222,5 @@ data:
* Follow a real world example of [Configuring Redis using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/).
-->
* 浏览[使用 ConfigMap 配置 Redis](/zh/docs/tutorials/configuration/configure-redis-using-configmap/)
- 真实实例。
+ 真实示例。
diff --git a/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md b/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md
index 4b4e05dd4b..0007ac660a 100644
--- a/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md
+++ b/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md
@@ -17,7 +17,7 @@ weight: 20
-本页展示如何为运行为在 Windows 节点上运行的 Pod 和容器配置 `RunAsUserName` 。
+本页展示如何为运行为在 Windows 节点上运行的 Pod 和容器配置 `RunAsUserName`。
大致相当于 Linux 上的 `runAsUser`,允许在容器中以与默认值不同的用户名运行应用。
## {{% heading "prerequisites" %}}
@@ -32,11 +32,11 @@ You need to have a Kubernetes cluster and the kubectl command-line tool must be
## Set the Username for a Pod
To specify the username with which to execute the Pod's container processes, include the
-`securityContext` field ([PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core))
-in the Pod specification, and within it, the `windowsOptions`
+`securityContext` field ([PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core))
+in the Pod specification, and within it, the `windowsOptions`
([WindowsSecurityContextOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core)) field containing the `runAsUserName` field.
-->
-## 为 Pod 设置 Username
+## 为 Pod 设置 Username {#set-the-username-for-a-pod}
要指定运行 Pod 容器时所使用的用户名,请在 Pod 声明中包含 `securityContext`
([PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core)) 字段,
@@ -102,21 +102,21 @@ The output should be:
输出结果应该是这样:
-```shell
+```
ContainerUser
```
-## 为容器设置 Username
+## 为容器设置 Username {#set-the-username-for-a-container}
要指定运行容器时所使用的用户名,请在容器清单中包含 `securityContext`
([SecurityContext](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core))
@@ -186,7 +186,7 @@ ContainerAdministrator
In order to use this feature, the value set in the `runAsUserName` field must be a valid username. It must have the following format: `DOMAIN\USER`, where `DOMAIN\` is optional. Windows user names are case insensitive. Additionally, there are some restrictions regarding the `DOMAIN` and `USER`:
-->
-## Windows Username 的局限性
+## Windows Username 的局限性 {#windows-username-limitations}
想要使用此功能,在 `runAsUserName` 字段中设置的值必须是有效的用户名。
它必须是 `DOMAIN\USER` 这种格式,其中 `DOMAIN\` 是可选的。
@@ -218,10 +218,10 @@ For more information about these limtations, check [here](https://support.micros
## {{% heading "whatsnext" %}}
-* [Kubernetes 中调度 Windows 容器的指南](/zh/docs/setup/production-environment/windows/user-guide-windows-containers/)
-* [使用组托管服务帐户(GMSA)管理工作负载身份](/zh/docs/setup/production-environment/windows/user-guide-windows-containers/#managing-workload-identity-with-group-managed-service-accounts)
+* [Kubernetes 中调度 Windows 容器的指南](/zh/docs/concepts/windows/user-guide/)
+* [使用组托管服务帐户(GMSA)管理工作负载身份](/zh/docs/concepts/windows/user-guide/#managing-workload-identity-with-group-managed-service-accounts)
* [Windows 下 pod 和容器的 GMSA 配置](/zh/docs/tasks/configure-pod-container/configure-gmsa/)
diff --git a/content/zh/docs/tasks/configure-pod-container/translate-compose-kubernetes.md b/content/zh/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
index 6a96b492a6..8939505567 100644
--- a/content/zh/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
+++ b/content/zh/docs/tasks/configure-pod-container/translate-compose-kubernetes.md
@@ -1,15 +1,14 @@
---
-reviewers:
-- cdrage
title: 将 Docker Compose 文件转换为 Kubernetes 资源
content_type: task
weight: 200
---
-
@@ -36,7 +35,7 @@ More information can be found on the Kompose website at [http://kompose.io](http
We have multiple ways to install Kompose. Our preferred method is downloading the binary from the latest GitHub release.
-->
-## 安装 Kompose
+## 安装 Kompose {#install-kompose}
我们有很多种方式安装 Kompose。首选方式是从最新的 GitHub 发布页面下载二进制文件。
@@ -132,7 +131,7 @@ brew install kompose
-## 使用 Kompose
+## 使用 Kompose {#use-kompose}
- 进入 `docker-compose.yml` 文件所在的目录。如果没有,请使用下面这个进行测试。
+
+1. 进入 `docker-compose.yml` 文件所在的目录。如果没有,请使用下面这个进行测试。
```yaml
version: "2"
@@ -174,10 +174,10 @@ you need is an existing `docker-compose.yml` file.
2. 要将 `docker-compose.yml` 转换为 `kubectl` 可用的文件,请运行 `kompose convert`
- 命令进行转换,然后运行 `kubectl create -f