Merge master into dev-1.22 to keep in sync.
This commit is contained in:
@@ -698,6 +698,8 @@ admission plugin, which allows preventing pods from running on specifically tain
|
||||
|
||||
### PodSecurityPolicy {#podsecuritypolicy}
|
||||
|
||||
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
|
||||
|
||||
This admission controller acts on creation and modification of the pod and determines if it should be admitted
|
||||
based on the requested security context and the available Pod Security Policies.
|
||||
|
||||
|
||||
@@ -14,6 +14,48 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
## `LoggingConfiguration` {#LoggingConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
LoggingConfiguration contains logging options
|
||||
Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>format</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Format Flag specifies the structure of log messages.
|
||||
default value of format is `text`</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>sanitization</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
[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.`)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
## `KubeletConfiguration` {#kubelet-config-k8s-io-v1beta1-KubeletConfiguration}
|
||||
|
||||
@@ -445,10 +487,10 @@ Default: "10s"</td>
|
||||
status to master if node status does not change. Kubelet will ignore this
|
||||
frequency and post node status immediately if any change is detected. It is
|
||||
only used when node lease feature is enabled. nodeStatusReportFrequency's
|
||||
default value is 1m. But if nodeStatusUpdateFrequency is set explicitly,
|
||||
default value is 5m. But if nodeStatusUpdateFrequency is set explicitly,
|
||||
nodeStatusReportFrequency's default value will be set to
|
||||
nodeStatusUpdateFrequency for backward compatibility.
|
||||
Default: "1m"</td>
|
||||
Default: "5m"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -590,7 +632,7 @@ Default: "cgroupfs"</td>
|
||||
Requires the CPUManager feature gate to be enabled.
|
||||
Dynamic Kubelet Config (beta): This field should not be updated without a full node
|
||||
reboot. It is safest to keep this value the same as the local config.
|
||||
Default: "none"</td>
|
||||
Default: "None"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -606,6 +648,18 @@ Default: "10s"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>memoryManagerPolicy</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
MemoryManagerPolicy is the name of the policy to use by memory manager.
|
||||
Requires the MemoryManager feature gate to be enabled.
|
||||
Dynamic Kubelet Config (beta): This field should not be updated without a full node
|
||||
reboot. It is safest to keep this value the same as the local config.
|
||||
Default: "none"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>topologyManagerPolicy</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
@@ -1231,7 +1285,7 @@ Default: true</td>
|
||||
</td>
|
||||
<td>
|
||||
ShutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown.
|
||||
Default: "30s"</td>
|
||||
Default: "0s"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1241,7 +1295,46 @@ Default: "30s"</td>
|
||||
<td>
|
||||
ShutdownGracePeriodCriticalPods specifies the duration used to terminate critical pods during a node shutdown. This should be less than ShutdownGracePeriod.
|
||||
For example, if ShutdownGracePeriod=30s, and ShutdownGracePeriodCriticalPods=10s, during a node shutdown the first 20 seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating critical pods.
|
||||
Default: "10s"</td>
|
||||
Default: "0s"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>reservedMemory</code><br/>
|
||||
<a href="#kubelet-config-k8s-io-v1beta1-MemoryReservation"><code>[]MemoryReservation</code></a>
|
||||
</td>
|
||||
<td>
|
||||
ReservedMemory specifies a comma-separated list of memory reservations for NUMA nodes.
|
||||
The parameter makes sense only in the context of the memory manager feature. The memory manager will not allocate reserved memory for container workloads.
|
||||
For example, if you have a NUMA0 with 10Gi of memory and the ReservedMemory was specified to reserve 1Gi of memory at NUMA0,
|
||||
the memory manager will assume that only 9Gi is available for allocation.
|
||||
You can specify a different amount of NUMA node and memory types.
|
||||
You can omit this parameter at all, but you should be aware that the amount of reserved memory from all NUMA nodes
|
||||
should be equal to the amount of memory specified by the node allocatable features(https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).
|
||||
If at least one node allocatable parameter has a non-zero value, you will need to specify at least one NUMA node.
|
||||
Also, avoid specifying:
|
||||
1. Duplicates, the same NUMA node, and memory type, but with a different value.
|
||||
2. zero limits for any memory type.
|
||||
3. NUMAs nodes IDs that do not exist under the machine.
|
||||
4. memory types except for memory and hugepages-<size>
|
||||
Default: nil</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>enableProfilingHandler</code><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
enableProfilingHandler enables profiling via web interface host:port/debug/pprof/
|
||||
Default: true</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>enableDebugFlagsHandler</code><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
enableDebugFlagsHandler enables flags endpoint via web interface host:port/debug/flags/v
|
||||
Default: true</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1544,6 +1637,47 @@ and groups corresponding to the Organization in the client certificate.</td>
|
||||
|
||||
|
||||
|
||||
## `MemoryReservation` {#kubelet-config-k8s-io-v1beta1-MemoryReservation}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
MemoryReservation specifies the memory reservation of different types for each NUMA node
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>numaNode</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>limits</code> <B>[Required]</B><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#resourcelist-v1-core"><code>core/v1.ResourceList</code></a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ResourceChangeDetectionStrategy` {#kubelet-config-k8s-io-v1beta1-ResourceChangeDetectionStrategy}
|
||||
|
||||
(Alias of `string`)
|
||||
@@ -1560,45 +1694,3 @@ managers (secret, configmap) are discovering object changes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `LoggingConfiguration` {#LoggingConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
LoggingConfiguration contains logging options
|
||||
Refer [Logs Options](https://github.com/kubernetes/component-base/blob/master/logs/options.go) for more information.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>format</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Format Flag specifies the structure of log messages.
|
||||
default value of format is `text`</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>sanitization</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
[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.`)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: Affinity
|
||||
id: affinity
|
||||
date: 2019-01-11
|
||||
full_link: /docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
|
||||
short_description: >
|
||||
Rules used by the scheduler to determine where to place pods
|
||||
aka:
|
||||
tags:
|
||||
- fundamental
|
||||
---
|
||||
|
||||
In Kubernetes, _affinity_ is a set of rules that give hints to the scheduler about where to place pods.
|
||||
|
||||
<!--more-->
|
||||
There are two kinds of affinity:
|
||||
* [node affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)
|
||||
* [pod-to-pod affinity](/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity)
|
||||
|
||||
The rules are defined using the Kubernetes {{< glossary_tooltip term_id="label" text="labels">}},
|
||||
and {{< glossary_tooltip term_id="selector" text="selectors">}} specified in {{< glossary_tooltip term_id="pod" text="pods" >}},
|
||||
and they can be either required or preferred, depending on how strictly you want the scheduler to enforce them.
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -298,26 +298,6 @@ Please note that:
|
||||
2. in case of kubeadm is executed in the `--dry-run` mode, the etcd static Pod manifest is written in a temporary folder
|
||||
3. Static Pod manifest generation for local etcd can be invoked individually with the [`kubeadm init phase etcd local`](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-etcd) command
|
||||
|
||||
### Optional Dynamic Kubelet Configuration
|
||||
|
||||
To use this functionality call `kubeadm alpha kubelet config enable-dynamic`. It writes the kubelet init configuration
|
||||
into `/var/lib/kubelet/config/init/kubelet` file.
|
||||
|
||||
The init configuration is used for starting the kubelet on this specific node, providing an alternative for the kubelet drop-in file;
|
||||
such configuration will be replaced by the kubelet base configuration as described in following steps.
|
||||
See [set kubelet parameters via a config file](/docs/tasks/administer-cluster/kubelet-config-file) for additional information.
|
||||
|
||||
Please note that:
|
||||
|
||||
1. To make dynamic kubelet configuration work, flag `--dynamic-config-dir=/var/lib/kubelet/config/dynamic` should be specified
|
||||
in `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf`
|
||||
1. The kubelet configuration can be changed by passing a `KubeletConfiguration` object to `kubeadm init` or `kubeadm join` by using
|
||||
a configuration file `--config some-file.yaml`. The `KubeletConfiguration` object can be separated from other objects such
|
||||
as `InitConfiguration` using the `---` separator. For more details have a look at the `kubeadm config print-default` command.
|
||||
|
||||
For more details about the `KubeletConfiguration` struct, take a look at the
|
||||
[`KubeletConfiguration` reference](/docs/reference/config-api/kubelet-config.v1beta1/).
|
||||
|
||||
### Wait for the control plane to come up
|
||||
|
||||
kubeadm waits (upto 4m0s) until `localhost:6443/healthz` (kube-apiserver liveness) returns `ok`. However in order to detect
|
||||
@@ -327,17 +307,6 @@ deadlock conditions, kubeadm fails fast if `localhost:10255/healthz` (kubelet li
|
||||
kubeadm relies on the kubelet to pull the control plane images and run them properly as static Pods.
|
||||
After the control plane is up, kubeadm completes the tasks described in following paragraphs.
|
||||
|
||||
### (optional) Write base kubelet configuration
|
||||
|
||||
{{< feature-state for_k8s_version="v1.11" state="beta" >}}
|
||||
|
||||
If kubeadm is invoked with `--feature-gates=DynamicKubeletConfig`:
|
||||
|
||||
1. Write the kubelet base configuration into the `kubelet-base-config-v1.9` ConfigMap in the `kube-system` namespace
|
||||
2. Creates RBAC rules for granting read access to that ConfigMap to all bootstrap tokens and all kubelet instances
|
||||
(that is `system:bootstrappers:kubeadm:default-node-token` and `system:nodes` groups)
|
||||
3. Enable the dynamic kubelet configuration feature for the initial control-plane node by pointing `Node.spec.configSource` to the newly-created ConfigMap
|
||||
|
||||
### Save the kubeadm ClusterConfiguration in a ConfigMap for later reference
|
||||
|
||||
kubeadm saves the configuration passed to `kubeadm init` in a ConfigMap named `kubeadm-config` under `kube-system` namespace.
|
||||
@@ -520,18 +489,3 @@ Please note that:
|
||||
- The temporary authentication resolve to a user member of `system:bootstrappers:kubeadm:default-node-token` group which was granted
|
||||
access to CSR api during the `kubeadm init` process
|
||||
- The automatic CSR approval is managed by the csrapprover controller, according with configuration done the `kubeadm init` process
|
||||
|
||||
### (optional) Write init kubelet configuration
|
||||
|
||||
{{< feature-state for_k8s_version="v1.11" state="beta" >}}
|
||||
|
||||
If kubeadm is invoked with `--feature-gates=DynamicKubeletConfig`:
|
||||
|
||||
1. Read the kubelet base configuration from the `kubelet-base-config-v1.x` ConfigMap in the `kube-system` namespace using the
|
||||
Bootstrap Token credentials, and write it to disk as kubelet init configuration file `/var/lib/kubelet/config/init/kubelet`
|
||||
2. As soon as kubelet starts with the Node's own credential (`/etc/kubernetes/kubelet.conf`), update current node configuration
|
||||
specifying that the source for the node/kubelet configuration is the above ConfigMap.
|
||||
|
||||
Please note that:
|
||||
|
||||
1. To make dynamic kubelet configuration work, flag `--dynamic-config-dir=/var/lib/kubelet/config/dynamic` should be specified in `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf`
|
||||
|
||||
@@ -66,7 +66,6 @@ their authors, not the Kubernetes team.
|
||||
| PHP | [github.com/maclof/kubernetes-client](https://github.com/maclof/kubernetes-client) |
|
||||
| PHP | [github.com/travisghansen/kubernetes-client-php](https://github.com/travisghansen/kubernetes-client-php) |
|
||||
| PHP | [github.com/renoki-co/php-k8s](https://github.com/renoki-co/php-k8s) |
|
||||
| Python | [github.com/eldarion-gondor/pykube](https://github.com/eldarion-gondor/pykube) |
|
||||
| Python | [github.com/fiaas/k8s](https://github.com/fiaas/k8s) |
|
||||
| Python | [github.com/mnubo/kubernetes-py](https://github.com/mnubo/kubernetes-py) |
|
||||
| Python | [github.com/tomplus/kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio) |
|
||||
|
||||
Executable → Regular
Reference in New Issue
Block a user