Merge remote-tracking branch 'upstream/main' into dev-1.24
This commit is contained in:
@@ -137,7 +137,7 @@ collection, which deletes images in order based on the last time they were used,
|
||||
starting with the oldest first. The kubelet deletes images
|
||||
until disk usage reaches the `LowThresholdPercent` value.
|
||||
|
||||
### Container image garbage collection {#container-image-garbage-collection}
|
||||
### Container garbage collection {#container-image-garbage-collection}
|
||||
|
||||
The kubelet garbage collects unused containers based on the following variables,
|
||||
which you can define:
|
||||
@@ -152,11 +152,11 @@ which you can define:
|
||||
In addition to these variables, the kubelet garbage collects unidentified and
|
||||
deleted containers, typically starting with the oldest first.
|
||||
|
||||
`MaxPerPodContainer` and `MaxContainer` may potentially conflict with each other
|
||||
`MaxPerPodContainer` and `MaxContainers` may potentially conflict with each other
|
||||
in situations where retaining the maximum number of containers per Pod
|
||||
(`MaxPerPodContainer`) would go outside the allowable total of global dead
|
||||
containers (`MaxContainers`). In this situation, the kubelet adjusts
|
||||
`MaxPodPerContainer` to address the conflict. A worst-case scenario would be to
|
||||
`MaxPerPodContainer` to address the conflict. A worst-case scenario would be to
|
||||
downgrade `MaxPerPodContainer` to `1` and evict the oldest containers.
|
||||
Additionally, containers owned by pods that have been deleted are removed once
|
||||
they are older than `MinAge`.
|
||||
@@ -180,4 +180,4 @@ configure garbage collection:
|
||||
|
||||
* Learn more about [ownership of Kubernetes objects](/docs/concepts/overview/working-with-objects/owners-dependents/).
|
||||
* Learn more about Kubernetes [finalizers](/docs/concepts/overview/working-with-objects/finalizers/).
|
||||
* Learn about the [TTL controller](/docs/concepts/workloads/controllers/ttlafterfinished/) (beta) that cleans up finished Jobs.
|
||||
* Learn about the [TTL controller](/docs/concepts/workloads/controllers/ttlafterfinished/) (beta) that cleans up finished Jobs.
|
||||
|
||||
@@ -442,7 +442,7 @@ Message: Pod was terminated in response to imminent node shutdown.
|
||||
To provide more flexibility during graceful node shutdown around the ordering
|
||||
of pods during shutdown, graceful node shutdown honors the PriorityClass for
|
||||
Pods, provided that you enabled this feature in your cluster. The feature
|
||||
allows allows cluster administers to explicitly define the ordering of pods
|
||||
allows cluster administers to explicitly define the ordering of pods
|
||||
during graceful node shutdown based on [priority
|
||||
classes](docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass).
|
||||
|
||||
|
||||
@@ -30,55 +30,7 @@ insert dynamic port numbers into configuration blocks, services have to know
|
||||
how to find each other, etc. Rather than deal with this, Kubernetes takes a
|
||||
different approach.
|
||||
|
||||
## The Kubernetes network model
|
||||
|
||||
Every `Pod` gets its own IP address, maximum one per IP family. This means you
|
||||
do not need need to deal with mapping container ports to host ports in order to
|
||||
expose the `Pods` services on the network. This creates a clean,
|
||||
backwards-compatible model where `Pods` can be treated much like VMs or physical
|
||||
hosts from the perspectives of port allocation, naming, service discovery, load
|
||||
balancing, application configuration, and migration.
|
||||
|
||||
Kubernetes IP addresses exist at the `Pod` scope, in the `status.PodIPs` field
|
||||
- containers within a `Pod` share their network namespaces - including their IP
|
||||
address. This means that containers within a `Pod` can all reach each other's
|
||||
ports on `localhost`. This also means that containers within a `Pod` must
|
||||
coordinate port usage, but this is no different from processes in a VM. This is
|
||||
called the _IP-per-pod_ model.
|
||||
|
||||
In every cluster, there exists an abstract pod-network to which pods
|
||||
are connected by default, unless explicitly configured to use the
|
||||
host-network (on platforms that support it). Even if a host has
|
||||
multiple IPs, host-network pods only have one Kubernetes IP address at
|
||||
the `Pod` scope, that is, the `status.PodIPs` field contains one
|
||||
IP per address family (for now), so the "IP-per-pod" model is guaranteed.
|
||||
|
||||
Kubernetes imposes the following fundamental requirements on any networking
|
||||
implementation (barring any intentional network segmentation policies):
|
||||
|
||||
* any pod-network pod on any node can communicate with all other pod-network
|
||||
pods on all nodes without NAT.
|
||||
* non-pod processes on a node (the kubelet, and also for example any other system daemon) can
|
||||
communicate with all pods on that node.
|
||||
|
||||
In addition, for platforms and runtimes that support running pods in the host OS network:
|
||||
|
||||
* host-network pods of a node can connect directly with all pods IPs on all
|
||||
nodes, however, unlike pod-network pods, the source IP address might not be
|
||||
present in the `Pod` `status.PodIPs` field.
|
||||
|
||||
This model is principally compatible with the desire for Kubernetes to enable
|
||||
low-friction porting of apps from VMs to containers. If your workload previously ran
|
||||
in a VM, your VM typically had a single IP address; everything in that VM could talk to
|
||||
other VMs on your network.
|
||||
This is the same basic model but less complex overall.
|
||||
|
||||
How this is implemented is a detail of the particular container runtime in use. Likewise, the networking option you choose may support [dual-stack IPv4/IPv6 networking](/docs/concepts/services-networking/dual-stack/); implementations vary.
|
||||
|
||||
It is possible to request ports on the `Node` itself which forward to your `Pod`
|
||||
(called host ports), but this is a very niche operation. How that forwarding is
|
||||
implemented is also a detail of the container runtime. The `Pod` itself is
|
||||
blind to the existence or non-existence of host ports.
|
||||
To learn about the Kubernetes networking model, see [here](/docs/concepts/services-networking/).
|
||||
|
||||
## How to implement the Kubernetes networking model
|
||||
|
||||
|
||||
@@ -239,6 +239,10 @@ propagation delay, where the cache propagation delay depends on the chosen cache
|
||||
|
||||
ConfigMaps consumed as environment variables are not updated automatically and require a pod restart.
|
||||
|
||||
{{< note >}}
|
||||
A container using a ConfigMap as a [subPath](/docs/concepts/storage/volumes#using-subpath) volume mount will not receive ConfigMap updates.
|
||||
{{< /note >}}
|
||||
|
||||
## Immutable ConfigMaps {#configmap-immutable}
|
||||
|
||||
{{< feature-state for_k8s_version="v1.21" state="stable" >}}
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: Managing Resources for Containers
|
||||
title: Resource Management for Pods and Containers
|
||||
content_type: concept
|
||||
weight: 40
|
||||
feature:
|
||||
title: Automatic bin packing
|
||||
description: >
|
||||
Automatically places containers based on their resource requirements and other constraints, while not sacrificing availability. Mix critical and best-effort workloads in order to drive up utilization and save even more resources.
|
||||
Automatically places containers based on their resource requirements and other constraints, while not sacrificing availability.
|
||||
Mix critical and best-effort workloads in order to drive up utilization and save even more resources.
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
When you specify a {{< glossary_tooltip term_id="pod" >}}, you can optionally specify how
|
||||
much of each resource a {{< glossary_tooltip text="Container" term_id="container" >}} needs.
|
||||
much of each resource a {{< glossary_tooltip text="container" term_id="container" >}} needs.
|
||||
The most common resources to specify are CPU and memory (RAM); there are others.
|
||||
|
||||
When you specify the resource _request_ for Containers in a Pod, the scheduler uses this
|
||||
When you specify the resource _request_ for containers in a Pod, the
|
||||
{{< glossary_tooltip text="kube-scheduler" term_id="kube-scheduler" >}} uses this
|
||||
information to decide which node to place the Pod on. When you specify a resource _limit_
|
||||
for a Container, the kubelet enforces those limits so that the running container is not
|
||||
for a container, the kubelet enforces those limits so that the running container is not
|
||||
allowed to use more of that resource than the limit you set. The kubelet also reserves
|
||||
at least the _request_ amount of that system resource specifically for that container
|
||||
to use.
|
||||
@@ -33,7 +35,7 @@ For example, if you set a `memory` request of 256 MiB for a container, and that
|
||||
a Pod scheduled to a Node with 8GiB of memory and no other Pods, then the container can try to use
|
||||
more RAM.
|
||||
|
||||
If you set a `memory` limit of 4GiB for that Container, the kubelet (and
|
||||
If you set a `memory` limit of 4GiB for that container, the kubelet (and
|
||||
{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}) enforce the limit.
|
||||
The runtime prevents the container from using more than the configured resource limit. For example:
|
||||
when a process in the container tries to consume more than the allowed amount of memory,
|
||||
@@ -45,8 +47,8 @@ or by enforcement (the system prevents the container from ever exceeding the lim
|
||||
runtimes can have different ways to implement the same restrictions.
|
||||
|
||||
{{< note >}}
|
||||
If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes
|
||||
automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own
|
||||
If a container specifies its own memory limit, but does not specify a memory request, Kubernetes
|
||||
automatically assigns a memory request that matches the limit. Similarly, if a container specifies its own
|
||||
CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches
|
||||
the limit.
|
||||
{{< /note >}}
|
||||
@@ -56,7 +58,7 @@ the limit.
|
||||
*CPU* and *memory* are each a *resource type*. A resource type has a base unit.
|
||||
CPU represents compute processing and is specified in units of [Kubernetes CPUs](#meaning-of-cpu).
|
||||
Memory is specified in units of bytes.
|
||||
If you're using Kubernetes v1.14 or newer, you can specify _huge page_ resources.
|
||||
For Linux workloads, you can specify _huge page_ resources.
|
||||
Huge pages are a Linux-specific feature where the node kernel allocates blocks of memory
|
||||
that are much larger than the default page size.
|
||||
|
||||
@@ -76,9 +78,10 @@ consumed. They are distinct from
|
||||
[Services](/docs/concepts/services-networking/service/) are objects that can be read and modified
|
||||
through the Kubernetes API server.
|
||||
|
||||
## Resource requests and limits of Pod and Container
|
||||
## Resource requests and limits of Pod and container
|
||||
|
||||
Each Container of a Pod can specify one or more of the following:
|
||||
For each container, you can specify resource limits and requests,
|
||||
including the following:
|
||||
|
||||
* `spec.containers[].resources.limits.cpu`
|
||||
* `spec.containers[].resources.limits.memory`
|
||||
@@ -87,49 +90,64 @@ Each Container of a Pod can specify one or more of the following:
|
||||
* `spec.containers[].resources.requests.memory`
|
||||
* `spec.containers[].resources.requests.hugepages-<size>`
|
||||
|
||||
Although requests and limits can only be specified on individual Containers, it
|
||||
is convenient to talk about Pod resource requests and limits. A
|
||||
*Pod resource request/limit* for a particular resource type is the sum of the
|
||||
resource requests/limits of that type for each Container in the Pod.
|
||||
Although you can only specify requests and limits for individual containers,
|
||||
it is also useful to think about the overall resource requests and limits for
|
||||
a Pod.
|
||||
For a particular resource, a *Pod resource request/limit* is the sum of the
|
||||
resource requests/limits of that type for each container in the Pod.
|
||||
|
||||
## Resource units in Kubernetes
|
||||
|
||||
### Meaning of CPU
|
||||
### CPU resource units {#meaning-of-cpu}
|
||||
|
||||
Limits and requests for CPU resources are measured in *cpu* units.
|
||||
One cpu, in Kubernetes, is equivalent to **1 vCPU/Core** for cloud providers and **1 hyperthread** on bare-metal Intel processors.
|
||||
In Kubernetes, 1 CPU unit is equivalent to **1 physical CPU core**,
|
||||
or **1 virtual core**, depending on whether the node is a physical host
|
||||
or a virtual machine running inside a physical machine.
|
||||
|
||||
Fractional requests are allowed. When you define a container with
|
||||
`spec.containers[].resources.requests.cpu` set to `0.5`, you are requesting half
|
||||
as much CPU time compared to if you asked for `1.0` CPU.
|
||||
For CPU resource units, the expression `0.1` is equivalent to the
|
||||
For CPU resource units, the [quantity](/docs/reference/kubernetes-api/common-definitions/quantity/) expression `0.1` is equivalent to the
|
||||
expression `100m`, which can be read as "one hundred millicpu". Some people say
|
||||
"one hundred millicores", and this is understood to mean the same thing. A
|
||||
request with a decimal point, like `0.1`, is converted to `100m` by the API, and
|
||||
precision finer than `1m` is not allowed. For this reason, the form `100m` might
|
||||
be preferred.
|
||||
"one hundred millicores", and this is understood to mean the same thing.
|
||||
|
||||
CPU is always requested as an absolute quantity, never as a relative quantity;
|
||||
0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine.
|
||||
CPU resource is always specified as an absolute amount of resource, never as a relative amount. For example,
|
||||
`500m` CPU represents the roughly same amount of computing power whether that container
|
||||
runs on a single-core, dual-core, or 48-core machine.
|
||||
|
||||
### Meaning of memory
|
||||
{{< note >}}
|
||||
Kubernetes doesn't allow you to specify CPU resources with a precision finer than
|
||||
`1m`. Because of this, it's useful to specify CPU units less than `1.0` or `1000m` using
|
||||
the milliCPU form; for example, `5m` rather than `0.005`.
|
||||
{{< /note >}}
|
||||
|
||||
### Memory resource units {#meaning-of-memory}
|
||||
|
||||
Limits and requests for `memory` are measured in bytes. You can express memory as
|
||||
a plain integer or as a fixed-point number using one of these suffixes:
|
||||
E, P, T, G, M, k, m (millis). You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi,
|
||||
a plain integer or as a fixed-point number using one of these
|
||||
[quantity](/docs/reference/kubernetes-api/common-definitions/quantity/) suffixes:
|
||||
E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi,
|
||||
Mi, Ki. For example, the following represent roughly the same value:
|
||||
|
||||
```shell
|
||||
128974848, 129e6, 129M, 128974848000m, 123Mi
|
||||
```
|
||||
|
||||
Here's an example.
|
||||
The following Pod has two Containers. Each Container has a request of 0.25 cpu
|
||||
and 64MiB (2<sup>26</sup> bytes) of memory. Each Container has a limit of 0.5
|
||||
cpu and 128MiB of memory. You can say the Pod has a request of 0.5 cpu and 128
|
||||
MiB of memory, and a limit of 1 cpu and 256MiB of memory.
|
||||
Take care about case for suffixes. If you request `400m` of memory, this is a request
|
||||
for 0.4 bytes. Someone who types that probably meant to ask for 400 mebibytes (`400Mi`)
|
||||
or 400 megabytes (`400M`).
|
||||
|
||||
## Container resources example {#example-1}
|
||||
|
||||
The following Pod has two containers. Both containers are defined with a request for
|
||||
0.25 CPU
|
||||
and 64MiB (2<sup>26</sup> bytes) of memory. Each container has a limit of 0.5
|
||||
CPU and 128MiB of memory. You can say the Pod has a request of 0.5 CPU and 128
|
||||
MiB of memory, and a limit of 1 CPU and 256MiB of memory.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
@@ -162,56 +180,54 @@ When you create a Pod, the Kubernetes scheduler selects a node for the Pod to
|
||||
run on. Each node has a maximum capacity for each of the resource types: the
|
||||
amount of CPU and memory it can provide for Pods. The scheduler ensures that,
|
||||
for each resource type, the sum of the resource requests of the scheduled
|
||||
Containers is less than the capacity of the node. Note that although actual memory
|
||||
containers is less than the capacity of the node.
|
||||
Note that although actual memory
|
||||
or CPU resource usage on nodes is very low, the scheduler still refuses to place
|
||||
a Pod on a node if the capacity check fails. This protects against a resource
|
||||
shortage on a node when resource usage later increases, for example, during a
|
||||
daily peak in request rate.
|
||||
|
||||
## How Pods with resource limits are run
|
||||
## How Kubernetes applies resource requests and limits {#how-pods-with-resource-limits-are-run}
|
||||
|
||||
When the kubelet starts a Container of a Pod, it passes the CPU and memory limits
|
||||
to the container runtime.
|
||||
When the kubelet starts a container as part of a Pod, the kubelet passes that container's
|
||||
requests and limits for memory and CPU to the container runtime.
|
||||
|
||||
When using Docker:
|
||||
On Linux, the container runtime typically configures
|
||||
kernel {{< glossary_tooltip text="cgroups" term_id="cgroup" >}} that apply and enforce the
|
||||
limits you defined.
|
||||
|
||||
- The `spec.containers[].resources.requests.cpu` is converted to its core value,
|
||||
which is potentially fractional, and multiplied by 1024. The greater of this number
|
||||
or 2 is used as the value of the
|
||||
[`--cpu-shares`](https://docs.docker.com/engine/reference/run/#cpu-share-constraint)
|
||||
flag in the `docker run` command.
|
||||
- The CPU limit defines a hard ceiling on how much CPU time that the container can use.
|
||||
During each scheduling interval (time slice), the Linux kernel checks to see if this
|
||||
limit is exceeded; if so, the kernel waits before allowing that cgroup to resume execution.
|
||||
- The CPU request typically defines a weighting. If several different containers (cgroups)
|
||||
want to run on a contended system, workloads with larger CPU requests are allocated more
|
||||
CPU time than workloads with small requests.
|
||||
- The memory request is mainly used during (Kubernetes) Pod scheduling. On a node that uses
|
||||
cgroups v2, the container runtime might use the memory request as a hint to set
|
||||
`memory.min` and `memory.low`.
|
||||
- The memory limit defines a memory limit for that cgroup. If the container tries to
|
||||
allocate more memory than this limit, the Linux kernel out-of-memory subsystem activates
|
||||
and, typically, intervenes by stopping one of the processes in the container that tried
|
||||
to allocate memory. If that process is the container's PID 1, and the container is marked
|
||||
as restartable, Kubernetes restarts the container.
|
||||
- The memory limit for the Pod or container can also apply to pages in memory backed
|
||||
volumes, such as an `emptyDir`. The kubelet tracks `tmpfs` emptyDir volumes as container
|
||||
memory use, rather than as local ephemeral storage.
|
||||
|
||||
- The `spec.containers[].resources.limits.cpu` is converted to its millicore value and
|
||||
multiplied by 100. The resulting value is the total amount of CPU time in microseconds
|
||||
that a container can use every 100ms. A container cannot use more than its share of
|
||||
CPU time during this interval.
|
||||
If a container exceeds its memory request and the node that it runs on becomes short of
|
||||
memory overall, it is likely that the Pod the container belongs to will be
|
||||
{{< glossary_tooltip text="evicted" term_id="eviction" >}}.
|
||||
|
||||
{{< note >}}
|
||||
The default quota period is 100ms. The minimum resolution of CPU quota is 1ms.
|
||||
{{</ note >}}
|
||||
A container might or might not be allowed to exceed its CPU limit for extended periods of time.
|
||||
However, container runtimes don't terminate Pods or containers for excessive CPU usage.
|
||||
|
||||
- The `spec.containers[].resources.limits.memory` is converted to an integer, and
|
||||
used as the value of the
|
||||
[`--memory`](https://docs.docker.com/engine/reference/run/#/user-memory-constraints)
|
||||
flag in the `docker run` command.
|
||||
|
||||
If a Container exceeds its memory limit, it might be terminated. If it is
|
||||
restartable, the kubelet will restart it, as with any other type of runtime
|
||||
failure.
|
||||
|
||||
If a Container exceeds its memory request, it is likely that its Pod will
|
||||
be evicted whenever the node runs out of memory.
|
||||
|
||||
A Container might or might not be allowed to exceed its CPU limit for extended
|
||||
periods of time. However, it will not be killed for excessive CPU usage.
|
||||
|
||||
To determine whether a Container cannot be scheduled or is being killed due to
|
||||
resource limits, see the
|
||||
[Troubleshooting](#troubleshooting) section.
|
||||
To determine whether a container cannot be scheduled or is being killed due to resource limits,
|
||||
see the [Troubleshooting](#troubleshooting) section.
|
||||
|
||||
### Monitoring compute & memory resource usage
|
||||
|
||||
The resource usage of a Pod is reported as part of the Pod status.
|
||||
The kubelet reports the resource usage of a Pod as part of the Pod
|
||||
[`status`](/docs/concepts/overview/working-with-objects/kubernetes-objects/#object-spec-and-status).
|
||||
|
||||
If optional [tools for monitoring](/docs/tasks/debug-application-cluster/resource-usage-monitoring/)
|
||||
are available in your cluster, then Pod resource usage can be retrieved either
|
||||
@@ -309,21 +325,26 @@ than as local ephemeral storage.
|
||||
|
||||
### Setting requests and limits for local ephemeral storage
|
||||
|
||||
You can use _ephemeral-storage_ for managing local ephemeral storage. Each Container of a Pod can specify one or more of the following:
|
||||
You can specify `ephemeral-storage` for managing local ephemeral storage. Each
|
||||
container of a Pod can specify either or both of the following:
|
||||
|
||||
* `spec.containers[].resources.limits.ephemeral-storage`
|
||||
* `spec.containers[].resources.requests.ephemeral-storage`
|
||||
|
||||
Limits and requests for `ephemeral-storage` are measured in bytes. You can express storage as
|
||||
a plain integer or as a fixed-point number using one of these suffixes:
|
||||
Limits and requests for `ephemeral-storage` are measured in byte quantities.
|
||||
You can express storage as a plain integer or as a fixed-point number using one of these suffixes:
|
||||
E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi,
|
||||
Mi, Ki. For example, the following represent roughly the same value:
|
||||
Mi, Ki. For example, the following quantities all represent roughly the same value:
|
||||
|
||||
```shell
|
||||
128974848, 129e6, 129M, 123Mi
|
||||
```
|
||||
- `128974848`
|
||||
- `129e6`
|
||||
- `129M`
|
||||
- `123Mi`
|
||||
|
||||
In the following example, the Pod has two Containers. Each Container has a request of 2GiB of local ephemeral storage. Each Container has a limit of 4GiB of local ephemeral storage. Therefore, the Pod has a request of 4GiB of local ephemeral storage, and a limit of 8GiB of local ephemeral storage.
|
||||
In the following example, the Pod has two containers. Each container has a request of
|
||||
2GiB of local ephemeral storage. Each container has a limit of 4GiB of local ephemeral
|
||||
storage. Therefore, the Pod has a request of 4GiB of local ephemeral storage, and
|
||||
a limit of 8GiB of local ephemeral storage.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
@@ -360,9 +381,11 @@ spec:
|
||||
### How Pods with ephemeral-storage requests are scheduled
|
||||
|
||||
When you create a Pod, the Kubernetes scheduler selects a node for the Pod to
|
||||
run on. Each node has a maximum amount of local ephemeral storage it can provide for Pods. For more information, see [Node Allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).
|
||||
run on. Each node has a maximum amount of local ephemeral storage it can provide for Pods.
|
||||
For more information, see
|
||||
[Node Allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable).
|
||||
|
||||
The scheduler ensures that the sum of the resource requests of the scheduled Containers is less than the capacity of the node.
|
||||
The scheduler ensures that the sum of the resource requests of the scheduled containers is less than the capacity of the node.
|
||||
|
||||
### Ephemeral storage consumption management {#resource-emphemeralstorage-consumption}
|
||||
|
||||
@@ -376,7 +399,7 @@ kubelet measures storage use in:
|
||||
If a Pod is using more ephemeral storage than you allow it to, the kubelet
|
||||
sets an eviction signal that triggers Pod eviction.
|
||||
|
||||
For container-level isolation, if a Container's writable layer and log
|
||||
For container-level isolation, if a container's writable layer and log
|
||||
usage exceeds its storage limit, the kubelet marks the Pod for eviction.
|
||||
|
||||
For pod-level isolation the kubelet works out an overall Pod storage limit by
|
||||
@@ -493,15 +516,19 @@ Plugin](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/)
|
||||
for how to advertise device plugin managed resources on each node.
|
||||
|
||||
##### Other resources
|
||||
|
||||
To advertise a new node-level extended resource, the cluster operator can
|
||||
submit a `PATCH` HTTP request to the API server to specify the available
|
||||
quantity in the `status.capacity` for a node in the cluster. After this
|
||||
operation, the node's `status.capacity` will include a new resource. The
|
||||
`status.allocatable` field is updated automatically with the new resource
|
||||
asynchronously by the kubelet. Note that because the scheduler uses the node
|
||||
`status.allocatable` value when evaluating Pod fitness, there may be a short
|
||||
delay between patching the node capacity with a new resource and the first Pod
|
||||
that requests the resource to be scheduled on that node.
|
||||
asynchronously by the kubelet.
|
||||
|
||||
Because the scheduler uses the node's `status.allocatable` value when
|
||||
evaluating Pod fitness, the scheduler only takes account of the new value after
|
||||
that asynchronous update. There may be a short delay between patching the
|
||||
node capacity with a new resource and the time when the first Pod that requests
|
||||
the resource can be scheduled on that node.
|
||||
|
||||
**Example:**
|
||||
|
||||
@@ -529,7 +556,7 @@ Cluster-level extended resources are not tied to nodes. They are usually managed
|
||||
by scheduler extenders, which handle the resource consumption and resource quota.
|
||||
|
||||
You can specify the extended resources that are handled by scheduler extenders
|
||||
in [scheduler policy configuration](/docs/reference/config-api/kube-scheduler-policy-config.v1/)
|
||||
in [scheduler configuration](/docs/reference/config-api/kube-scheduler-config.v1beta3/)
|
||||
|
||||
**Example:**
|
||||
|
||||
@@ -611,27 +638,32 @@ spec:
|
||||
|
||||
## PID limiting
|
||||
|
||||
Process ID (PID) limits allow for the configuration of a kubelet to limit the number of PIDs that a given Pod can consume. See [Pid Limiting](/docs/concepts/policy/pid-limiting/) for information.
|
||||
Process ID (PID) limits allow for the configuration of a kubelet
|
||||
to limit the number of PIDs that a given Pod can consume. See
|
||||
[PID Limiting](/docs/concepts/policy/pid-limiting/) for information.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### My Pods are pending with event message failedScheduling
|
||||
### My Pods are pending with event message `FailedScheduling`
|
||||
|
||||
If the scheduler cannot find any node where a Pod can fit, the Pod remains
|
||||
unscheduled until a place can be found. An event is produced each time the
|
||||
scheduler fails to find a place for the Pod, like this:
|
||||
unscheduled until a place can be found. An
|
||||
[Event](/docs/reference/kubernetes-api/cluster-resources/event-v1/) is produced
|
||||
each time the scheduler fails to find a place for the Pod. You can use `kubectl`
|
||||
to view the events for a Pod; for example:
|
||||
|
||||
```shell
|
||||
kubectl describe pod frontend | grep -A 3 Events
|
||||
kubectl describe pod frontend | grep -A 9999999999 Events
|
||||
```
|
||||
```
|
||||
Events:
|
||||
FirstSeen LastSeen Count From Subobject PathReason Message
|
||||
36s 5s 6 {scheduler } FailedScheduling Failed for reason PodExceedsFreeCPU and possibly others
|
||||
Type Reason Age From Message
|
||||
---- ------ ---- ---- -------
|
||||
Warning FailedScheduling 23s default-scheduler 0/42 nodes available: insufficient cpu
|
||||
```
|
||||
|
||||
In the preceding example, the Pod named "frontend" fails to be scheduled due to
|
||||
insufficient CPU resource on the node. Similar error messages can also suggest
|
||||
insufficient CPU resource on any node. Similar error messages can also suggest
|
||||
failure due to insufficient memory (PodExceedsFreeMemory). In general, if a Pod
|
||||
is pending with a message of this type, there are several things to try:
|
||||
|
||||
@@ -640,6 +672,9 @@ is pending with a message of this type, there are several things to try:
|
||||
- Check that the Pod is not larger than all the nodes. For example, if all the
|
||||
nodes have a capacity of `cpu: 1`, then a Pod with a request of `cpu: 1.1` will
|
||||
never be scheduled.
|
||||
- Check for node taints. If most of your nodes are tainted, and the new Pod does
|
||||
not tolerate that taint, the scheduler only considers placements onto the
|
||||
remaining nodes that don't have that taint.
|
||||
|
||||
You can check node capacities and amounts allocated with the
|
||||
`kubectl describe nodes` command. For example:
|
||||
@@ -674,31 +709,46 @@ Allocated resources:
|
||||
680m (34%) 400m (20%) 920Mi (11%) 1070Mi (13%)
|
||||
```
|
||||
|
||||
In the preceding output, you can see that if a Pod requests more than 1120m
|
||||
CPUs or 6.23Gi of memory, it will not fit on the node.
|
||||
In the preceding output, you can see that if a Pod requests more than 1.120 CPUs,
|
||||
or more than 6.23Gi of memory, that Pod will not fit on the node.
|
||||
|
||||
By looking at the `Pods` section, you can see which Pods are taking up space on
|
||||
By looking at the “Pods” section, you can see which Pods are taking up space on
|
||||
the node.
|
||||
|
||||
The amount of resources available to Pods is less than the node capacity, because
|
||||
system daemons use a portion of the available resources. The `allocatable` field
|
||||
[NodeStatus](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#nodestatus-v1-core)
|
||||
gives the amount of resources that are available to Pods. For more information, see
|
||||
[Node Allocatable Resources](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md).
|
||||
system daemons use a portion of the available resources. Within the Kubernetes API,
|
||||
each Node has a `.status.allocatable` field
|
||||
(see [NodeStatus](/docs/reference/kubernetes-api/cluster-resources/node-v1/#NodeStatus)
|
||||
for details).
|
||||
|
||||
The [resource quota](/docs/concepts/policy/resource-quotas/) feature can be configured
|
||||
to limit the total amount of resources that can be consumed. If used in conjunction
|
||||
with namespaces, it can prevent one team from hogging all the resources.
|
||||
The `.status.allocatable` field describes the amount of resources that are available
|
||||
to Pods on that node (for example: 15 virtual CPUs and 7538 MiB of memory).
|
||||
For more information on node allocatable resources in Kubernetes, see
|
||||
[Reserve Compute Resources for System Daemons](/docs/tasks/administer-cluster/reserve-compute-resources/).
|
||||
|
||||
### My Container is terminated
|
||||
You can configure [resource quotas](/docs/concepts/policy/resource-quotas/)
|
||||
to limit the total amount of resources that a namespace can consume.
|
||||
Kubernetes enforces quotas for objects in particular namespace when there is a
|
||||
ResourceQuota in that namespace.
|
||||
For example, if you assign specific namespaces to different teams, you
|
||||
can add ResourceQuotas into those namespaces. Setting resource quotas helps to
|
||||
prevent one team from using so much of any resource that this over-use affects other teams.
|
||||
|
||||
Your Container might get terminated because it is resource-starved. To check
|
||||
whether a Container is being killed because it is hitting a resource limit, call
|
||||
You should also consider what access you grant to that namespace:
|
||||
**full** write access to a namespace allows someone with that access to remove any
|
||||
resource, include a configured ResourceQuota.
|
||||
|
||||
### My container is terminated
|
||||
|
||||
Your container might get terminated because it is resource-starved. To check
|
||||
whether a container is being killed because it is hitting a resource limit, call
|
||||
`kubectl describe pod` on the Pod of interest:
|
||||
|
||||
```shell
|
||||
kubectl describe pod simmemleak-hra99
|
||||
```
|
||||
|
||||
The output is similar to:
|
||||
```
|
||||
Name: simmemleak-hra99
|
||||
Namespace: default
|
||||
@@ -709,57 +759,48 @@ Status: Running
|
||||
Reason:
|
||||
Message:
|
||||
IP: 10.244.2.75
|
||||
Replication Controllers: simmemleak (1/1 replicas created)
|
||||
Containers:
|
||||
simmemleak:
|
||||
Image: saadali/simmemleak
|
||||
Image: saadali/simmemleak:latest
|
||||
Limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
State: Running
|
||||
Started: Tue, 07 Jul 2015 12:54:41 -0700
|
||||
Last Termination State: Terminated
|
||||
Exit Code: 1
|
||||
Started: Fri, 07 Jul 2015 12:54:30 -0700
|
||||
Finished: Fri, 07 Jul 2015 12:54:33 -0700
|
||||
Ready: False
|
||||
Restart Count: 5
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
State: Running
|
||||
Started: Tue, 07 Jul 2019 12:54:41 -0700
|
||||
Last State: Terminated
|
||||
Reason: OOMKilled
|
||||
Exit Code: 137
|
||||
Started: Fri, 07 Jul 2019 12:54:30 -0700
|
||||
Finished: Fri, 07 Jul 2019 12:54:33 -0700
|
||||
Ready: False
|
||||
Restart Count: 5
|
||||
Conditions:
|
||||
Type Status
|
||||
Ready False
|
||||
Events:
|
||||
FirstSeen LastSeen Count From SubobjectPath Reason Message
|
||||
Tue, 07 Jul 2015 12:53:51 -0700 Tue, 07 Jul 2015 12:53:51 -0700 1 {scheduler } scheduled Successfully assigned simmemleak-hra99 to kubernetes-node-tf0f
|
||||
Tue, 07 Jul 2015 12:53:51 -0700 Tue, 07 Jul 2015 12:53:51 -0700 1 {kubelet kubernetes-node-tf0f} implicitly required container POD pulled Pod container image "k8s.gcr.io/pause:0.8.0" already present on machine
|
||||
Tue, 07 Jul 2015 12:53:51 -0700 Tue, 07 Jul 2015 12:53:51 -0700 1 {kubelet kubernetes-node-tf0f} implicitly required container POD created Created with docker id 6a41280f516d
|
||||
Tue, 07 Jul 2015 12:53:51 -0700 Tue, 07 Jul 2015 12:53:51 -0700 1 {kubelet kubernetes-node-tf0f} implicitly required container POD started Started with docker id 6a41280f516d
|
||||
Tue, 07 Jul 2015 12:53:51 -0700 Tue, 07 Jul 2015 12:53:51 -0700 1 {kubelet kubernetes-node-tf0f} spec.containers{simmemleak} created Created with docker id 87348f12526a
|
||||
Type Reason Age From Message
|
||||
---- ------ ---- ---- -------
|
||||
Normal Scheduled 42s default-scheduler Successfully assigned simmemleak-hra99 to kubernetes-node-tf0f
|
||||
Normal Pulled 41s kubelet Container image "saadali/simmemleak:latest" already present on machine
|
||||
Normal Created 41s kubelet Created container simmemleak
|
||||
Normal Started 40s kubelet Started container simmemleak
|
||||
Normal Killing 32s kubelet Killing container with id ead3fb35-5cf5-44ed-9ae1-488115be66c6: Need to kill Pod
|
||||
```
|
||||
|
||||
In the preceding example, the `Restart Count: 5` indicates that the `simmemleak`
|
||||
Container in the Pod was terminated and restarted five times.
|
||||
container in the Pod was terminated and restarted five times (so far).
|
||||
The `OOMKilled` reason shows that the container tried to use more memory than its limit.
|
||||
|
||||
You can call `kubectl get pod` with the `-o go-template=...` option to fetch the status
|
||||
of previously terminated Containers:
|
||||
|
||||
```shell
|
||||
kubectl get pod -o go-template='{{range.status.containerStatuses}}{{"Container Name: "}}{{.name}}{{"\r\nLastState: "}}{{.lastState}}{{end}}' simmemleak-hra99
|
||||
```
|
||||
```
|
||||
Container Name: simmemleak
|
||||
LastState: map[terminated:map[exitCode:137 reason:OOM Killed startedAt:2015-07-07T20:58:43Z finishedAt:2015-07-07T20:58:43Z containerID:docker://0e4095bba1feccdfe7ef9fb6ebffe972b4b14285d5acdec6f0d3ae8a22fad8b2]]
|
||||
```
|
||||
|
||||
You can see that the Container was terminated because of `reason:OOM Killed`, where `OOM` stands for Out Of Memory.
|
||||
Your next step might be to check the application code for a memory leak. If you
|
||||
find that the application is behaving how you expect, consider setting a higher
|
||||
memory limit (and possibly request) for that container.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Get hands-on experience [assigning Memory resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/).
|
||||
* Get hands-on experience [assigning CPU resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/).
|
||||
* For more details about the difference between requests and limits, see
|
||||
[Resource QoS](https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md).
|
||||
* Read the [Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core) API reference
|
||||
* Read the [ResourceRequirements](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#resourcerequirements-v1-core) API reference
|
||||
* Get hands-on experience [assigning Memory resources to containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/).
|
||||
* Get hands-on experience [assigning CPU resources to containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/).
|
||||
* Read how the API reference defines a [container](/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container)
|
||||
and its [resource requirements](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources)
|
||||
* Read about [project quotas](https://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/xfs-quotas.html) in XFS
|
||||
* Read more about the [kube-scheduler Policy reference (v1)](/docs/reference/config-api/kube-scheduler-policy-config.v1/)
|
||||
* Read more about the [kube-scheduler configuration reference (v1beta3)](/docs/reference/config-api/kube-scheduler-config.v1beta3/)
|
||||
|
||||
|
||||
@@ -234,8 +234,8 @@ so the above scenario will not apply if the node is, for example, under `DiskPre
|
||||
|
||||
`Guaranteed` pods are guaranteed only when requests and limits are specified for
|
||||
all the containers and they are equal. These pods will never be evicted because
|
||||
of another pod's resource consumption. If a system daemon (such as `kubelet`,
|
||||
`docker`, and `journald`) is consuming more resources than were reserved via
|
||||
of another pod's resource consumption. If a system daemon (such as `kubelet`
|
||||
and `journald`) is consuming more resources than were reserved via
|
||||
`system-reserved` or `kube-reserved` allocations, and the node only has
|
||||
`Guaranteed` or `Burstable` pods using less resources than requests left on it,
|
||||
then the kubelet must choose to evict one of these pods to preserve node stability
|
||||
|
||||
@@ -5,8 +5,50 @@ description: >
|
||||
Concepts and resources behind networking in Kubernetes.
|
||||
---
|
||||
|
||||
## The Kubernetes network model
|
||||
|
||||
Every [`Pod`](/docs/concepts/workloads/pods/) gets its own IP address.
|
||||
This means you do not need to explicitly create links between `Pods` and you
|
||||
almost never need to deal with mapping container ports to host ports.
|
||||
This creates a clean, backwards-compatible model where `Pods` can be treated
|
||||
much like VMs or physical hosts from the perspectives of port allocation,
|
||||
naming, service discovery, [load balancing](/docs/concepts/services-networking/ingress/#load-balancing), application configuration,
|
||||
and migration.
|
||||
|
||||
Kubernetes imposes the following fundamental requirements on any networking
|
||||
implementation (barring any intentional network segmentation policies):
|
||||
|
||||
* pods on a [node](/docs/concepts/architecture/nodes/) can communicate with all pods on all nodes without NAT
|
||||
* agents on a node (e.g. system daemons, kubelet) can communicate with all
|
||||
pods on that node
|
||||
|
||||
Note: For those platforms that support `Pods` running in the host network (e.g.
|
||||
Linux):
|
||||
|
||||
* pods in the host network of a node can communicate with all pods on all
|
||||
nodes without NAT
|
||||
|
||||
This model is not only less complex overall, but it is principally compatible
|
||||
with the desire for Kubernetes to enable low-friction porting of apps from VMs
|
||||
to containers. If your job previously ran in a VM, your VM had an IP and could
|
||||
talk to other VMs in your project. This is the same basic model.
|
||||
|
||||
Kubernetes IP addresses exist at the `Pod` scope - containers within a `Pod`
|
||||
share their network namespaces - including their IP address and MAC address.
|
||||
This means that containers within a `Pod` can all reach each other's ports on
|
||||
`localhost`. This also means that containers within a `Pod` must coordinate port
|
||||
usage, but this is no different from processes in a VM. This is called the
|
||||
"IP-per-pod" model.
|
||||
|
||||
How this is implemented is a detail of the particular container runtime in use.
|
||||
|
||||
It is possible to request ports on the `Node` itself which forward to your `Pod`
|
||||
(called host ports), but this is a very niche operation. How that forwarding is
|
||||
implemented is also a detail of the container runtime. The `Pod` itself is
|
||||
blind to the existence or non-existence of host ports.
|
||||
|
||||
Kubernetes networking addresses four concerns:
|
||||
- Containers within a Pod use networking to communicate via loopback.
|
||||
- Containers within a Pod [use networking to communicate](/docs/concepts/services-networking/dns-pod-service/) via loopback.
|
||||
- Cluster networking provides communication between different Pods.
|
||||
- The Service resource lets you expose an application running in Pods to be reachable from outside your cluster.
|
||||
- You can also use Services to publish services only for consumption inside your cluster.
|
||||
- The [Service resource](/docs/concepts/services-networking/service/) lets you [expose an application running in Pods](/docs/concepts/services-networking/connect-applications-service/) to be reachable from outside your cluster.
|
||||
- You can also use Services to [publish services only for consumption inside your cluster](/docs/concepts/services-networking/service-traffic-policy/).
|
||||
|
||||
@@ -33,7 +33,7 @@ Kubernetes as a project supports and maintains [AWS](https://github.com/kubernet
|
||||
Citrix Application Delivery Controller.
|
||||
* [Contour](https://projectcontour.io/) is an [Envoy](https://www.envoyproxy.io/) based ingress controller.
|
||||
* [EnRoute](https://getenroute.io/) is an [Envoy](https://www.envoyproxy.io) based API gateway that can run as an ingress controller.
|
||||
* [Easegress IngressController](https://github.com/megaease/easegress/blob/main/doc/ingresscontroller.md) is an [Easegress](https://megaease.com/easegress/) based API gateway that can run as an ingress controller.
|
||||
* [Easegress IngressController](https://github.com/megaease/easegress/blob/main/doc/reference/ingresscontroller.md) is an [Easegress](https://megaease.com/easegress/) based API gateway that can run as an ingress controller.
|
||||
* F5 BIG-IP [Container Ingress Services for Kubernetes](https://clouddocs.f5.com/containers/latest/userguide/kubernetes/)
|
||||
lets you use an Ingress to configure F5 BIG-IP virtual servers.
|
||||
* [Gloo](https://gloo.solo.io) is an open-source ingress controller based on [Envoy](https://www.envoyproxy.io),
|
||||
|
||||
@@ -80,7 +80,7 @@ The name of an Ingress object must be a valid
|
||||
For general information about working with config files, see [deploying applications](/docs/tasks/run-application/run-stateless-application-deployment/), [configuring containers](/docs/tasks/configure-pod-container/configure-pod-configmap/), [managing resources](/docs/concepts/cluster-administration/manage-deployment/).
|
||||
Ingress frequently uses annotations to configure some options depending on the Ingress controller, an example of which
|
||||
is the [rewrite-target annotation](https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/rewrite/README.md).
|
||||
Different [Ingress controller](/docs/concepts/services-networking/ingress-controllers) support different annotations. Review the documentation for
|
||||
Different [Ingress controllers](/docs/concepts/services-networking/ingress-controllers) support different annotations. Review the documentation for
|
||||
your choice of Ingress controller to learn which annotations are supported.
|
||||
|
||||
The Ingress [spec](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
|
||||
|
||||
@@ -10,7 +10,7 @@ weight: 50
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4), then you might consider using Kubernetes NetworkPolicies for particular applications in your cluster. NetworkPolicies are an application-centric construct which allow you to specify how a {{< glossary_tooltip text="pod" term_id="pod">}} is allowed to communicate with various network "entities" (we use the word "entity" here to avoid overloading the more common terms such as "endpoints" and "services", which have specific Kubernetes connotations) over the network.
|
||||
If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4), then you might consider using Kubernetes NetworkPolicies for particular applications in your cluster. NetworkPolicies are an application-centric construct which allow you to specify how a {{< glossary_tooltip text="pod" term_id="pod">}} is allowed to communicate with various network "entities" (we use the word "entity" here to avoid overloading the more common terms such as "endpoints" and "services", which have specific Kubernetes connotations) over the network. NetworkPolicies apply to a connection with a pod on one or both ends, and are not relevant to other connections.
|
||||
|
||||
The entities that a Pod can communicate with are identified through a combination of the following 3 identifiers:
|
||||
|
||||
@@ -27,15 +27,17 @@ Meanwhile, when IP based NetworkPolicies are created, we define policies based o
|
||||
|
||||
Network policies are implemented by the [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/). To use network policies, you must be using a networking solution which supports NetworkPolicy. Creating a NetworkPolicy resource without a controller that implements it will have no effect.
|
||||
|
||||
## Isolated and Non-isolated Pods
|
||||
## The Two Sorts of Pod Isolation
|
||||
|
||||
By default, pods are non-isolated; they accept traffic from any source.
|
||||
There are two sorts of isolation for a pod: isolation for egress, and isolation for ingress. They concern what connections may be established. "Isolation" here is not absolute, rather it means "some restrictions apply". The alternative, "non-isolated for $direction", means that no restrictions apply in the stated direction. The two sorts of isolation (or not) are declared independently, and are both relevant for a connection from one pod to another.
|
||||
|
||||
Pods become isolated by having a NetworkPolicy that selects them. Once there is any NetworkPolicy in a namespace selecting a particular pod, that pod will reject any connections that are not allowed by any NetworkPolicy. (Other pods in the namespace that are not selected by any NetworkPolicy will continue to accept all traffic.)
|
||||
By default, a pod is non-isolated for egress; all outbound connections are allowed. A pod is isolated for egress if there is any NetworkPolicy that both selects the pod and has "Egress" in its `policyTypes`; we say that such a policy applies to the pod for egress. When a pod is isolated for egress, the only allowed connections from the pod are those allowed by the `egress` list of some NetworkPolicy that applies to the pod for egress. The effects of those `egress` lists combine additively.
|
||||
|
||||
Network policies do not conflict; they are additive. If any policy or policies select a pod, the pod is restricted to what is allowed by the union of those policies' ingress/egress rules. Thus, order of evaluation does not affect the policy result.
|
||||
By default, a pod is non-isolated for ingress; all inbound connections are allowed. A pod is isolated for ingress if there is any NetworkPolicy that both selects the pod and has "Ingress" in its `policyTypes`; we say that such a policy applies to the pod for ingress. When a pod is isolated for ingress, the only allowed connections into the pod are those from the pod's node and those allowed by the `ingress` list of some NetworkPolicy that applies to the pod for ingress. The effects of those `ingress` lists combine additively.
|
||||
|
||||
For a network flow between two pods to be allowed, both the egress policy on the source pod and the ingress policy on the destination pod need to allow the traffic. If either the egress policy on the source, or the ingress policy on the destination denies the traffic, the traffic will be denied.
|
||||
Network policies do not conflict; they are additive. If any policy or policies apply to a given pod for a given direction, the connections allowed in that direction from that pod is the union of what the applicable policies allow. Thus, order of evaluation does not affect the policy result.
|
||||
|
||||
For a connection from a source pod to a destination pod to be allowed, both the egress policy on the source pod and the ingress policy on the destination pod need to allow the connection. If either side does not allow the connection, it will not happen.
|
||||
|
||||
## The NetworkPolicy resource {#networkpolicy-resource}
|
||||
|
||||
@@ -176,18 +178,20 @@ in that namespace.
|
||||
|
||||
### Default deny all ingress traffic
|
||||
|
||||
You can create a "default" isolation policy for a namespace by creating a NetworkPolicy that selects all pods but does not allow any ingress traffic to those pods.
|
||||
You can create a "default" ingress isolation policy for a namespace by creating a NetworkPolicy that selects all pods but does not allow any ingress traffic to those pods.
|
||||
|
||||
{{< codenew file="service/networking/network-policy-default-deny-ingress.yaml" >}}
|
||||
|
||||
This ensures that even pods that aren't selected by any other NetworkPolicy will still be isolated. This policy does not change the default egress isolation behavior.
|
||||
This ensures that even pods that aren't selected by any other NetworkPolicy will still be isolated for ingress. This policy does not affect isolation for egress from any pod.
|
||||
|
||||
### Default allow all ingress traffic
|
||||
### Allow all ingress traffic
|
||||
|
||||
If you want to allow all traffic to all pods in a namespace (even if policies are added that cause some pods to be treated as "isolated"), you can create a policy that explicitly allows all traffic in that namespace.
|
||||
If you want to allow all incoming connections to all pods in a namespace, you can create a policy that explicitly allows that.
|
||||
|
||||
{{< codenew file="service/networking/network-policy-allow-all-ingress.yaml" >}}
|
||||
|
||||
With this policy in place, no additional policy or policies can cause any incoming connection to those pods to be denied. This policy has no effect on isolation for egress from any pod.
|
||||
|
||||
### Default deny all egress traffic
|
||||
|
||||
You can create a "default" egress isolation policy for a namespace by creating a NetworkPolicy that selects all pods but does not allow any egress traffic from those pods.
|
||||
@@ -195,14 +199,16 @@ You can create a "default" egress isolation policy for a namespace by creating a
|
||||
{{< codenew file="service/networking/network-policy-default-deny-egress.yaml" >}}
|
||||
|
||||
This ensures that even pods that aren't selected by any other NetworkPolicy will not be allowed egress traffic. This policy does not
|
||||
change the default ingress isolation behavior.
|
||||
change the ingress isolation behavior of any pod.
|
||||
|
||||
### Default allow all egress traffic
|
||||
### Allow all egress traffic
|
||||
|
||||
If you want to allow all traffic from all pods in a namespace (even if policies are added that cause some pods to be treated as "isolated"), you can create a policy that explicitly allows all egress traffic in that namespace.
|
||||
If you want to allow all connections from all pods in a namespace, you can create a policy that explicitly allows all outgoing connections from pods in that namespace.
|
||||
|
||||
{{< codenew file="service/networking/network-policy-allow-all-egress.yaml" >}}
|
||||
|
||||
With this policy in place, no additional policy or policies can cause any outgoing connection from those pods to be denied. This policy has no effect on isolation for ingress to any pod.
|
||||
|
||||
### Default deny all ingress and all egress traffic
|
||||
|
||||
You can create a "default" policy for a namespace which prevents all ingress AND egress traffic by creating the following NetworkPolicy in that namespace.
|
||||
|
||||
@@ -254,6 +254,16 @@ To request a larger volume for a PVC, edit the PVC object and specify a larger
|
||||
size. This triggers expansion of the volume that backs the underlying PersistentVolume. A
|
||||
new PersistentVolume is never created to satisfy the claim. Instead, an existing volume is resized.
|
||||
|
||||
{{< warning >}}
|
||||
Directly editing the size of a PersistentVolume can prevent an automatic resize of that volume.
|
||||
If you edit the capacity of a PersistentVolume, and then edit the `.spec` of a matching
|
||||
PersistentVolumeClaim to make the size of the PersistentVolumeClaim match the PersistentVolume,
|
||||
then no storage resize happens.
|
||||
The Kubernetes control plane will see that the desired state of both resources matches,
|
||||
conclude that the backing volume size has been manually
|
||||
increased and that no resize is necessary.
|
||||
{{< /warning >}}
|
||||
|
||||
#### CSI Volume expansion
|
||||
|
||||
{{< feature-state for_k8s_version="v1.16" state="beta" >}}
|
||||
|
||||
@@ -39,6 +39,10 @@ request a particular class. Administrators set the name and other parameters
|
||||
of a class when first creating VolumeSnapshotClass objects, and the objects cannot
|
||||
be updated once they are created.
|
||||
|
||||
{{< note >}}
|
||||
Installation of the CRDs is the responsibility of the Kubernetes distribution. Without the required CRDs present, the creation of a VolumeSnapshotClass fails.
|
||||
{{< /note >}}
|
||||
|
||||
```yaml
|
||||
apiVersion: snapshot.storage.k8s.io/v1
|
||||
kind: VolumeSnapshotClass
|
||||
|
||||
@@ -110,15 +110,13 @@ membership in the Kubernetes organization.
|
||||
|
||||
## Serve as a SIG Co-chair
|
||||
|
||||
SIG Docs [approvers](/docs/contribute/participate/roles-and-responsibilities/#approvers)
|
||||
SIG Docs [members](/docs/contribute/participate/roles-and-responsibilities/#members)
|
||||
can serve a term as a co-chair of SIG Docs.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Approvers must meet the following requirements to be a co-chair:
|
||||
A Kubernetes member must meet the following requirements to be a co-chair:
|
||||
|
||||
- Have been a SIG Docs approver for at least 6 months
|
||||
- Have [led a Kubernetes docs release](/docs/contribute/advanced/#coordinate-docs-for-a-kubernetes-release) or shadowed two releases
|
||||
- Understand SIG Docs workflows and tooling: git, Hugo, localization, blog subproject
|
||||
- Understand how other Kubernetes SIGs and repositories affect the SIG Docs
|
||||
workflow, including:
|
||||
@@ -126,6 +124,8 @@ Approvers must meet the following requirements to be a co-chair:
|
||||
[process in k/community](https://github.com/kubernetes/community/tree/master/sig-docs),
|
||||
plugins in [k/test-infra](https://github.com/kubernetes/test-infra/), and the role of
|
||||
[SIG Architecture](https://github.com/kubernetes/community/tree/master/sig-architecture).
|
||||
In addition, understand how the [Kubernetes docs release process](/docs/contribute/advanced/#coordinate-docs-for-a-kubernetes-release) works.
|
||||
- Approved by the SIG Docs community either directly or via lazy consensus.
|
||||
- Commit at least 5 hours per week (and often more) to the role for a minimum of 6 months
|
||||
|
||||
### Responsibilities
|
||||
|
||||
@@ -85,7 +85,11 @@ class third,fourth white
|
||||
- Reading the PR description to understand the changes made, and read any linked issues
|
||||
- Reading any comments by other reviewers
|
||||
- Clicking the **Files changed** tab to see the files and lines changed
|
||||
- Previewing the changes in the Netlify preview build by scrolling to the PR's build check section at the bottom of the **Conversation** tab and clicking the **deploy/netlify** line's **Details** link.
|
||||
- Previewing the changes in the Netlify preview build by scrolling to the PR's build check section at the bottom of the **Conversation** tab.
|
||||
Here's a screenshot (this shows GitHub's desktop site; if you're reviewing
|
||||
on a tablet or smartphone device, the GitHub web UI is slightly different):
|
||||
{{< figure src="/images/docs/github_netlify_deploy_preview.png" alt="GitHub pull request details including link to Netlify preview" >}}
|
||||
To open the preview, click on the **Details** link of the **deploy/netlify** line in the list of checks.
|
||||
|
||||
4. Go to the **Files changed** tab to start your review.
|
||||
1. Click on the `+` symbol beside the line you want to comment on.
|
||||
|
||||
@@ -0,0 +1,671 @@
|
||||
---
|
||||
title: Diagram Guide
|
||||
linktitle: Diagram guide
|
||||
content_type: concept
|
||||
weight: 15
|
||||
---
|
||||
|
||||
<!--Overview-->
|
||||
|
||||
This guide shows you how to create, edit and share diagrams using the Mermaid Javascript library. Mermaid.js allows you to generate diagrams using a simple markdown-like syntax inside Markdown files. You can also use Mermaid to generate `.svg` or `.png` image files that you can add to your documentation.
|
||||
|
||||
The target audience for this guide is anybody wishing to learn about Mermaid and/or how to create and add diagrams to Kubernetes documentation.
|
||||
|
||||
Figure 1 outlines the topics covered in this section.
|
||||
|
||||
{{< mermaid >}}
|
||||
flowchart LR
|
||||
subgraph m[Mermaid.js]
|
||||
direction TB
|
||||
S[ ]-.-
|
||||
C[build<br>diagrams<br>with markdown] -->
|
||||
D[on-line<br>live editor]
|
||||
end
|
||||
A[Why are diagrams<br>useful?] --> m
|
||||
m --> N[3 x methods<br>for creating<br>diagrams]
|
||||
N --> T[Examples]
|
||||
T --> X[Styling<br>and<br>captions]
|
||||
X --> V[Tips]
|
||||
|
||||
|
||||
|
||||
classDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;
|
||||
classDef spacewhite fill:#ffffff,stroke:#fff,stroke-width:0px,color:#000
|
||||
class A,C,D,N,X,m,T,V box
|
||||
class S spacewhite
|
||||
|
||||
%% you can hyperlink Mermaid diagram nodes to a URL using click statements
|
||||
|
||||
click A "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
click C "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
click D "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
click N "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
click T "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
click X "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
click V "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggbVtNZXJtYWlkLmpzXVxuICAgIGRpcmVjdGlvbiBUQlxuICAgICAgICBTWyBdLS4tXG4gICAgICAgIENbYnVpbGQ8YnI-ZGlhZ3JhbXM8YnI-d2l0aCBtYXJrZG93bl0gLS0-XG4gICAgICAgIERbb24tbGluZTxicj5saXZlIGVkaXRvcl1cbiAgICBlbmRcbiAgICBBW1doeSBhcmUgZGlhZ3JhbXM8YnI-dXNlZnVsP10gLS0-IG1cbiAgICBtIC0tPiBOWzMgeCBtZXRob2RzPGJyPmZvciBjcmVhdGluZzxicj5kaWFncmFtc11cbiAgICBOIC0tPiBUW0V4YW1wbGVzXVxuICAgIFQgLS0-IFhbU3R5bGluZzxicj5hbmQ8YnI-Y2FwdGlvbnNdXG4gICAgWCAtLT4gVltUaXBzXVxuICAgIFxuIFxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIHNwYWNld2hpdGUgZmlsbDojZmZmZmZmLHN0cm9rZTojZmZmLHN0cm9rZS13aWR0aDowcHgsY29sb3I6IzAwMFxuICAgIGNsYXNzIEEsQyxELE4sWCxtLFQsViBib3hcbiAgICBjbGFzcyBTIHNwYWNld2hpdGUiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOnRydWV9" _blank
|
||||
|
||||
{{< /mermaid >}}
|
||||
|
||||
Figure 1. Topics covered in this section.
|
||||
|
||||
All you need to begin working with Mermaid is the following:
|
||||
|
||||
* Basic understanding of markdown.
|
||||
* Using the Mermaid live editor.
|
||||
* Using [Hugo shortcodes](/docs/contribute/style/hugo-shortcodes/).
|
||||
* Using the [Hugo {{</* figure */>}} shortcode](https://gohugo.io/content-management/shortcodes/#figure).
|
||||
* Performing [Hugo local previews](https://kubernetes.io/docs/contribute/new-content/open-a-pr/#preview-locally).
|
||||
* Familiar with the [Contributing new content](/docs/contribute/new-content/) process.
|
||||
|
||||
{{< note >}}
|
||||
You can click on each diagram in this section to view the code and rendered diagram in the Mermaid live editor.
|
||||
{{< /note >}}
|
||||
|
||||
<!--body-->
|
||||
|
||||
## Why you should use diagrams in documentation
|
||||
|
||||
Diagrams improve documentation clarity and comprehension. There are advantages for both the user and the contributor.
|
||||
|
||||
The user benefits include:
|
||||
|
||||
* __Friendly landing spot__. A detailed text-only greeting page could intimidate users, in particular, first-time Kubernetes users.
|
||||
* __Faster grasp of concepts__. A diagram can help users understand the key points of a complex topic. Your diagram can serve as a visual learning guide to dive into the topic details.
|
||||
* __Better retention__. For some, it is easier to recall pictures rather than text.
|
||||
|
||||
The contributor benefits include:
|
||||
|
||||
* __Assist in developing the structure and content__ of your contribution. For example, you can start with a simple diagram covering the high-level points and then dive into details.
|
||||
* __Expand and grow the user community__. Easily consumed documentation augmented with diagrams attracts new users who might previously have been reluctant to engage due to perceived complexities.
|
||||
|
||||
You should consider your target audience. In addition to experienced K8s users, you will have many who are new to Kubernetes. Even a simple diagram can assist new users in absorbing Kubernetes concepts. They become emboldened and more confident to further explore Kubernetes and the documentation.
|
||||
|
||||
|
||||
## Mermaid
|
||||
|
||||
[Mermaid](https://mermaid-js.github.io/mermaid/#/) is an open source JavaScript library that allows you to create, edit and easily share diagrams using a simple, markdown-like syntax configured inline in Markdown files.
|
||||
|
||||
The following lists features of Mermaid:
|
||||
|
||||
* Simple code syntax.
|
||||
* Includes a web-based tool allowing you to code and preview your diagrams.
|
||||
* Supports multiple formats including flowchart, state and sequence.
|
||||
* Easy collaboration with colleagues by sharing a per-diagram URL.
|
||||
* Broad selection of shapes, lines, themes and styling.
|
||||
|
||||
|
||||
The following lists advantages of using Mermaid:
|
||||
|
||||
* No need for separate, non-Mermaid diagram tools.
|
||||
* Adheres to existing PR workflow. You can think of Mermaid code as just Markdown text included in your PR.
|
||||
* Simple tool builds simple diagrams. You don't want to get bogged down (re)crafting an overly complex and detailed picture. Keep it simple!
|
||||
|
||||
Mermaid provides a simple, open and transparent method for the SIG communities to add, edit and collaborate on diagrams for new or existing documentation.
|
||||
|
||||
{{< note >}}
|
||||
You can still use Mermaid to create/edit diagrams even if it's not supported in your environment. This method is called __Mermaid+SVG__ and is explained below.
|
||||
{{< /note >}}
|
||||
|
||||
### Live editor
|
||||
|
||||
The [Mermaid live editor](https://mermaid-js.github.io/mermaid-live-editor) is a web-based tool that enables you to create, edit and review diagrams.
|
||||
|
||||
The following lists live editor functions:
|
||||
|
||||
* Displays Mermaid code and rendered diagram.
|
||||
* Generates a URL for each saved diagram. The URL is displayed in the URL field of your browser. You can share the URL with colleagues who can access and modify the diagram.
|
||||
* Option to download `.svg` or `.png` files.
|
||||
|
||||
|
||||
{{< note >}}
|
||||
The live editor is the easiest and fastest way to create and edit Mermaid diagrams.
|
||||
{{< /note >}}
|
||||
|
||||
|
||||
## Methods for creating diagrams
|
||||
|
||||
Figure 2 outlines the three methods to generate and add diagrams.
|
||||
|
||||
{{< mermaid >}}
|
||||
graph TB
|
||||
A[Contributor]
|
||||
B[Inline<br><br>Mermaid code<br>added to .md file]
|
||||
C[Mermaid+SVG<br><br>Add mermaid-generated<br>svg file to .md file]
|
||||
D[External tool<br><br>Add external-tool-<br>generated svg file<br>to .md file]
|
||||
|
||||
A --> B
|
||||
A --> C
|
||||
A --> D
|
||||
|
||||
classDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;
|
||||
class A,B,C,D box
|
||||
|
||||
%% you can hyperlink Mermaid diagram nodes to a URL using click statements
|
||||
|
||||
click A "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBBW0NvbnRyaWJ1dG9yXVxuICAgIEJbSW5saW5lPGJyPjxicj5NZXJtYWlkIGNvZGU8YnI-YWRkZWQgdG8gLm1kIGZpbGVdXG4gICAgQ1tNZXJtYWlkK1NWRzxicj48YnI-QWRkIG1lcm1haWQtZ2VuZXJhdGVkPGJyPnN2ZyBmaWxlIHRvIC5tZCBmaWxlXVxuICAgIERbRXh0ZXJuYWwgdG9vbDxicj48YnI-QWRkIGV4dGVybmFsLXRvb2wtPGJyPmdlbmVyYXRlZCBzdmcgZmlsZTxicj50byAubWQgZmlsZV1cblxuICAgIEEgLS0-IEJcbiAgICBBIC0tPiBDXG4gICAgQSAtLT4gRFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3giLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
click B "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBBW0NvbnRyaWJ1dG9yXVxuICAgIEJbSW5saW5lPGJyPjxicj5NZXJtYWlkIGNvZGU8YnI-YWRkZWQgdG8gLm1kIGZpbGVdXG4gICAgQ1tNZXJtYWlkK1NWRzxicj48YnI-QWRkIG1lcm1haWQtZ2VuZXJhdGVkPGJyPnN2ZyBmaWxlIHRvIC5tZCBmaWxlXVxuICAgIERbRXh0ZXJuYWwgdG9vbDxicj48YnI-QWRkIGV4dGVybmFsLXRvb2wtPGJyPmdlbmVyYXRlZCBzdmcgZmlsZTxicj50byAubWQgZmlsZV1cblxuICAgIEEgLS0-IEJcbiAgICBBIC0tPiBDXG4gICAgQSAtLT4gRFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3giLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
click C "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBBW0NvbnRyaWJ1dG9yXVxuICAgIEJbSW5saW5lPGJyPjxicj5NZXJtYWlkIGNvZGU8YnI-YWRkZWQgdG8gLm1kIGZpbGVdXG4gICAgQ1tNZXJtYWlkK1NWRzxicj48YnI-QWRkIG1lcm1haWQtZ2VuZXJhdGVkPGJyPnN2ZyBmaWxlIHRvIC5tZCBmaWxlXVxuICAgIERbRXh0ZXJuYWwgdG9vbDxicj48YnI-QWRkIGV4dGVybmFsLXRvb2wtPGJyPmdlbmVyYXRlZCBzdmcgZmlsZTxicj50byAubWQgZmlsZV1cblxuICAgIEEgLS0-IEJcbiAgICBBIC0tPiBDXG4gICAgQSAtLT4gRFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3giLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
click D "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBBW0NvbnRyaWJ1dG9yXVxuICAgIEJbSW5saW5lPGJyPjxicj5NZXJtYWlkIGNvZGU8YnI-YWRkZWQgdG8gLm1kIGZpbGVdXG4gICAgQ1tNZXJtYWlkK1NWRzxicj48YnI-QWRkIG1lcm1haWQtZ2VuZXJhdGVkPGJyPnN2ZyBmaWxlIHRvIC5tZCBmaWxlXVxuICAgIERbRXh0ZXJuYWwgdG9vbDxicj48YnI-QWRkIGV4dGVybmFsLXRvb2wtPGJyPmdlbmVyYXRlZCBzdmcgZmlsZTxicj50byAubWQgZmlsZV1cblxuICAgIEEgLS0-IEJcbiAgICBBIC0tPiBDXG4gICAgQSAtLT4gRFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3giLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
{{< /mermaid >}}
|
||||
|
||||
Figure 2. Methods to create diagrams.
|
||||
|
||||
|
||||
### Inline
|
||||
|
||||
Figure 3 outlines the steps to follow for adding a diagram using the Inline method.
|
||||
|
||||
{{< mermaid >}}
|
||||
graph LR
|
||||
A[1. Use live editor<br> to create/edit<br>diagram] -->
|
||||
B[2. Store diagram<br>URL somewhere] -->
|
||||
C[3. Copy Mermaid code<br>to page markdown file] -->
|
||||
D[4. Add caption]
|
||||
|
||||
|
||||
classDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;
|
||||
class A,B,C,D box
|
||||
|
||||
%% you can hyperlink Mermaid diagram nodes to a URL using click statements
|
||||
|
||||
click A "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBBWzEuIFVzZSBsaXZlIGVkaXRvcjxicj4gdG8gY3JlYXRlL2VkaXQ8YnI-ZGlhZ3JhbV0gLS0-XG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdIC0tPlxuICAgIENbMy4gQ29weSBNZXJtYWlkIGNvZGU8YnI-dG8gcGFnZSBtYXJrZG93biBmaWxlXSAtLT5cbiAgICBEWzQuIEFkZCBjYXB0aW9uXVxuIFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
click B "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBBWzEuIFVzZSBsaXZlIGVkaXRvcjxicj4gdG8gY3JlYXRlL2VkaXQ8YnI-ZGlhZ3JhbV0gLS0-XG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdIC0tPlxuICAgIENbMy4gQ29weSBNZXJtYWlkIGNvZGU8YnI-dG8gcGFnZSBtYXJrZG93biBmaWxlXSAtLT5cbiAgICBEWzQuIEFkZCBjYXB0aW9uXVxuIFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
click C "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBBWzEuIFVzZSBsaXZlIGVkaXRvcjxicj4gdG8gY3JlYXRlL2VkaXQ8YnI-ZGlhZ3JhbV0gLS0-XG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdIC0tPlxuICAgIENbMy4gQ29weSBNZXJtYWlkIGNvZGU8YnI-dG8gcGFnZSBtYXJrZG93biBmaWxlXSAtLT5cbiAgICBEWzQuIEFkZCBjYXB0aW9uXVxuIFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
click D "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggTFJcbiAgICBBWzEuIFVzZSBsaXZlIGVkaXRvcjxicj4gdG8gY3JlYXRlL2VkaXQ8YnI-ZGlhZ3JhbV0gLS0-XG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdIC0tPlxuICAgIENbMy4gQ29weSBNZXJtYWlkIGNvZGU8YnI-dG8gcGFnZSBtYXJrZG93biBmaWxlXSAtLT5cbiAgICBEWzQuIEFkZCBjYXB0aW9uXVxuIFxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMsRCBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ" _blank
|
||||
|
||||
|
||||
|
||||
|
||||
{{< /mermaid >}}
|
||||
|
||||
Figure 3. Inline Method steps.
|
||||
|
||||
|
||||
The following lists the steps you should follow for adding a diagram using the Inline method:
|
||||
|
||||
1. Create your diagram using the live editor.
|
||||
2. Store the diagram URL somewhere for later access.
|
||||
3. Copy the mermaid code to the location in your `.md` file where you want the diagram to appear.
|
||||
4. Add a caption below the diagram using Markdown text.
|
||||
|
||||
A Hugo build runs the Mermaid code and turns it into a diagram.
|
||||
{{< note >}}
|
||||
You may find keeping track of diagram URLs is cumbersome. If so, make a note in the `.md` file that the Mermaid code is self-documenting. Contributors can copy the Mermaid code to and from the live editor for diagram edits.
|
||||
{{< /note >}}
|
||||
|
||||
Here is a sample code snippet contained in an `.md` file:
|
||||
|
||||
```
|
||||
---
|
||||
title: My PR
|
||||
---
|
||||
Figure 17 shows a simple A to B process.
|
||||
some markdown text
|
||||
...
|
||||
{{</* mermaid */>}}
|
||||
graph TB
|
||||
A --> B
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
Figure 17. A to B
|
||||
more text
|
||||
```
|
||||
{{< note >}}
|
||||
You must include the `{{</* mermaid */>}}`, `{{</* /mermaid */>}}` shortcode tags at the start and end of the Mermaid code block. You should add a diagram caption below the diagram.
|
||||
{{< /note >}}
|
||||
|
||||
For more details on diagram captions, see [How to use captions](#how-to-use-captions).
|
||||
|
||||
The following lists advantages of the Inline method:
|
||||
|
||||
* Live editor tool.
|
||||
* Easy to copy Mermaid code to and from the live editor and your `.md` file.
|
||||
* No need for separate `.svg` image file handling.
|
||||
* Content text, diagram code and diagram caption contained in the same `.md` file.
|
||||
|
||||
You should use the [local](https://kubernetes.io/docs/contribute/new-content/open-a-pr/#preview-locally) and Netlify previews to verify the diagram is properly rendered.
|
||||
|
||||
{{< caution >}}
|
||||
The Mermaid live editor feature set may not support the K8s/website Mermaid feature set. You might see a syntax error or a blank screen after the Hugo build. If that is the case, consider using the Mermaid+SVG method.
|
||||
{{< /caution >}}
|
||||
|
||||
### Mermaid+SVG
|
||||
|
||||
Figure 4 outlines the steps to follow for adding a diagram using the Mermaid+SVG method.
|
||||
|
||||
{{< mermaid >}}
|
||||
flowchart LR
|
||||
A[1. Use live editor<br> to create/edit<br>diagram]
|
||||
B[2. Store diagram<br>URL somewhere]
|
||||
C[3. Generate .svg file<br>and download to<br>images/ folder]
|
||||
subgraph w[ ]
|
||||
direction TB
|
||||
D[4. Use figure shortcode<br>to reference .svg<br>file in page<br>.md file] -->
|
||||
E[5. Add caption]
|
||||
end
|
||||
A --> B
|
||||
B --> C
|
||||
C --> w
|
||||
|
||||
classDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;
|
||||
class A,B,C,D,E,w box
|
||||
|
||||
click A "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgbGl2ZSBlZGl0b3I8YnI-IHRvIGNyZWF0ZS9lZGl0PGJyPmRpYWdyYW1dXG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdXG4gICAgQ1szLiBHZW5lcmF0ZSAuc3ZnIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSAuc3ZnPGJyPmZpbGUgaW4gcGFnZTxicj4ubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbkEgLS0-IEJcbkIgLS0-IENcbkMgLS0-IHdcblxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzIEEsQixDLEQsRSx3IGJveFxuICAgICIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click B "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgbGl2ZSBlZGl0b3I8YnI-IHRvIGNyZWF0ZS9lZGl0PGJyPmRpYWdyYW1dXG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdXG4gICAgQ1szLiBHZW5lcmF0ZSAuc3ZnIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSAuc3ZnPGJyPmZpbGUgaW4gcGFnZTxicj4ubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbkEgLS0-IEJcbkIgLS0-IENcbkMgLS0-IHdcblxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzIEEsQixDLEQsRSx3IGJveFxuICAgICIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click C "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgbGl2ZSBlZGl0b3I8YnI-IHRvIGNyZWF0ZS9lZGl0PGJyPmRpYWdyYW1dXG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdXG4gICAgQ1szLiBHZW5lcmF0ZSAuc3ZnIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSAuc3ZnPGJyPmZpbGUgaW4gcGFnZTxicj4ubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbkEgLS0-IEJcbkIgLS0-IENcbkMgLS0-IHdcblxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzIEEsQixDLEQsRSx3IGJveFxuICAgICIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click D "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgbGl2ZSBlZGl0b3I8YnI-IHRvIGNyZWF0ZS9lZGl0PGJyPmRpYWdyYW1dXG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdXG4gICAgQ1szLiBHZW5lcmF0ZSAuc3ZnIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSAuc3ZnPGJyPmZpbGUgaW4gcGFnZTxicj4ubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbkEgLS0-IEJcbkIgLS0-IENcbkMgLS0-IHdcblxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzIEEsQixDLEQsRSx3IGJveFxuICAgICIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click E "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgbGl2ZSBlZGl0b3I8YnI-IHRvIGNyZWF0ZS9lZGl0PGJyPmRpYWdyYW1dXG4gICAgQlsyLiBTdG9yZSBkaWFncmFtPGJyPlVSTCBzb21ld2hlcmVdXG4gICAgQ1szLiBHZW5lcmF0ZSAuc3ZnIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSAuc3ZnPGJyPmZpbGUgaW4gcGFnZTxicj4ubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbkEgLS0-IEJcbkIgLS0-IENcbkMgLS0-IHdcblxuICAgIGNsYXNzRGVmIGJveCBmaWxsOiNmZmYsc3Ryb2tlOiMwMDAsc3Ryb2tlLXdpZHRoOjFweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzIEEsQixDLEQsRSx3IGJveFxuICAgICIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
|
||||
|
||||
{{< /mermaid >}}
|
||||
|
||||
Figure 4. Mermaid+SVG method steps.
|
||||
|
||||
The following lists the steps you should follow for adding a diagram using the Mermaid+SVG method:
|
||||
|
||||
1. Create your diagram using the live editor.
|
||||
2. Store the diagram URL somewhere for later access.
|
||||
3. Generate an `.svg` image file for the diagram and download it to the appropriate `images/` folder.
|
||||
4. Use the `{{</* figure */>}}` shortcode to reference the diagram in the `.md` file.
|
||||
5. Add a caption using the `{{</* figure */>}}` shortcode's `caption` parameter.
|
||||
|
||||
For example, use the live editor to create a diagram called `boxnet`. Store the diagram URL somewhere for later access. Generate and download a `boxnet.svg` file to the appropriate `../images/` folder.
|
||||
|
||||
Use the `{{</* figure */>}}` shortcode in your PR's `.md` file to reference the `.svg` image file and add a caption.
|
||||
```json
|
||||
{{</* figure src="/static/images/boxnet.svg" alt="Boxnet figure" class="diagram-large" caption="Figure 14. Boxnet caption" */>}}
|
||||
```
|
||||
|
||||
For more details on diagram captions, see [How to use captions](#how-to-use-captions).
|
||||
|
||||
{{< note >}}
|
||||
The `{{</* figure */>}}` shortcode is the preferred method for adding `.svg` image files to your documentation. You can also use the standard markdown image syntax like so: ``. And you will need to add a caption below the diagram.
|
||||
{{< /note >}}
|
||||
|
||||
You should add the live editor URL as a comment block in the `.svg` image file using a text editor. For example, you would include the following at the beginning of the `.svg` image file:
|
||||
|
||||
```
|
||||
<!-- To view or edit the mermaid code, use the following URL: -->
|
||||
<!-- https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb ... <remainder of the URL> -->
|
||||
```
|
||||
|
||||
The following lists advantages of the Mermaid+SVG method:
|
||||
|
||||
* Live editor tool.
|
||||
* Live editor tool supports the most current Mermaid feature set.
|
||||
* Employ existing K8s/website methods for handling `.svg` image files.
|
||||
* Environment doesn't require Mermaid support.
|
||||
|
||||
Be sure to check that your diagram renders properly using the [local](https://kubernetes.io/docs/contribute/new-content/open-a-pr/#preview-locally) and Netlify previews.
|
||||
|
||||
### External tool
|
||||
|
||||
Figure 5 outlines the steps to follow for adding a diagram using the External Tool method.
|
||||
|
||||
First, use your external tool to create the diagram and save it as an `.svg` or `.png` image file. After that, use the same steps as the __Mermaid+SVG__ method for adding `.svg` image files.
|
||||
|
||||
{{< mermaid >}}
|
||||
flowchart LR
|
||||
A[1. Use external<br>tool to create/edit<br>diagram]
|
||||
B[2. If possible, save<br>diagram coordinates<br>for contributor<br>access]
|
||||
C[3. Generate .svg <br>or.png file<br>and download to<br>appropriate<br>images/ folder]
|
||||
subgraph w[ ]
|
||||
direction TB
|
||||
D[4. Use figure shortcode<br>to reference svg or<br>png file in<br>page .md file] -->
|
||||
E[5. Add caption]
|
||||
end
|
||||
A --> B
|
||||
B --> C
|
||||
C --> w
|
||||
classDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;
|
||||
class A,B,C,D,E,w box
|
||||
|
||||
click A "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgZXh0ZXJuYWw8YnI-dG9vbCB0byBjcmVhdGUvZWRpdDxicj5kaWFncmFtXVxuICAgIEJbMi4gSWYgcG9zc2libGUsIHNhdmU8YnI-ZGlhZ3JhbSBjb29yZGluYXRlczxicj5mb3IgY29udHJpYnV0b3I8YnI-YWNjZXNzXVxuICAgIENbMy4gR2VuZXJhdGUgLnN2ZyA8YnI-b3IucG5nIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmFwcHJvcHJpYXRlPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSBzdmcgb3I8YnI-cG5nIGZpbGUgaW48YnI-cGFnZSAubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbiAgICBBIC0tPiBCXG4gICAgQiAtLT4gQ1xuICAgIEMgLS0-IHdcbiAgICBjbGFzc0RlZiBib3ggZmlsbDojZmZmLHN0cm9rZTojMDAwLHN0cm9rZS13aWR0aDoxcHgsY29sb3I6IzAwMDtcbiAgICBjbGFzcyBBLEIsQyxELEUsdyBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ"
|
||||
|
||||
click B "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgZXh0ZXJuYWw8YnI-dG9vbCB0byBjcmVhdGUvZWRpdDxicj5kaWFncmFtXVxuICAgIEJbMi4gSWYgcG9zc2libGUsIHNhdmU8YnI-ZGlhZ3JhbSBjb29yZGluYXRlczxicj5mb3IgY29udHJpYnV0b3I8YnI-YWNjZXNzXVxuICAgIENbMy4gR2VuZXJhdGUgLnN2ZyA8YnI-b3IucG5nIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmFwcHJvcHJpYXRlPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSBzdmcgb3I8YnI-cG5nIGZpbGUgaW48YnI-cGFnZSAubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbiAgICBBIC0tPiBCXG4gICAgQiAtLT4gQ1xuICAgIEMgLS0-IHdcbiAgICBjbGFzc0RlZiBib3ggZmlsbDojZmZmLHN0cm9rZTojMDAwLHN0cm9rZS13aWR0aDoxcHgsY29sb3I6IzAwMDtcbiAgICBjbGFzcyBBLEIsQyxELEUsdyBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ"
|
||||
|
||||
click C "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgZXh0ZXJuYWw8YnI-dG9vbCB0byBjcmVhdGUvZWRpdDxicj5kaWFncmFtXVxuICAgIEJbMi4gSWYgcG9zc2libGUsIHNhdmU8YnI-ZGlhZ3JhbSBjb29yZGluYXRlczxicj5mb3IgY29udHJpYnV0b3I8YnI-YWNjZXNzXVxuICAgIENbMy4gR2VuZXJhdGUgLnN2ZyA8YnI-b3IucG5nIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmFwcHJvcHJpYXRlPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSBzdmcgb3I8YnI-cG5nIGZpbGUgaW48YnI-cGFnZSAubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbiAgICBBIC0tPiBCXG4gICAgQiAtLT4gQ1xuICAgIEMgLS0-IHdcbiAgICBjbGFzc0RlZiBib3ggZmlsbDojZmZmLHN0cm9rZTojMDAwLHN0cm9rZS13aWR0aDoxcHgsY29sb3I6IzAwMDtcbiAgICBjbGFzcyBBLEIsQyxELEUsdyBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ"
|
||||
|
||||
click D "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgZXh0ZXJuYWw8YnI-dG9vbCB0byBjcmVhdGUvZWRpdDxicj5kaWFncmFtXVxuICAgIEJbMi4gSWYgcG9zc2libGUsIHNhdmU8YnI-ZGlhZ3JhbSBjb29yZGluYXRlczxicj5mb3IgY29udHJpYnV0b3I8YnI-YWNjZXNzXVxuICAgIENbMy4gR2VuZXJhdGUgLnN2ZyA8YnI-b3IucG5nIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmFwcHJvcHJpYXRlPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSBzdmcgb3I8YnI-cG5nIGZpbGUgaW48YnI-cGFnZSAubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbiAgICBBIC0tPiBCXG4gICAgQiAtLT4gQ1xuICAgIEMgLS0-IHdcbiAgICBjbGFzc0RlZiBib3ggZmlsbDojZmZmLHN0cm9rZTojMDAwLHN0cm9rZS13aWR0aDoxcHgsY29sb3I6IzAwMDtcbiAgICBjbGFzcyBBLEIsQyxELEUsdyBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ"
|
||||
|
||||
click E "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgQVsxLiBVc2UgZXh0ZXJuYWw8YnI-dG9vbCB0byBjcmVhdGUvZWRpdDxicj5kaWFncmFtXVxuICAgIEJbMi4gSWYgcG9zc2libGUsIHNhdmU8YnI-ZGlhZ3JhbSBjb29yZGluYXRlczxicj5mb3IgY29udHJpYnV0b3I8YnI-YWNjZXNzXVxuICAgIENbMy4gR2VuZXJhdGUgLnN2ZyA8YnI-b3IucG5nIGZpbGU8YnI-YW5kIGRvd25sb2FkIHRvPGJyPmFwcHJvcHJpYXRlPGJyPmltYWdlcy8gZm9sZGVyXVxuICAgIHN1YmdyYXBoIHdbIF1cbiAgICBkaXJlY3Rpb24gVEJcbiAgICBEWzQuIFVzZSBmaWd1cmUgc2hvcnRjb2RlPGJyPnRvIHJlZmVyZW5jZSBzdmcgb3I8YnI-cG5nIGZpbGUgaW48YnI-cGFnZSAubWQgZmlsZV0gLS0-XG4gICAgRVs1LiBBZGQgY2FwdGlvbl1cbiAgICBlbmRcbiAgICBBIC0tPiBCXG4gICAgQiAtLT4gQ1xuICAgIEMgLS0-IHdcbiAgICBjbGFzc0RlZiBib3ggZmlsbDojZmZmLHN0cm9rZTojMDAwLHN0cm9rZS13aWR0aDoxcHgsY29sb3I6IzAwMDtcbiAgICBjbGFzcyBBLEIsQyxELEUsdyBib3hcbiAgICAiLCJtZXJtYWlkIjoie1xuICBcInRoZW1lXCI6IFwiZGVmYXVsdFwiXG59IiwidXBkYXRlRWRpdG9yIjpmYWxzZSwiYXV0b1N5bmMiOnRydWUsInVwZGF0ZURpYWdyYW0iOmZhbHNlfQ"
|
||||
|
||||
{{< /mermaid >}}
|
||||
|
||||
Figure 5. External Tool method steps
|
||||
|
||||
|
||||
The following lists the steps you should follow for adding a diagram using the External Tool method:
|
||||
|
||||
1. Use your external tool to create a diagram.
|
||||
2. Save the diagram coordinates for contributor access. For example, your tool may offer a link to the diagram image, or you could place the source code file, such as an `.xml` file, in a public repository for later contributor access.
|
||||
3. Generate and save the diagram as an `.svg` or `.png` image file. Download this file to the appropriate `../images/` folder.
|
||||
4. Use the `{{</* figure */>}}` shortcode to reference the diagram in the `.md` file.
|
||||
5. Add a caption using the `{{</* figure */>}}` shortcode's `caption` parameter.
|
||||
|
||||
Here is the `{{</* figure */>}}` shortcode for the `images/apple.svg` diagram:
|
||||
```text
|
||||
{{</* figure src="/static/images/apple.svg" alt="red-apple-figure" class="diagram-large" caption="Figure 9. A Big Red Apple" */>}}
|
||||
```
|
||||
|
||||
If your external drawing tool permits:
|
||||
|
||||
* You can incorporate multiple `.svg` or `.png` logos, icons and images into your diagram. However, make sure you observe copyright and follow the Kubernetes documentation
|
||||
[guidelines](/docs/contribute/style/content-guide/) on the use of third party content.
|
||||
* You should save the diagram source coordinates for later contributor access. For example, your tool may offer a link to the diagram image, or you could place the source code file, such as an `.xml` file, somewhere for contributor access.
|
||||
|
||||
For more information on K8s and CNCF logos and images, check out [CNCF Artwork](https://github.com/cncf/artwork).
|
||||
|
||||
The following lists advantages of the External Tool method:
|
||||
|
||||
* Contributor familiarity with external tool.
|
||||
* Diagrams require more detail than what Mermaid can offer.
|
||||
|
||||
Don't forget to check that your diagram renders correctly using the [local](https://kubernetes.io/docs/contribute/new-content/open-a-pr/#preview-locally) and Netlify previews.
|
||||
|
||||
## Examples
|
||||
|
||||
This section shows several examples of Mermaid diagrams.
|
||||
|
||||
{{< note >}}
|
||||
The code block examples omit the Hugo `{{</* mermaid */>}}`, `{{</* /mermaid */>}}` shortcode tags. This allows you to copy the code block into the live editor to experiment on your own. Note that the live editor doesn't recognize Hugo shortcodes.
|
||||
{{< /note >}}
|
||||
|
||||
### Example 1 - Pod topology spread constraints
|
||||
|
||||
Figure 6 shows the diagram appearing in the [Pod Topology Spread Constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#node-labels) page.
|
||||
|
||||
{{< mermaid >}}
|
||||
graph TB
|
||||
subgraph "zoneB"
|
||||
n3(Node3)
|
||||
n4(Node4)
|
||||
end
|
||||
subgraph "zoneA"
|
||||
n1(Node1)
|
||||
n2(Node2)
|
||||
end
|
||||
|
||||
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
|
||||
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
|
||||
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
|
||||
class n1,n2,n3,n4 k8s;
|
||||
class zoneA,zoneB cluster;
|
||||
|
||||
click n3 "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBzdWJncmFwaCBcInpvbmVCXCJcbiAgICAgICAgbjMoTm9kZTMpXG4gICAgICAgIG40KE5vZGU0KVxuICAgIGVuZFxuICAgIHN1YmdyYXBoIFwiem9uZUFcIlxuICAgICAgICBuMShOb2RlMSlcbiAgICAgICAgbjIoTm9kZTIpXG4gICAgZW5kXG5cbiAgICBjbGFzc0RlZiBwbGFpbiBmaWxsOiNkZGQsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICAgIGNsYXNzRGVmIGNsdXN0ZXIgZmlsbDojZmZmLHN0cm9rZTojYmJiLHN0cm9rZS13aWR0aDoycHgsY29sb3I6IzMyNmNlNTtcbiAgICBjbGFzcyBuMSxuMixuMyxuNCBrOHM7XG4gICAgY2xhc3Mgem9uZUEsem9uZUIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click n4 "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBzdWJncmFwaCBcInpvbmVCXCJcbiAgICAgICAgbjMoTm9kZTMpXG4gICAgICAgIG40KE5vZGU0KVxuICAgIGVuZFxuICAgIHN1YmdyYXBoIFwiem9uZUFcIlxuICAgICAgICBuMShOb2RlMSlcbiAgICAgICAgbjIoTm9kZTIpXG4gICAgZW5kXG5cbiAgICBjbGFzc0RlZiBwbGFpbiBmaWxsOiNkZGQsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICAgIGNsYXNzRGVmIGNsdXN0ZXIgZmlsbDojZmZmLHN0cm9rZTojYmJiLHN0cm9rZS13aWR0aDoycHgsY29sb3I6IzMyNmNlNTtcbiAgICBjbGFzcyBuMSxuMixuMyxuNCBrOHM7XG4gICAgY2xhc3Mgem9uZUEsem9uZUIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click n1 "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBzdWJncmFwaCBcInpvbmVCXCJcbiAgICAgICAgbjMoTm9kZTMpXG4gICAgICAgIG40KE5vZGU0KVxuICAgIGVuZFxuICAgIHN1YmdyYXBoIFwiem9uZUFcIlxuICAgICAgICBuMShOb2RlMSlcbiAgICAgICAgbjIoTm9kZTIpXG4gICAgZW5kXG5cbiAgICBjbGFzc0RlZiBwbGFpbiBmaWxsOiNkZGQsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICAgIGNsYXNzRGVmIGNsdXN0ZXIgZmlsbDojZmZmLHN0cm9rZTojYmJiLHN0cm9rZS13aWR0aDoycHgsY29sb3I6IzMyNmNlNTtcbiAgICBjbGFzcyBuMSxuMixuMyxuNCBrOHM7XG4gICAgY2xhc3Mgem9uZUEsem9uZUIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
click n2 "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggVEJcbiAgICBzdWJncmFwaCBcInpvbmVCXCJcbiAgICAgICAgbjMoTm9kZTMpXG4gICAgICAgIG40KE5vZGU0KVxuICAgIGVuZFxuICAgIHN1YmdyYXBoIFwiem9uZUFcIlxuICAgICAgICBuMShOb2RlMSlcbiAgICAgICAgbjIoTm9kZTIpXG4gICAgZW5kXG5cbiAgICBjbGFzc0RlZiBwbGFpbiBmaWxsOiNkZGQsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojMDAwO1xuICAgIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICAgIGNsYXNzRGVmIGNsdXN0ZXIgZmlsbDojZmZmLHN0cm9rZTojYmJiLHN0cm9rZS13aWR0aDoycHgsY29sb3I6IzMyNmNlNTtcbiAgICBjbGFzcyBuMSxuMixuMyxuNCBrOHM7XG4gICAgY2xhc3Mgem9uZUEsem9uZUIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0" _blank
|
||||
|
||||
{{< /mermaid >}}
|
||||
|
||||
Figure 6. Pod Topology Spread Constraints.
|
||||
|
||||
Code block:
|
||||
```
|
||||
graph TB
|
||||
subgraph "zoneB"
|
||||
n3(Node3)
|
||||
n4(Node4)
|
||||
end
|
||||
subgraph "zoneA"
|
||||
n1(Node1)
|
||||
n2(Node2)
|
||||
end
|
||||
|
||||
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
|
||||
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
|
||||
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
|
||||
class n1,n2,n3,n4 k8s;
|
||||
class zoneA,zoneB cluster;
|
||||
```
|
||||
|
||||
### Example 2 - Ingress
|
||||
|
||||
Figure 7 shows the diagram appearing in the [What is Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/#what-is-ingress) page.
|
||||
|
||||
{{< mermaid >}}
|
||||
graph LR;
|
||||
client([client])-. Ingress-managed <br> load balancer .->ingress[Ingress];
|
||||
ingress-->|routing rule|service[Service];
|
||||
subgraph cluster
|
||||
ingress;
|
||||
service-->pod1[Pod];
|
||||
service-->pod2[Pod];
|
||||
end
|
||||
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
|
||||
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
|
||||
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
|
||||
class ingress,service,pod1,pod2 k8s;
|
||||
class client plain;
|
||||
class cluster cluster;
|
||||
|
||||
click client "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9" _blank
|
||||
|
||||
click ingress "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9" _blank
|
||||
|
||||
click service "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9" _blank
|
||||
|
||||
click pod1 "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9" _blank
|
||||
|
||||
click pod2 "https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6ZmFsc2V9" _blank
|
||||
|
||||
|
||||
|
||||
{{< /mermaid >}}
|
||||
Figure 7. Ingress
|
||||
|
||||
Code block:
|
||||
|
||||
```mermaid
|
||||
graph LR;
|
||||
client([client])-. Ingress-managed <br> load balancer .->ingress[Ingress];
|
||||
ingress-->|routing rule|service[Service];
|
||||
subgraph cluster
|
||||
ingress;
|
||||
service-->pod1[Pod];
|
||||
service-->pod2[Pod];
|
||||
end
|
||||
classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
|
||||
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
|
||||
classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
|
||||
class ingress,service,pod1,pod2 k8s;
|
||||
class client plain;
|
||||
class cluster cluster;
|
||||
```
|
||||
|
||||
### Example 3 - K8s system flow
|
||||
|
||||
Figure 8 depicts a Mermaid sequence diagram showing the system flow between K8s components to start a container.
|
||||
|
||||
{{< figure src="/docs/images/diagram-guide-example-3.svg" alt="K8s system flow diagram" class="diagram-large" caption="Figure 8. K8s system flow diagram" link="https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiJSV7aW5pdDp7XCJ0aGVtZVwiOlwibmV1dHJhbFwifX0lJVxuc2VxdWVuY2VEaWFncmFtXG4gICAgYWN0b3IgbWVcbiAgICBwYXJ0aWNpcGFudCBhcGlTcnYgYXMgY29udHJvbCBwbGFuZTxicj48YnI-YXBpLXNlcnZlclxuICAgIHBhcnRpY2lwYW50IGV0Y2QgYXMgY29udHJvbCBwbGFuZTxicj48YnI-ZXRjZCBkYXRhc3RvcmVcbiAgICBwYXJ0aWNpcGFudCBjbnRybE1nciBhcyBjb250cm9sIHBsYW5lPGJyPjxicj5jb250cm9sbGVyPGJyPm1hbmFnZXJcbiAgICBwYXJ0aWNpcGFudCBzY2hlZCBhcyBjb250cm9sIHBsYW5lPGJyPjxicj5zY2hlZHVsZXJcbiAgICBwYXJ0aWNpcGFudCBrdWJlbGV0IGFzIG5vZGU8YnI-PGJyPmt1YmVsZXRcbiAgICBwYXJ0aWNpcGFudCBjb250YWluZXIgYXMgbm9kZTxicj48YnI-Y29udGFpbmVyPGJyPnJ1bnRpbWVcbiAgICBtZS0-PmFwaVNydjogMS4ga3ViZWN0bCBjcmVhdGUgLWYgcG9kLnlhbWxcbiAgICBhcGlTcnYtLT4-ZXRjZDogMi4gc2F2ZSBuZXcgc3RhdGVcbiAgICBjbnRybE1nci0-PmFwaVNydjogMy4gY2hlY2sgZm9yIGNoYW5nZXNcbiAgICBzY2hlZC0-PmFwaVNydjogNC4gd2F0Y2ggZm9yIHVuYXNzaWduZWQgcG9kcyhzKVxuICAgIGFwaVNydi0-PnNjaGVkOiA1LiBub3RpZnkgYWJvdXQgcG9kIHcgbm9kZW5hbWU9XCIgXCJcbiAgICBzY2hlZC0-PmFwaVNydjogNi4gYXNzaWduIHBvZCB0byBub2RlXG4gICAgYXBpU3J2LS0-PmV0Y2Q6IDcuIHNhdmUgbmV3IHN0YXRlXG4gICAga3ViZWxldC0-PmFwaVNydjogOC4gbG9vayBmb3IgbmV3bHkgYXNzaWduZWQgcG9kKHMpXG4gICAgYXBpU3J2LT4-a3ViZWxldDogOS4gYmluZCBwb2QgdG8gbm9kZVxuICAgIGt1YmVsZXQtPj5jb250YWluZXI6IDEwLiBzdGFydCBjb250YWluZXJcbiAgICBrdWJlbGV0LT4-YXBpU3J2OiAxMS4gdXBkYXRlIHBvZCBzdGF0dXNcbiAgICBhcGlTcnYtLT4-ZXRjZDogMTIuIHNhdmUgbmV3IHN0YXRlIiwibWVybWFpZCI6IntcbiAgXCJ0aGVtZVwiOiBcImRlZmF1bHRcIlxufSIsInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjp0cnVlfQ" >}}
|
||||
|
||||
|
||||
|
||||
Code block:
|
||||
```
|
||||
%%{init:{"theme":"neutral"}}%%
|
||||
sequenceDiagram
|
||||
actor me
|
||||
participant apiSrv as control plane<br><br>api-server
|
||||
participant etcd as control plane<br><br>etcd datastore
|
||||
participant cntrlMgr as control plane<br><br>controller<br>manager
|
||||
participant sched as control plane<br><br>scheduler
|
||||
participant kubelet as node<br><br>kubelet
|
||||
participant container as node<br><br>container<br>runtime
|
||||
me->>apiSrv: 1. kubectl create -f pod.yaml
|
||||
apiSrv-->>etcd: 2. save new state
|
||||
cntrlMgr->>apiSrv: 3. check for changes
|
||||
sched->>apiSrv: 4. watch for unassigned pods(s)
|
||||
apiSrv->>sched: 5. notify about pod w nodename=" "
|
||||
sched->>apiSrv: 6. assign pod to node
|
||||
apiSrv-->>etcd: 7. save new state
|
||||
kubelet->>apiSrv: 8. look for newly assigned pod(s)
|
||||
apiSrv->>kubelet: 9. bind pod to node
|
||||
kubelet->>container: 10. start container
|
||||
kubelet->>apiSrv: 11. update pod status
|
||||
apiSrv-->>etcd: 12. save new state
|
||||
```
|
||||
|
||||
## How to style diagrams
|
||||
|
||||
You can style one or more diagram elements using well-known CSS nomenclature. You accomplish this using two types of statements in the Mermaid code.
|
||||
|
||||
* `classDef` defines a class of style attributes.
|
||||
* `class` defines one or more elements to apply the class to.
|
||||
|
||||
In the code for [figure 7](https://mermaid-js.github.io/mermaid-live-editor/edit/#eyJjb2RlIjoiZ3JhcGggIExSXG4gIGNsaWVudChbY2xpZW50XSktLiBJbmdyZXNzLW1hbmFnZWQgPGJyPiBsb2FkIGJhbGFuY2VyIC4tPmluZ3Jlc3NbSW5ncmVzc107XG4gIGluZ3Jlc3MtLT58cm91dGluZyBydWxlfHNlcnZpY2VbU2VydmljZV07XG4gIHN1YmdyYXBoIGNsdXN0ZXJcbiAgaW5ncmVzcztcbiAgc2VydmljZS0tPnBvZDFbUG9kXTtcbiAgc2VydmljZS0tPnBvZDJbUG9kXTtcbiAgZW5kXG4gIGNsYXNzRGVmIHBsYWluIGZpbGw6I2RkZCxzdHJva2U6I2ZmZixzdHJva2Utd2lkdGg6NHB4LGNvbG9yOiMwMDA7XG4gIGNsYXNzRGVmIGs4cyBmaWxsOiMzMjZjZTUsc3Ryb2tlOiNmZmYsc3Ryb2tlLXdpZHRoOjRweCxjb2xvcjojZmZmO1xuICBjbGFzc0RlZiBjbHVzdGVyIGZpbGw6I2ZmZixzdHJva2U6I2JiYixzdHJva2Utd2lkdGg6MnB4LGNvbG9yOiMzMjZjZTU7XG4gIGNsYXNzIGluZ3Jlc3Msc2VydmljZSxwb2QxLHBvZDIgazhzO1xuICBjbGFzcyBjbGllbnQgcGxhaW47XG4gIGNsYXNzIGNsdXN0ZXIgY2x1c3RlcjtcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOmZhbHNlLCJhdXRvU3luYyI6dHJ1ZSwidXBkYXRlRGlhZ3JhbSI6dHJ1ZX0), you can see examples of both.
|
||||
```
|
||||
classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff; // defines style for the k8s class
|
||||
class ingress,service,pod1,pod2 k8s; // k8s class is applied to elements ingress, service, pod1 and pod2.
|
||||
```
|
||||
You can include one or multiple `classDef` and `class` statements in your diagram. You can also use the official K8s `#326ce5` hex color code for K8s components in your diagram.
|
||||
|
||||
For more information on styling and classes, see [Mermaid Styling and classes docs](https://mermaid-js.github.io/mermaid/#/flowchart?id=styling-and-classes).
|
||||
|
||||
## How to use captions
|
||||
|
||||
A caption is a brief description of a diagram. A title or a short description of the diagram are examples of captions. Captions aren't meant to replace explanatory text you have in your documentation. Rather, they serve as a "context link" between that text and your diagram.
|
||||
|
||||
The combination of some text and a diagram tied together with a caption help provide a concise representation of the information you wish to convey to the user.
|
||||
|
||||
Without captions, you are asking the user to scan the text above or below the diagram to figure out a meaning. This can be frustrating for the user.
|
||||
|
||||
Figure 9 lays out the three components for proper captioning: diagram, diagram caption and the diagram referral.
|
||||
|
||||
{{< mermaid >}}
|
||||
flowchart
|
||||
A[Diagram<br><br>Inline Mermaid or<br>SVG image files]
|
||||
B[Diagram Caption<br><br>Add Figure Number. and<br>Caption Text]
|
||||
C[Diagram Referral<br><br>Referenence Figure Number<br>in text]
|
||||
|
||||
classDef box fill:#fff,stroke:#000,stroke-width:1px,color:#000;
|
||||
class A,B,C box
|
||||
|
||||
click A "https://mermaid-js.github.io/mermaid-live-editor/edit#eyJjb2RlIjoiZmxvd2NoYXJ0XG4gICAgQVtEaWFncmFtPGJyPjxicj5JbmxpbmUgTWVybWFpZCBvcjxicj5TVkcgaW1hZ2UgZmlsZXNdXG4gICAgQltEaWFncmFtIENhcHRpb248YnI-PGJyPkFkZCBGaWd1cmUgTnVtYmVyLiBhbmQ8YnI-Q2FwdGlvbiBUZXh0XVxuICAgIENbRGlhZ3JhbSBSZWZlcnJhbDxicj48YnI-UmVmZXJlbmVuY2UgRmlndXJlIE51bWJlcjxicj5pbiB0ZXh0XVxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMgYm94IiwibWVybWFpZCI6IntcbiAgXCJ0aGVtZVwiOiBcImRlZmF1bHRcIlxufSIsInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0" _blank
|
||||
|
||||
click B "https://mermaid-js.github.io/mermaid-live-editor/edit#eyJjb2RlIjoiZmxvd2NoYXJ0XG4gICAgQVtEaWFncmFtPGJyPjxicj5JbmxpbmUgTWVybWFpZCBvcjxicj5TVkcgaW1hZ2UgZmlsZXNdXG4gICAgQltEaWFncmFtIENhcHRpb248YnI-PGJyPkFkZCBGaWd1cmUgTnVtYmVyLiBhbmQ8YnI-Q2FwdGlvbiBUZXh0XVxuICAgIENbRGlhZ3JhbSBSZWZlcnJhbDxicj48YnI-UmVmZXJlbmVuY2UgRmlndXJlIE51bWJlcjxicj5pbiB0ZXh0XVxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMgYm94IiwibWVybWFpZCI6IntcbiAgXCJ0aGVtZVwiOiBcImRlZmF1bHRcIlxufSIsInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0" _blank
|
||||
|
||||
click C "https://mermaid-js.github.io/mermaid-live-editor/edit#eyJjb2RlIjoiZmxvd2NoYXJ0XG4gICAgQVtEaWFncmFtPGJyPjxicj5JbmxpbmUgTWVybWFpZCBvcjxicj5TVkcgaW1hZ2UgZmlsZXNdXG4gICAgQltEaWFncmFtIENhcHRpb248YnI-PGJyPkFkZCBGaWd1cmUgTnVtYmVyLiBhbmQ8YnI-Q2FwdGlvbiBUZXh0XVxuICAgIENbRGlhZ3JhbSBSZWZlcnJhbDxicj48YnI-UmVmZXJlbmVuY2UgRmlndXJlIE51bWJlcjxicj5pbiB0ZXh0XVxuXG4gICAgY2xhc3NEZWYgYm94IGZpbGw6I2ZmZixzdHJva2U6IzAwMCxzdHJva2Utd2lkdGg6MXB4LGNvbG9yOiMwMDA7XG4gICAgY2xhc3MgQSxCLEMgYm94IiwibWVybWFpZCI6IntcbiAgXCJ0aGVtZVwiOiBcImRlZmF1bHRcIlxufSIsInVwZGF0ZUVkaXRvciI6ZmFsc2UsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0" _blank
|
||||
|
||||
{{< /mermaid >}}
|
||||
Figure 9. Caption Components.
|
||||
|
||||
{{< note >}}
|
||||
You should always add a caption to each diagram in your documentation.
|
||||
{{< /note >}}
|
||||
|
||||
**Diagram**
|
||||
|
||||
The `Mermaid+SVG` and `External Tool` methods generate `.svg` image files.
|
||||
|
||||
Here is the `{{</* figure */>}}` shortcode for the diagram defined in an `.svg` image file saved to `/images/docs/components-of-kubernetes.svg`:
|
||||
```text
|
||||
{{</* figure src="/images/docs/components-of-kubernetes.svg" alt="Kubernetes pod running inside a cluster" class="diagram-large" caption="Figure 4. Kubernetes Architecture Components */>}}
|
||||
```
|
||||
You should pass the `src`, `alt`, `class` and `caption` values into the `{{</* figure */>}}` shortcode. You can adjust the size of the diagram using `diagram-large`, `diagram-medium` and `diagram-small` classes.
|
||||
|
||||
{{< note >}}
|
||||
Diagrams created using the `Inline` method don't use the `{{</* figure */>}}` shortcode. The Mermaid code defines how the diagram will render on your page.
|
||||
{{< /note >}}
|
||||
|
||||
See [Methods for creating diagrams](#methods-for-creating-diagrams) for more information on the different methods for creating diagrams.
|
||||
|
||||
**Diagram Caption**
|
||||
|
||||
Next, add a diagram caption.
|
||||
|
||||
If you define your diagram in an `.svg` image file, then you should use the `{{</* figure */>}}` shortcode's `caption` parameter.
|
||||
|
||||
```text
|
||||
{{</* figure src="/images/docs/components-of-kubernetes.svg" alt="Kubernetes pod running inside a cluster" class="diagram-large" caption="Figure 4. Kubernetes Architecture Components" */>}}
|
||||
```
|
||||
If you define your diagram using inline Mermaid code, then you should use Markdown text.
|
||||
```text
|
||||
Figure 4. Kubernetes Architecture Components
|
||||
```
|
||||
|
||||
The following lists several items to consider when adding diagram captions:
|
||||
|
||||
* Use the `{{</* figure */>}}` shortcode to add a diagram caption for `Mermaid+SVG` and `External Tool` diagrams.
|
||||
* Use simple Markdown text to add a diagram caption for the `Inline` method.
|
||||
* Prepend your diagram caption with `Figure NUMBER.`. You must use `Figure` and the number must be unique for each diagram in your documentation page. Add a period after the number.
|
||||
* Add your diagram caption text after the `Figure NUMBER.` on the same line. You must puncuate the caption with a period. Keep the caption text short.
|
||||
* Position your diagram caption __BELOW__ your diagram.
|
||||
|
||||
**Diagram Referral**
|
||||
|
||||
Finally, you can add a diagram referral. This is used inside your text and should precede the diagram itself. It allows a user to connect your text with the associated diagram. The `Figure NUMBER` in your referral and caption must match.
|
||||
|
||||
You should avoid using spatial references such as `..the image below..` or `..the following figure ..`
|
||||
|
||||
Here is an example of a diagram referral:
|
||||
```text
|
||||
Figure 10 depicts the components of the Kubernetes architecture. The control plane ...
|
||||
```
|
||||
Diagram referrals are optional and there are cases where they might not be suitable. If you are not sure, add a diagram referral to your text to see if it looks and sounds okay. When in doubt, use a diagram referral.
|
||||
|
||||
**Complete picture**
|
||||
|
||||
Figure 10 shows the Kubernetes Architecture diagram that includes the diagram, diagram caption and diagram referral. The `{{</* figure */>}}` shortcode renders the diagram, adds the caption and includes the optional `link` parameter so you can hyperlink the diagram. The diagram referral is contained in this paragraph.
|
||||
|
||||
Here is the `{{</* figure */>}}` shortcode for this diagram:
|
||||
```
|
||||
{{</* figure src="/images/docs/components-of-kubernetes.svg" alt="Kubernetes pod running inside a cluster" class="diagram-large" caption="Figure 10. Kubernetes Architecture." link="https://kubernetes.io/docs/concepts/overview/components/" */>}}
|
||||
```
|
||||
|
||||
{{< figure src="/images/docs/components-of-kubernetes.svg" alt="Kubernetes pod running inside a cluster" class="diagram-large" caption="Figure 10. Kubernetes Architecture." link="https://kubernetes.io/docs/concepts/overview/components/" >}}
|
||||
|
||||
|
||||
## Tips
|
||||
|
||||
* Always use the live editor to create/edit your diagram.
|
||||
|
||||
* Always use Hugo local and Netlify previews to check out how the diagram appears in the documentation.
|
||||
|
||||
* Include diagram source pointers such as a URL, source code location, or indicate the code is self-documenting.
|
||||
|
||||
* Always use diagram captions.
|
||||
|
||||
* Very helpful to include the diagram `.svg` or `.png` image and/or Mermaid source code in issues and PRs.
|
||||
|
||||
* With the `Mermaid+SVG` and `External Tool` methods, use `.svg` image files because they stay sharp when you zoom in on the diagram.
|
||||
|
||||
* Best practice for `.svg` files is to load it into an SVG editing tool and use the
|
||||
“Convert text to paths” function. This ensures that the diagram renders the same on all systems, regardless of font availability and font rendering support.
|
||||
|
||||
* No Mermaid support for additional icons or artwork.
|
||||
|
||||
* Hugo Mermaid shortcodes don't work in the live editor.
|
||||
|
||||
* Any time you modify a diagram in the live editor, you __must save__ it to generate a new URL for the diagram.
|
||||
|
||||
* Click on the diagrams in this section to view the code and diagram rendering in the live editor.
|
||||
|
||||
* Look over the source code of this page, `diagram-guide.md`, for more examples.
|
||||
|
||||
* Check out the [Mermaid docs](https://mermaid-js.github.io/mermaid/#/) for explanations and examples.
|
||||
|
||||
Most important, __Keep Diagrams Simple__. This will save time for you and fellow contributors, and allow for easier reading by new and experienced users.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 35 KiB |
@@ -73,14 +73,16 @@ configure kubernetes components or tools. Most of these APIs are not exposed
|
||||
by the API server in a RESTful way though they are essential for a user or an
|
||||
operator to use or manage a cluster.
|
||||
|
||||
* [kube-apiserver configuration (v1beta1)](/docs/reference/config-api/apiserver-config.v1beta1/)
|
||||
* [kubelet configuration (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/)
|
||||
* [kube-scheduler configuration (v1beta2)](/docs/reference/config-api/kube-scheduler-config.v1beta2/)
|
||||
* [kube-scheduler configuration (v1beta3)](/docs/reference/config-api/kube-scheduler-config.v1beta3/)
|
||||
* [kube-scheduler policy reference (v1)](/docs/reference/config-api/kube-scheduler-policy-config.v1/)
|
||||
|
||||
* [kube-apiserver configuration (v1)](/docs/reference/config-api/apiserver-config.v1/)
|
||||
* [kubelet configuration (v1alpha1)](/docs/reference/config-api/kubelet-config.v1alpha1/) and
|
||||
[kubelet configuration (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/)
|
||||
* [kube-scheduler configuration (v1beta2)](/docs/reference/config-api/kube-scheduler-config.v1beta2/) and
|
||||
[kube-scheduler configuration (v1beta3)](/docs/reference/config-api/kube-scheduler-config.v1beta3/)
|
||||
* [kube-proxy configuration (v1alpha1)](/docs/reference/config-api/kube-proxy-config.v1alpha1/)
|
||||
* [`audit.k8s.io/v1` API](/docs/reference/config-api/apiserver-audit.v1/)
|
||||
* [Client authentication API (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/)
|
||||
* [Client authentication API (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/) and
|
||||
[Client authentication API (v1)](/docs/reference/config-api/client-authentication.v1/)
|
||||
* [WebhookAdmission configuration (v1)](/docs/reference/config-api/apiserver-webhookadmission.v1/)
|
||||
|
||||
## Config API for kubeadm
|
||||
|
||||
@@ -1232,3 +1232,5 @@ The following `ExecCredential` manifest describes a cluster information sample.
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Read the [client authentication reference (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/)
|
||||
* Read the [client authentication reference (v1)](/docs/reference/config-api/client-authentication.v1/)
|
||||
|
||||
|
||||
@@ -65,7 +65,10 @@ different Kubernetes components.
|
||||
| `ControllerManagerLeaderMigration` | `false` | Alpha | 1.21 | |
|
||||
| `CPUManager` | `false` | Alpha | 1.8 | 1.9 |
|
||||
| `CPUManager` | `true` | Beta | 1.10 | |
|
||||
| `CPUManagerPolicyOptions` | `false` | Alpha | 1.22 | |
|
||||
| `CPUManagerPolicyAlphaOptions` | `false` | Alpha | 1.23 | |
|
||||
| `CPUManagerPolicyBetaOptions` | `true` | Beta | 1.23 | |
|
||||
| `CPUManagerPolicyOptions` | `false` | Alpha | 1.22 | 1.22 |
|
||||
| `CPUManagerPolicyOptions` | `true` | Beta | 1.23 | |
|
||||
| `CSIInlineVolume` | `false` | Alpha | 1.15 | 1.15 |
|
||||
| `CSIInlineVolume` | `true` | Beta | 1.16 | - |
|
||||
| `CSIMigration` | `false` | Alpha | 1.14 | 1.16 |
|
||||
@@ -90,8 +93,6 @@ different Kubernetes components.
|
||||
| `CSIStorageCapacity` | `true` | Beta | 1.21 | |
|
||||
| `CSIVolumeHealth` | `false` | Alpha | 1.21 | |
|
||||
| `CSRDuration` | `true` | Beta | 1.22 | |
|
||||
| `ConfigurableFSGroupPolicy` | `false` | Alpha | 1.18 | 1.19 |
|
||||
| `ConfigurableFSGroupPolicy` | `true` | Beta | 1.20 | |
|
||||
| `ControllerManagerLeaderMigration` | `false` | Alpha | 1.21 | 1.21 |
|
||||
| `ControllerManagerLeaderMigration` | `true` | Beta | 1.22 | |
|
||||
| `CustomCPUCFSQuotaPeriod` | `false` | Alpha | 1.12 | |
|
||||
@@ -100,12 +101,14 @@ different Kubernetes components.
|
||||
| `DaemonSetUpdateSurge` | `true` | Beta | 1.22 | |
|
||||
| `DefaultPodTopologySpread` | `false` | Alpha | 1.19 | 1.19 |
|
||||
| `DefaultPodTopologySpread` | `true` | Beta | 1.20 | |
|
||||
| `DelegateFSGroupToCSIDriver` | `false` | Alpha | 1.22 | |
|
||||
| `DelegateFSGroupToCSIDriver` | `false` | Alpha | 1.22 | 1.22 |
|
||||
| `DelegateFSGroupToCSIDriver` | `true` | Beta | 1.23 | |
|
||||
| `DevicePlugins` | `false` | Alpha | 1.8 | 1.9 |
|
||||
| `DevicePlugins` | `true` | Beta | 1.10 | |
|
||||
| `DisableAcceleratorUsageMetrics` | `false` | Alpha | 1.19 | 1.19 |
|
||||
| `DisableAcceleratorUsageMetrics` | `true` | Beta | 1.20 | |
|
||||
| `DisableCloudProviders` | `false` | Alpha | 1.22 | |
|
||||
| `DisableKubeletCloudCredentialProviders` | `false` | Alpha | 1.23 | |
|
||||
| `DownwardAPIHugePages` | `false` | Alpha | 1.20 | 1.20 |
|
||||
| `DownwardAPIHugePages` | `false` | Beta | 1.21 | |
|
||||
| `EfficientWatchResumption` | `false` | Alpha | 1.20 | 1.20 |
|
||||
@@ -124,7 +127,9 @@ different Kubernetes components.
|
||||
| `ExperimentalHostUserNamespaceDefaulting` | `false` | Beta | 1.5 | |
|
||||
| `GracefulNodeShutdown` | `false` | Alpha | 1.20 | 1.20 |
|
||||
| `GracefulNodeShutdown` | `true` | Beta | 1.21 | |
|
||||
| `GracefulNodeShutdownBasedOnPodPriority` | `false` | Alpha | 1.23 | |
|
||||
| `GRPCContainerProbe` | `false` | Alpha | 1.23 | |
|
||||
| `HonorPVReclaimPolicy` | `false` | Alpha | 1.23 | |
|
||||
| `HPAContainerMetrics` | `false` | Alpha | 1.20 | |
|
||||
| `HPAScaleToZero` | `false` | Alpha | 1.16 | |
|
||||
| `IdentifyPodOS` | `false` | Alpha | 1.23 | |
|
||||
@@ -135,6 +140,8 @@ different Kubernetes components.
|
||||
| `InTreePluginAzureFileUnregister` | `false` | Alpha | 1.21 | |
|
||||
| `InTreePluginGCEUnregister` | `false` | Alpha | 1.21 | |
|
||||
| `InTreePluginOpenStackUnregister` | `false` | Alpha | 1.21 | |
|
||||
| `InTreePluginPortworxUnregister` | `false` | Alpha | 1.23 | |
|
||||
| `InTreePluginRBDUnregister` | `false` | Alpha | 1.23 | |
|
||||
| `InTreePluginvSphereUnregister` | `false` | Alpha | 1.21 | |
|
||||
| `JobMutableNodeSchedulingDirectives` | `true` | Beta | 1.23 | |
|
||||
| `JobReadyPods` | `false` | Alpha | 1.23 | |
|
||||
@@ -142,7 +149,10 @@ different Kubernetes components.
|
||||
| `JobTrackingWithFinalizers` | `true` | Beta | 1.23 | |
|
||||
| `KubeletCredentialProviders` | `false` | Alpha | 1.20 | |
|
||||
| `KubeletInUserNamespace` | `false` | Alpha | 1.22 | |
|
||||
| `KubeletPodResourcesGetAllocatable` | `false` | Alpha | 1.21 | |
|
||||
| `KubeletPodResources` | `false` | Alpha | 1.13 | 1.14 |
|
||||
| `KubeletPodResources` | `true` | Beta | 1.15 | |
|
||||
| `KubeletPodResourcesGetAllocatable` | `false` | Alpha | 1.21 | 1.22 |
|
||||
| `KubeletPodResourcesGetAllocatable` | `false` | Beta | 1.23 | |
|
||||
| `LocalStorageCapacityIsolation` | `false` | Alpha | 1.7 | 1.9 |
|
||||
| `LocalStorageCapacityIsolation` | `true` | Beta | 1.10 | |
|
||||
| `LocalStorageCapacityIsolationFSQuotaMonitoring` | `false` | Alpha | 1.15 | |
|
||||
@@ -157,10 +167,13 @@ different Kubernetes components.
|
||||
| `NodeSwap` | `false` | Alpha | 1.22 | |
|
||||
| `NonPreemptingPriority` | `false` | Alpha | 1.15 | 1.18 |
|
||||
| `NonPreemptingPriority` | `true` | Beta | 1.19 | |
|
||||
| `PodDeletionCost` | `false` | Alpha | 1.21 | 1.21 |
|
||||
| `PodDeletionCost` | `true` | Beta | 1.22 | |
|
||||
| `OpenAPIEnum` | `false` | Alpha | 1.23 | |
|
||||
| `OpenAPIv3` | `false` | Alpha | 1.23 | |
|
||||
| `PodAndContainerStatsFromCRI` | `false` | Alpha | 1.23 | |
|
||||
| `PodAffinityNamespaceSelector` | `false` | Alpha | 1.21 | 1.21 |
|
||||
| `PodAffinityNamespaceSelector` | `true` | Beta | 1.22 | |
|
||||
| `PodDeletionCost` | `false` | Alpha | 1.21 | 1.21 |
|
||||
| `PodDeletionCost` | `true` | Beta | 1.22 | |
|
||||
| `PodOverhead` | `false` | Alpha | 1.16 | 1.17 |
|
||||
| `PodOverhead` | `true` | Beta | 1.18 | |
|
||||
| `PodSecurity` | `false` | Alpha | 1.22 | 1.22 |
|
||||
@@ -189,6 +202,7 @@ different Kubernetes components.
|
||||
| `ServiceLoadBalancerClass` | `true` | Beta | 1.22 | |
|
||||
| `SizeMemoryBackedVolumes` | `false` | Alpha | 1.20 | 1.21 |
|
||||
| `SizeMemoryBackedVolumes` | `true` | Beta | 1.22 | |
|
||||
| `StatefulSetAutoDeletePVC` | `false` | Alpha | 1.22 | |
|
||||
| `StatefulSetMinReadySeconds` | `false` | Alpha | 1.22 | 1.22 |
|
||||
| `StatefulSetMinReadySeconds` | `true` | Beta | 1.23 | |
|
||||
| `StorageVersionAPI` | `false` | Alpha | 1.20 | |
|
||||
@@ -197,13 +211,14 @@ different Kubernetes components.
|
||||
| `SuspendJob` | `false` | Alpha | 1.21 | 1.21 |
|
||||
| `SuspendJob` | `true` | Beta | 1.22 | |
|
||||
| `TopologyAwareHints` | `false` | Alpha | 1.21 | 1.22 |
|
||||
| `TopologyAwareHints` | `true` | Beta | 1.23 | |
|
||||
| `TopologyAwareHints` | `false` | Beta | 1.23 | |
|
||||
| `TopologyManager` | `false` | Alpha | 1.16 | 1.17 |
|
||||
| `TopologyManager` | `true` | Beta | 1.18 | |
|
||||
| `VolumeCapacityPriority` | `false` | Alpha | 1.21 | - |
|
||||
| `WinDSR` | `false` | Alpha | 1.14 | |
|
||||
| `WinOverlay` | `false` | Alpha | 1.14 | 1.19 |
|
||||
| `WinOverlay` | `true` | Beta | 1.20 | |
|
||||
| `WindowsHostProcessContainers` | `false` | Alpha | 1.22 | 1.22 |
|
||||
| `WindowsHostProcessContainers` | `false` | Beta | 1.23 | |
|
||||
{{< /table >}}
|
||||
|
||||
@@ -233,6 +248,8 @@ different Kubernetes components.
|
||||
| `BoundServiceAccountTokenVolume` | `false` | Alpha | 1.13 | 1.20 |
|
||||
| `BoundServiceAccountTokenVolume` | `true` | Beta | 1.21 | 1.21 |
|
||||
| `BoundServiceAccountTokenVolume` | `true` | GA | 1.22 | - |
|
||||
| `ConfigurableFSGroupPolicy` | `false` | Alpha | 1.18 | 1.19 |
|
||||
| `ConfigurableFSGroupPolicy` | `true` | Beta | 1.20 | 1.22 |
|
||||
| `ConfigurableFSGroupPolicy` | `true` | GA | 1.23 | |
|
||||
| `CRIContainerLogRotation` | `false` | Alpha | 1.10 | 1.10 |
|
||||
| `CRIContainerLogRotation` | `true` | Beta | 1.11 | 1.20 |
|
||||
@@ -312,12 +329,12 @@ different Kubernetes components.
|
||||
| `EndpointSliceProxying` | `false` | Alpha | 1.18 | 1.18 |
|
||||
| `EndpointSliceProxying` | `true` | Beta | 1.19 | 1.21 |
|
||||
| `EndpointSliceProxying` | `true` | GA | 1.22 | - |
|
||||
| `ExperimentalCriticalPodAnnotation` | `false` | Alpha | 1.5 | 1.12 |
|
||||
| `ExperimentalCriticalPodAnnotation` | `false` | Deprecated | 1.13 | - |
|
||||
| `EvenPodsSpread` | `false` | Alpha | 1.16 | 1.17 |
|
||||
| `EvenPodsSpread` | `true` | Beta | 1.18 | 1.18 |
|
||||
| `EvenPodsSpread` | `true` | GA | 1.19 | - |
|
||||
| `ExecProbeTimeout` | `true` | GA | 1.20 | - |
|
||||
| `ExperimentalCriticalPodAnnotation` | `false` | Alpha | 1.5 | 1.12 |
|
||||
| `ExperimentalCriticalPodAnnotation` | `false` | Deprecated | 1.13 | - |
|
||||
| `ExternalPolicyForExternalIP` | `true` | GA | 1.18 | - |
|
||||
| `GCERegionalPersistentDisk` | `true` | Beta | 1.10 | 1.12 |
|
||||
| `GCERegionalPersistentDisk` | `true` | GA | 1.13 | - |
|
||||
@@ -330,9 +347,6 @@ different Kubernetes components.
|
||||
| `HugePages` | `false` | Alpha | 1.8 | 1.9 |
|
||||
| `HugePages` | `true` | Beta| 1.10 | 1.13 |
|
||||
| `HugePages` | `true` | GA | 1.14 | - |
|
||||
| `HugePageStorageMediumSize` | `false` | Alpha | 1.18 | 1.18 |
|
||||
| `HugePageStorageMediumSize` | `true` | Beta | 1.19 | 1.21 |
|
||||
| `HugePageStorageMediumSize` | `true` | GA | 1.22 | - |
|
||||
| `HyperVContainer` | `false` | Alpha | 1.10 | 1.19 |
|
||||
| `HyperVContainer` | `false` | Deprecated | 1.20 | - |
|
||||
| `ImmutableEphemeralVolumes` | `false` | Alpha | 1.18 | 1.18 |
|
||||
@@ -351,9 +365,6 @@ different Kubernetes components.
|
||||
| `KubeletPluginsWatcher` | `false` | Alpha | 1.11 | 1.11 |
|
||||
| `KubeletPluginsWatcher` | `true` | Beta | 1.12 | 1.12 |
|
||||
| `KubeletPluginsWatcher` | `true` | GA | 1.13 | - |
|
||||
| `KubeletPodResources` | `false` | Alpha | 1.13 | 1.14 |
|
||||
| `KubeletPodResources` | `true` | Beta | 1.15 | |
|
||||
| `KubeletPodResources` | `true` | GA | 1.20 | |
|
||||
| `LegacyNodeRoleBehavior` | `false` | Alpha | 1.16 | 1.18 |
|
||||
| `LegacyNodeRoleBehavior` | `true` | Beta | 1.19 | 1.20 |
|
||||
| `LegacyNodeRoleBehavior` | `false` | GA | 1.21 | - |
|
||||
@@ -375,7 +386,6 @@ different Kubernetes components.
|
||||
| `PersistentLocalVolumes` | `false` | Alpha | 1.7 | 1.9 |
|
||||
| `PersistentLocalVolumes` | `true` | Beta | 1.10 | 1.13 |
|
||||
| `PersistentLocalVolumes` | `true` | GA | 1.14 | - |
|
||||
| `PodAndContainerStatsFromCRI` | `false` | Alpha | 1.23 | |
|
||||
| `PodDisruptionBudget` | `false` | Alpha | 1.3 | 1.4 |
|
||||
| `PodDisruptionBudget` | `true` | Beta | 1.5 | 1.20 |
|
||||
| `PodDisruptionBudget` | `true` | GA | 1.21 | - |
|
||||
@@ -497,7 +507,6 @@ different Kubernetes components.
|
||||
| `WindowsGMSA` | `false` | Alpha | 1.14 | 1.15 |
|
||||
| `WindowsGMSA` | `true` | Beta | 1.16 | 1.17 |
|
||||
| `WindowsGMSA` | `true` | GA | 1.18 | - |
|
||||
| `WindowsHostProcessContainers` | `false` | Alpha | 1.22 |
|
||||
| `WindowsRunAsUserName` | `false` | Alpha | 1.16 | 1.16 |
|
||||
| `WindowsRunAsUserName` | `true` | Beta | 1.17 | 1.17 |
|
||||
| `WindowsRunAsUserName` | `true` | GA | 1.18 | - |
|
||||
@@ -586,6 +595,12 @@ Each feature gate is designed for enabling/disabling a specific feature:
|
||||
(e.g. the cloud-controller-manager) in an HA cluster without downtime.
|
||||
- `CPUManager`: Enable container level CPU affinity support, see
|
||||
[CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/).
|
||||
- `CPUManagerPolicyAlphaOptions`: This allows fine-tuning of CPUManager policies, experimental, Alpha-quality options
|
||||
This feature gate guards *a group* of CPUManager options whose quality level is alpha.
|
||||
This feature gate will never graduate to beta or stable.
|
||||
- `CPUManagerPolicyBetaOptions`: This allows fine-tuning of CPUManager policies, experimental, Beta-quality options
|
||||
This feature gate guards *a group* of CPUManager options whose quality level is beta.
|
||||
This feature gate will never graduate to stable.
|
||||
- `CPUManagerPolicyOptions`: Allow fine-tuning of CPUManager policies.
|
||||
- `CRIContainerLogRotation`: Enable container log rotation for CRI container runtime. The default max size of a log file is 10MB and the
|
||||
default max number of log files allowed for a container is 5. These values can be configured in the kubelet config.
|
||||
@@ -728,6 +743,8 @@ Each feature gate is designed for enabling/disabling a specific feature:
|
||||
- `DisableCloudProviders`: Disables any functionality in `kube-apiserver`,
|
||||
`kube-controller-manager` and `kubelet` related to the `--cloud-provider`
|
||||
component flag.
|
||||
- `DisableKubeletCloudCredentialProviders`: Disable the in-tree functionality in kubelet
|
||||
to authenticate to a cloud provider container registry for image pull credentials.
|
||||
- `DownwardAPIHugePages`: Enables usage of hugepages in
|
||||
[downward API](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information).
|
||||
- `DryRun`: Enable server-side [dry run](/docs/reference/using-api/api-concepts/#dry-run) requests
|
||||
@@ -792,7 +809,10 @@ Each feature gate is designed for enabling/disabling a specific feature:
|
||||
and gracefully terminate pods running on the node. See
|
||||
[Graceful Node Shutdown](/docs/concepts/architecture/nodes/#graceful-node-shutdown)
|
||||
for more details.
|
||||
= `GracefulNodeShutdownBasedOnPodPriority`: Enables the kubelet to check Pod priorities
|
||||
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.
|
||||
- `HPAContainerMetrics`: Enable the `HorizontalPodAutoscaler` to scale based on
|
||||
metrics from individual containers in target pods.
|
||||
- `HPAScaleToZero`: Enables setting `minReplicas` to 0 for `HorizontalPodAutoscaler`
|
||||
@@ -818,6 +838,10 @@ Each feature gate is designed for enabling/disabling a specific feature:
|
||||
and volume controllers.
|
||||
- `InTreePluginOpenStackUnregister`: Stops registering the OpenStack cinder in-tree plugin in kubelet
|
||||
and volume controllers.
|
||||
- `InTreePluginPortworxUnregister`: Stops registering the Portworx in-tree plugin in kubelet
|
||||
and volume controllers.
|
||||
- `InTreePluginRBDUnregister`: Stops registering the RBD in-tree plugin in kubelet
|
||||
and volume controllers.
|
||||
- `InTreePluginvSphereUnregister`: Stops registering the vSphere in-tree plugin in kubelet
|
||||
and volume controllers.
|
||||
- `IndexedJob`: Allows the [Job](/docs/concepts/workloads/controllers/job/)
|
||||
@@ -889,6 +913,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
|
||||
Must be used with `KubeletConfiguration.failSwapOn` set to false.
|
||||
For more details, please see [swap memory](/docs/concepts/architecture/nodes/#swap-memory)
|
||||
- `NonPreemptingPriority`: Enable `preemptionPolicy` field for PriorityClass and Pod.
|
||||
- `OpenAPIEnum`: Enables populating "enum" fields of OpenAPI schemas in the
|
||||
spec returned from the API server.
|
||||
- `OpenAPIv3`: Enables the API server to publish OpenAPI v3.
|
||||
- `PVCProtection`: Enable the prevention of a PersistentVolumeClaim (PVC) from
|
||||
being deleted when it is still used by any Pod.
|
||||
- `PodDeletionCost`: Enable the [Pod Deletion Cost](/docs/concepts/workloads/controllers/replicaset/#pod-deletion-cost)
|
||||
|
||||
@@ -916,7 +916,7 @@ WindowsHostProcessContainers=true|false (ALPHA - default=false)<br/>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--pod-infra-container-image string Default: <code>k8s.gcr.io/pause:3.5</code></td>
|
||||
<td colspan="2">--pod-infra-container-image string Default: <code>k8s.gcr.io/pause:3.6</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;">Specified image will not be pruned by the image garbage collector. When container-runtime is set to <code>docker</code>, all containers in each pod will use the network/IPC namespaces from this image. Other CRI implementations have their own configuration to set this image.</td>
|
||||
|
||||
@@ -16,14 +16,12 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
|
||||
## `Event` {#audit-k8s-io-v1-Event}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [EventList](#audit-k8s-io-v1-EventList)
|
||||
|
||||
|
||||
@@ -81,7 +79,7 @@ For non-resource requests, this is the lower-cased HTTP method.</td>
|
||||
|
||||
|
||||
<tr><td><code>user</code> <B>[Required]</B><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#userinfo-v1-authentication"><code>authentication/v1.UserInfo</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#userinfo-v1-authentication"><code>authentication/v1.UserInfo</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Authenticated user information.</td>
|
||||
@@ -89,7 +87,7 @@ For non-resource requests, this is the lower-cased HTTP method.</td>
|
||||
|
||||
|
||||
<tr><td><code>impersonatedUser</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#userinfo-v1-authentication"><code>authentication/v1.UserInfo</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#userinfo-v1-authentication"><code>authentication/v1.UserInfo</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Impersonated user information.</td>
|
||||
@@ -123,7 +121,7 @@ Does not apply for List-type requests, or non-resource requests.</td>
|
||||
|
||||
|
||||
<tr><td><code>responseStatus</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#status-v1-meta"><code>meta/v1.Status</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#status-v1-meta"><code>meta/v1.Status</code></a>
|
||||
</td>
|
||||
<td>
|
||||
The response status, populated even when the ResponseObject is not a Status type.
|
||||
@@ -154,7 +152,7 @@ at Response Level.</td>
|
||||
|
||||
|
||||
<tr><td><code>requestReceivedTimestamp</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Time the request reached the apiserver.</td>
|
||||
@@ -162,7 +160,7 @@ at Response Level.</td>
|
||||
|
||||
|
||||
<tr><td><code>stageTimestamp</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Time the request reached current audit stage.</td>
|
||||
@@ -184,8 +182,6 @@ should be short. Annotations are included in the Metadata level.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `EventList` {#audit-k8s-io-v1-EventList}
|
||||
|
||||
@@ -206,7 +202,7 @@ EventList is a list of audit Events.
|
||||
|
||||
|
||||
<tr><td><code>metadata</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
@@ -225,8 +221,6 @@ EventList is a list of audit Events.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Policy` {#audit-k8s-io-v1-Policy}
|
||||
|
||||
@@ -234,7 +228,6 @@ EventList is a list of audit Events.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PolicyList](#audit-k8s-io-v1-PolicyList)
|
||||
|
||||
|
||||
@@ -252,7 +245,7 @@ categories are logged.
|
||||
|
||||
|
||||
<tr><td><code>metadata</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a>
|
||||
</td>
|
||||
<td>
|
||||
ObjectMeta is included for interoperability with API infrastructure.Refer to the Kubernetes API documentation for the fields of the <code>metadata</code> field.</td>
|
||||
@@ -294,8 +287,6 @@ in a rule will override the global default.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PolicyList` {#audit-k8s-io-v1-PolicyList}
|
||||
|
||||
@@ -316,7 +307,7 @@ PolicyList is a list of audit Policies.
|
||||
|
||||
|
||||
<tr><td><code>metadata</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
@@ -335,8 +326,6 @@ PolicyList is a list of audit Policies.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `GroupResources` {#audit-k8s-io-v1-GroupResources}
|
||||
|
||||
@@ -344,7 +333,6 @@ PolicyList is a list of audit Policies.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PolicyRule](#audit-k8s-io-v1-PolicyRule)
|
||||
|
||||
|
||||
@@ -397,8 +385,6 @@ An empty list implies that every instance of the resource is matched.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Level` {#audit-k8s-io-v1-Level}
|
||||
|
||||
@@ -406,17 +392,13 @@ An empty list implies that every instance of the resource is matched.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Event](#audit-k8s-io-v1-Event)
|
||||
|
||||
- [PolicyRule](#audit-k8s-io-v1-PolicyRule)
|
||||
|
||||
|
||||
Level defines the amount of information logged during auditing
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `ObjectReference` {#audit-k8s-io-v1-ObjectReference}
|
||||
|
||||
@@ -424,7 +406,6 @@ Level defines the amount of information logged during auditing
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Event](#audit-k8s-io-v1-Event)
|
||||
|
||||
|
||||
@@ -509,8 +490,6 @@ The empty string represents the core API group.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PolicyRule` {#audit-k8s-io-v1-PolicyRule}
|
||||
|
||||
@@ -518,7 +497,6 @@ The empty string represents the core API group.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Policy](#audit-k8s-io-v1-Policy)
|
||||
|
||||
|
||||
@@ -624,8 +602,6 @@ Policy.OmitManagedFields will stand.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Stage` {#audit-k8s-io-v1-Stage}
|
||||
|
||||
@@ -633,16 +609,12 @@ Policy.OmitManagedFields will stand.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Event](#audit-k8s-io-v1-Event)
|
||||
|
||||
- [Policy](#audit-k8s-io-v1-Policy)
|
||||
|
||||
- [PolicyRule](#audit-k8s-io-v1-PolicyRule)
|
||||
|
||||
|
||||
Stage defines the stages in request handling that audit events may be generated.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
---
|
||||
title: kube-apiserver Configuration (v1)
|
||||
content_type: tool-reference
|
||||
package: apiserver.config.k8s.io/v1
|
||||
auto_generated: true
|
||||
---
|
||||
Package v1 is the v1 version of the API.
|
||||
|
||||
## Resource Types
|
||||
|
||||
|
||||
- [AdmissionConfiguration](#apiserver-config-k8s-io-v1-AdmissionConfiguration)
|
||||
|
||||
|
||||
|
||||
## `AdmissionConfiguration` {#apiserver-config-k8s-io-v1-AdmissionConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AdmissionConfiguration provides versioned configuration for admission controllers.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>apiserver.config.k8s.io/v1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>AdmissionConfiguration</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>plugins</code><br/>
|
||||
<a href="#apiserver-config-k8s-io-v1-AdmissionPluginConfiguration"><code>[]AdmissionPluginConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Plugins allows specifying a configuration per admission control plugin.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `AdmissionPluginConfiguration` {#apiserver-config-k8s-io-v1-AdmissionPluginConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [AdmissionConfiguration](#apiserver-config-k8s-io-v1-AdmissionConfiguration)
|
||||
|
||||
|
||||
AdmissionPluginConfiguration provides the configuration for a single plug-in.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Name is the name of the admission controller.
|
||||
It must match the registered admission plugin name.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>path</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Path is the path to a configuration file that contains the plugin's
|
||||
configuration</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>configuration</code><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/runtime#Unknown"><code>k8s.io/apimachinery/pkg/runtime.Unknown</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Configuration is an embedded configuration object to be used as the plugin's
|
||||
configuration. If present, it will be used instead of the path to the configuration file.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,311 +0,0 @@
|
||||
---
|
||||
title: kube-apiserver Configuration (v1beta1)
|
||||
content_type: tool-reference
|
||||
package: apiserver.k8s.io/v1beta1
|
||||
auto_generated: true
|
||||
---
|
||||
Package v1beta1 is the v1beta1 version of the API.
|
||||
|
||||
## Resource Types
|
||||
|
||||
|
||||
- [EgressSelectorConfiguration](#apiserver-k8s-io-v1beta1-EgressSelectorConfiguration)
|
||||
|
||||
|
||||
|
||||
|
||||
## `EgressSelectorConfiguration` {#apiserver-k8s-io-v1beta1-EgressSelectorConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EgressSelectorConfiguration provides versioned configuration for egress selector clients.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>apiserver.k8s.io/v1beta1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>EgressSelectorConfiguration</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>egressSelections</code> <B>[Required]</B><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-EgressSelection"><code>[]EgressSelection</code></a>
|
||||
</td>
|
||||
<td>
|
||||
connectionServices contains a list of egress selection client configurations</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Connection` {#apiserver-k8s-io-v1beta1-Connection}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [EgressSelection](#apiserver-k8s-io-v1beta1-EgressSelection)
|
||||
|
||||
|
||||
Connection provides the configuration for a single egress selection client.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>proxyProtocol</code> <B>[Required]</B><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-ProtocolType"><code>ProtocolType</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Protocol is the protocol used to connect from client to the konnectivity server.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>transport</code><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-Transport"><code>Transport</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Transport defines the transport configurations we use to dial to the konnectivity server.
|
||||
This is required if ProxyProtocol is HTTPConnect or GRPC.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `EgressSelection` {#apiserver-k8s-io-v1beta1-EgressSelection}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [EgressSelectorConfiguration](#apiserver-k8s-io-v1beta1-EgressSelectorConfiguration)
|
||||
|
||||
|
||||
EgressSelection provides the configuration for a single egress selection client.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
name is the name of the egress selection.
|
||||
Currently supported values are "controlplane", "master", "etcd" and "cluster"
|
||||
The "master" egress selector is deprecated in favor of "controlplane"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>connection</code> <B>[Required]</B><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-Connection"><code>Connection</code></a>
|
||||
</td>
|
||||
<td>
|
||||
connection is the exact information used to configure the egress selection</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ProtocolType` {#apiserver-k8s-io-v1beta1-ProtocolType}
|
||||
|
||||
(Alias of `string`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Connection](#apiserver-k8s-io-v1beta1-Connection)
|
||||
|
||||
|
||||
ProtocolType is a set of valid values for Connection.ProtocolType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `TCPTransport` {#apiserver-k8s-io-v1beta1-TCPTransport}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Transport](#apiserver-k8s-io-v1beta1-Transport)
|
||||
|
||||
|
||||
TCPTransport provides the information to connect to konnectivity server via TCP
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>url</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
URL is the location of the konnectivity server to connect to.
|
||||
As an example it might be "https://127.0.0.1:8131"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tlsConfig</code><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-TLSConfig"><code>TLSConfig</code></a>
|
||||
</td>
|
||||
<td>
|
||||
TLSConfig is the config needed to use TLS when connecting to konnectivity server</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `TLSConfig` {#apiserver-k8s-io-v1beta1-TLSConfig}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [TCPTransport](#apiserver-k8s-io-v1beta1-TCPTransport)
|
||||
|
||||
|
||||
TLSConfig provides the authentication information to connect to konnectivity server
|
||||
Only used with TCPTransport
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>caBundle</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
caBundle is the file location of the CA to be used to determine trust with the konnectivity server.
|
||||
Must be absent/empty if TCPTransport.URL is prefixed with http://
|
||||
If absent while TCPTransport.URL is prefixed with https://, default to system trust roots.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientKey</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
clientKey is the file location of the client key to be used in mtls handshakes with the konnectivity server.
|
||||
Must be absent/empty if TCPTransport.URL is prefixed with http://
|
||||
Must be configured if TCPTransport.URL is prefixed with https://</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientCert</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
clientCert is the file location of the client certificate to be used in mtls handshakes with the konnectivity server.
|
||||
Must be absent/empty if TCPTransport.URL is prefixed with http://
|
||||
Must be configured if TCPTransport.URL is prefixed with https://</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Transport` {#apiserver-k8s-io-v1beta1-Transport}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Connection](#apiserver-k8s-io-v1beta1-Connection)
|
||||
|
||||
|
||||
Transport defines the transport configurations we use to dial to the konnectivity server
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>tcp</code><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-TCPTransport"><code>TCPTransport</code></a>
|
||||
</td>
|
||||
<td>
|
||||
TCP is the TCP configuration for communicating with the konnectivity server via TCP
|
||||
ProxyProtocol of GRPC is not supported with TCP transport at the moment
|
||||
Requires at least one of TCP or UDS to be set</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>uds</code><br/>
|
||||
<a href="#apiserver-k8s-io-v1beta1-UDSTransport"><code>UDSTransport</code></a>
|
||||
</td>
|
||||
<td>
|
||||
UDS is the UDS configuration for communicating with the konnectivity server via UDS
|
||||
Requires at least one of TCP or UDS to be set</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `UDSTransport` {#apiserver-k8s-io-v1beta1-UDSTransport}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Transport](#apiserver-k8s-io-v1beta1-Transport)
|
||||
|
||||
|
||||
UDSTransport provides the information to connect to konnectivity server via UDS
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>udsName</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
UDSName is the name of the unix domain socket to connect to konnectivity server
|
||||
This does not use a unix:// prefix. (Eg: /etc/srv/kubernetes/konnectivity-server/konnectivity-server.socket)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ Package v1 is the v1 version of the API.
|
||||
|
||||
|
||||
|
||||
|
||||
## `WebhookAdmission` {#apiserver-config-k8s-io-v1-WebhookAdmission}
|
||||
|
||||
|
||||
@@ -42,5 +41,4 @@ WebhookAdmission provides configuration for the webhook admission controller.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
---
|
||||
title: Client Authentication (v1)
|
||||
content_type: tool-reference
|
||||
package: client.authentication.k8s.io/v1
|
||||
auto_generated: true
|
||||
---
|
||||
|
||||
|
||||
## Resource Types
|
||||
|
||||
|
||||
- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)
|
||||
|
||||
|
||||
|
||||
## `ExecCredential` {#client-authentication-k8s-io-v1-ExecCredential}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ExecCredential is used by exec-based plugins to communicate credentials to
|
||||
HTTP transports.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>client.authentication.k8s.io/v1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>ExecCredential</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>spec</code> <B>[Required]</B><br/>
|
||||
<a href="#client-authentication-k8s-io-v1-ExecCredentialSpec"><code>ExecCredentialSpec</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Spec holds information passed to the plugin by the transport.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>status</code><br/>
|
||||
<a href="#client-authentication-k8s-io-v1-ExecCredentialStatus"><code>ExecCredentialStatus</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Status is filled in by the plugin and holds the credentials that the transport
|
||||
should use to contact the API.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `Cluster` {#client-authentication-k8s-io-v1-Cluster}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [ExecCredentialSpec](#client-authentication-k8s-io-v1-ExecCredentialSpec)
|
||||
|
||||
|
||||
Cluster contains information to allow an exec plugin to communicate
|
||||
with the kubernetes cluster being authenticated to.
|
||||
|
||||
To ensure that this struct contains everything someone would need to communicate
|
||||
with a kubernetes cluster (just like they would via a kubeconfig), the fields
|
||||
should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception
|
||||
of CertificateAuthority, since CA data will always be passed to the plugin as bytes.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>server</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Server is the address of the kubernetes cluster (https://hostname:port).</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tls-server-name</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
TLSServerName is passed to the server for SNI and is used in the client to
|
||||
check server certificates against. If ServerName is empty, the hostname
|
||||
used to contact the server is used.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>insecure-skip-tls-verify</code><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
InsecureSkipTLSVerify skips the validity check for the server's certificate.
|
||||
This will make your HTTPS connections insecure.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>certificate-authority-data</code><br/>
|
||||
<code>[]byte</code>
|
||||
</td>
|
||||
<td>
|
||||
CAData contains PEM-encoded certificate authority certificates.
|
||||
If empty, system roots should be used.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>proxy-url</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
ProxyURL is the URL to the proxy to be used for all requests to this
|
||||
cluster.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>config</code><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/runtime/#RawExtension"><code>k8s.io/apimachinery/pkg/runtime.RawExtension</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Config holds additional config data that is specific to the exec
|
||||
plugin with regards to the cluster being authenticated to.
|
||||
|
||||
This data is sourced from the clientcmd Cluster object's
|
||||
extensions[client.authentication.k8s.io/exec] field:
|
||||
|
||||
clusters:
|
||||
- name: my-cluster
|
||||
cluster:
|
||||
...
|
||||
extensions:
|
||||
- name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config
|
||||
extension:
|
||||
audience: 06e3fbd18de8 # arbitrary config
|
||||
|
||||
In some environments, the user config may be exactly the same across many clusters
|
||||
(i.e. call this exec plugin) minus some details that are specific to each cluster
|
||||
such as the audience. This field allows the per cluster config to be directly
|
||||
specified with the cluster info. Using this field to store secret data is not
|
||||
recommended as one of the prime benefits of exec plugins is that no secrets need
|
||||
to be stored directly in the kubeconfig.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `ExecCredentialSpec` {#client-authentication-k8s-io-v1-ExecCredentialSpec}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)
|
||||
|
||||
|
||||
ExecCredentialSpec holds request and runtime specific information provided by
|
||||
the transport.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>cluster</code><br/>
|
||||
<a href="#client-authentication-k8s-io-v1-Cluster"><code>Cluster</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Cluster contains information to allow an exec plugin to communicate with the
|
||||
kubernetes cluster being authenticated to. Note that Cluster is non-nil only
|
||||
when provideClusterInfo is set to true in the exec provider config (i.e.,
|
||||
ExecConfig.ProvideClusterInfo).</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>interactive</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
Interactive declares whether stdin has been passed to this exec plugin.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `ExecCredentialStatus` {#client-authentication-k8s-io-v1-ExecCredentialStatus}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)
|
||||
|
||||
|
||||
ExecCredentialStatus holds credentials for the transport to use.
|
||||
|
||||
Token and ClientKeyData are sensitive fields. This data should only be
|
||||
transmitted in-memory between client and exec plugin process. Exec plugin
|
||||
itself should at least be protected via file permissions.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>expirationTimestamp</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#time-v1-meta"><code>meta/v1.Time</code></a>
|
||||
</td>
|
||||
<td>
|
||||
ExpirationTimestamp indicates a time when the provided credentials expire.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>token</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Token is a bearer token used by the client for request authentication.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientCertificateData</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
PEM-encoded client TLS certificates (including intermediates, if any).</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientKeyData</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
PEM-encoded private key for the above certificate.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -13,13 +13,10 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
|
||||
## `ExecCredential` {#client-authentication-k8s-io-v1beta1-ExecCredential}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ExecCredential is used by exec-based plugins to communicate credentials to
|
||||
HTTP transports.
|
||||
|
||||
@@ -30,41 +27,32 @@ HTTP transports.
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>client.authentication.k8s.io/v1beta1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>ExecCredential</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>spec</code> <B>[Required]</B><br/>
|
||||
<a href="#client-authentication-k8s-io-v1beta1-ExecCredentialSpec"><code>ExecCredentialSpec</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Spec holds information passed to the plugin by the transport.</td>
|
||||
Spec holds information passed to the plugin by the transport.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>status</code><br/>
|
||||
<a href="#client-authentication-k8s-io-v1beta1-ExecCredentialStatus"><code>ExecCredentialStatus</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Status is filled in by the plugin and holds the credentials that the transport
|
||||
should use to contact the API.</td>
|
||||
should use to contact the API.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Cluster` {#client-authentication-k8s-io-v1beta1-Cluster}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ExecCredentialSpec](#client-authentication-k8s-io-v1beta1-ExecCredentialSpec)
|
||||
|
||||
|
||||
Cluster contains information to allow an exec plugin to communicate
|
||||
with the kubernetes cluster being authenticated to.
|
||||
|
||||
@@ -77,53 +65,47 @@ of CertificateAuthority, since CA data will always be passed to the plugin as by
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>server</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Server is the address of the kubernetes cluster (https://hostname:port).</td>
|
||||
Server is the address of the kubernetes cluster (https://hostname:port).
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tls-server-name</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
TLSServerName is passed to the server for SNI and is used in the client to
|
||||
check server certificates against. If ServerName is empty, the hostname
|
||||
used to contact the server is used.</td>
|
||||
used to contact the server is used.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>insecure-skip-tls-verify</code><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
InsecureSkipTLSVerify skips the validity check for the server's certificate.
|
||||
This will make your HTTPS connections insecure.</td>
|
||||
This will make your HTTPS connections insecure.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>certificate-authority-data</code><br/>
|
||||
<code>[]byte</code>
|
||||
</td>
|
||||
<td>
|
||||
CAData contains PEM-encoded certificate authority certificates.
|
||||
If empty, system roots should be used.</td>
|
||||
If empty, system roots should be used.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>proxy-url</code><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
ProxyURL is the URL to the proxy to be used for all requests to this
|
||||
cluster.</td>
|
||||
cluster.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>config</code><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/runtime/#RawExtension"><code>k8s.io/apimachinery/pkg/runtime.RawExtension</code></a>
|
||||
</td>
|
||||
@@ -148,25 +130,19 @@ In some environments, the user config may be exactly the same across many cluste
|
||||
such as the audience. This field allows the per cluster config to be directly
|
||||
specified with the cluster info. Using this field to store secret data is not
|
||||
recommended as one of the prime benefits of exec plugins is that no secrets need
|
||||
to be stored directly in the kubeconfig.</td>
|
||||
to be stored directly in the kubeconfig.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExecCredentialSpec` {#client-authentication-k8s-io-v1beta1-ExecCredentialSpec}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential)
|
||||
|
||||
|
||||
ExecCredentialSpec holds request and runtime specific information provided by
|
||||
the transport.
|
||||
|
||||
@@ -174,7 +150,6 @@ the transport.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>cluster</code><br/>
|
||||
<a href="#client-authentication-k8s-io-v1beta1-Cluster"><code>Cluster</code></a>
|
||||
@@ -183,33 +158,26 @@ the transport.
|
||||
Cluster contains information to allow an exec plugin to communicate with the
|
||||
kubernetes cluster being authenticated to. Note that Cluster is non-nil only
|
||||
when provideClusterInfo is set to true in the exec provider config (i.e.,
|
||||
ExecConfig.ProvideClusterInfo).</td>
|
||||
ExecConfig.ProvideClusterInfo).
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>interactive</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
Interactive declares whether stdin has been passed to this exec plugin.</td>
|
||||
Interactive declares whether stdin has been passed to this exec plugin.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExecCredentialStatus` {#client-authentication-k8s-io-v1beta1-ExecCredentialStatus}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential)
|
||||
|
||||
|
||||
ExecCredentialStatus holds credentials for the transport to use.
|
||||
|
||||
Token and ClientKeyData are sensitive fields. This data should only be
|
||||
@@ -220,41 +188,35 @@ itself should at least be protected via file permissions.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>expirationTimestamp</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#time-v1-meta"><code>meta/v1.Time</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#time-v1-meta"><code>meta/v1.Time</code></a>
|
||||
</td>
|
||||
<td>
|
||||
ExpirationTimestamp indicates a time when the provided credentials expire.</td>
|
||||
ExpirationTimestamp indicates a time when the provided credentials expire.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>token</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Token is a bearer token used by the client for request authentication.</td>
|
||||
Token is a bearer token used by the client for request authentication.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientCertificateData</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
PEM-encoded client TLS certificates (including intermediates, if any).</td>
|
||||
PEM-encoded client TLS certificates (including intermediates, if any).
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientKeyData</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
PEM-encoded private key for the above certificate.</td>
|
||||
PEM-encoded private key for the above certificate.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -13,13 +13,10 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
|
||||
## `KubeProxyConfiguration` {#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
KubeProxyConfiguration contains everything necessary to configure the
|
||||
Kubernetes proxy server.
|
||||
|
||||
@@ -30,156 +27,137 @@ Kubernetes proxy server.
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubeproxy.config.k8s.io/v1alpha1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>KubeProxyConfiguration</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>featureGates</code> <B>[Required]</B><br/>
|
||||
<code>map[string]bool</code>
|
||||
</td>
|
||||
<td>
|
||||
featureGates is a map of feature names to bools that enable or disable alpha/experimental features.</td>
|
||||
featureGates is a map of feature names to bools that enable or disable alpha/experimental features.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>bindAddress</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
|
||||
for all interfaces)</td>
|
||||
for all interfaces)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>healthzBindAddress</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
healthzBindAddress is the IP address and port for the health check server to serve on,
|
||||
defaulting to 0.0.0.0:10256</td>
|
||||
defaulting to 0.0.0.0:10256
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>metricsBindAddress</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
metricsBindAddress is the IP address and port for the metrics server to serve on,
|
||||
defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)</td>
|
||||
defaulting to 127.0.0.1:10249 (set to 0.0.0.0 for all interfaces)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>bindAddressHardFail</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit</td>
|
||||
bindAddressHardFail, if true, kube-proxy will treat failure to bind to a port as fatal and exit
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>enableProfiling</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
enableProfiling enables profiling via web interface on /debug/pprof handler.
|
||||
Profiling handlers will be handled by metrics server.</td>
|
||||
Profiling handlers will be handled by metrics server.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clusterCIDR</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
clusterCIDR is the CIDR range of the pods in the cluster. It is used to
|
||||
bridge traffic coming from outside of the cluster. If not provided,
|
||||
no off-cluster bridging will be performed.</td>
|
||||
no off-cluster bridging will be performed.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>hostnameOverride</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.</td>
|
||||
hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>clientConnection</code> <B>[Required]</B><br/>
|
||||
<a href="#ClientConnectionConfiguration"><code>ClientConnectionConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
clientConnection specifies the kubeconfig file and client connection settings for the proxy
|
||||
server to use when communicating with the apiserver.</td>
|
||||
server to use when communicating with the apiserver.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>iptables</code> <B>[Required]</B><br/>
|
||||
<a href="#kubeproxy-config-k8s-io-v1alpha1-KubeProxyIPTablesConfiguration"><code>KubeProxyIPTablesConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
iptables contains iptables-related configuration options.</td>
|
||||
iptables contains iptables-related configuration options.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>ipvs</code> <B>[Required]</B><br/>
|
||||
<a href="#kubeproxy-config-k8s-io-v1alpha1-KubeProxyIPVSConfiguration"><code>KubeProxyIPVSConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
ipvs contains ipvs-related configuration options.</td>
|
||||
ipvs contains ipvs-related configuration options.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>oomScoreAdj</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
|
||||
the range [-1000, 1000]</td>
|
||||
the range [-1000, 1000]
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>mode</code> <B>[Required]</B><br/>
|
||||
<a href="#kubeproxy-config-k8s-io-v1alpha1-ProxyMode"><code>ProxyMode</code></a>
|
||||
</td>
|
||||
<td>
|
||||
mode specifies which proxy mode to use.</td>
|
||||
mode specifies which proxy mode to use.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>portRange</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
|
||||
in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.</td>
|
||||
in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>udpIdleTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
|
||||
Must be greater than 0. Only applicable for proxyMode=userspace.</td>
|
||||
Must be greater than 0. Only applicable for proxyMode=userspace.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>conntrack</code> <B>[Required]</B><br/>
|
||||
<a href="#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConntrackConfiguration"><code>KubeProxyConntrackConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
conntrack contains conntrack-related configuration options.</td>
|
||||
conntrack contains conntrack-related configuration options.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>configSyncPeriod</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
configSyncPeriod is how often configuration from the apiserver is refreshed. Must be greater
|
||||
than 0.</td>
|
||||
than 0.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>nodePortAddresses</code> <B>[Required]</B><br/>
|
||||
<code>[]string</code>
|
||||
</td>
|
||||
@@ -190,49 +168,40 @@ In case someone would like to expose a service on localhost for local visit and
|
||||
particular purpose, a list of IP blocks would do that.
|
||||
If set it to "127.0.0.0/8", kube-proxy will only select the loopback interface for NodePort.
|
||||
If set it to a non-zero IP block, kube-proxy will filter that down to just the IPs that applied to the node.
|
||||
An empty string slice is meant to select all network interfaces.</td>
|
||||
An empty string slice is meant to select all network interfaces.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>winkernel</code> <B>[Required]</B><br/>
|
||||
<a href="#kubeproxy-config-k8s-io-v1alpha1-KubeProxyWinkernelConfiguration"><code>KubeProxyWinkernelConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
winkernel contains winkernel-related configuration options.</td>
|
||||
winkernel contains winkernel-related configuration options.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>showHiddenMetricsForVersion</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.</td>
|
||||
ShowHiddenMetricsForVersion is the version for which you want to show hidden metrics.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>detectLocalMode</code> <B>[Required]</B><br/>
|
||||
<a href="#kubeproxy-config-k8s-io-v1alpha1-LocalMode"><code>LocalMode</code></a>
|
||||
</td>
|
||||
<td>
|
||||
DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR</td>
|
||||
DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeProxyConntrackConfiguration` {#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConntrackConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
|
||||
KubeProxyConntrackConfiguration contains conntrack settings for
|
||||
the Kubernetes proxy server.
|
||||
|
||||
@@ -240,60 +209,50 @@ the Kubernetes proxy server.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>maxPerCore</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
maxPerCore is the maximum number of NAT connections to track
|
||||
per CPU core (0 to leave the limit as-is and ignore min).</td>
|
||||
per CPU core (0 to leave the limit as-is and ignore min).
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>min</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
min is the minimum value of connect-tracking records to allocate,
|
||||
regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).</td>
|
||||
regardless of conntrackMaxPerCore (set maxPerCore=0 to leave the limit as-is).
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tcpEstablishedTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
tcpEstablishedTimeout is how long an idle TCP connection will be kept open
|
||||
(e.g. '2s'). Must be greater than 0 to set.</td>
|
||||
(e.g. '2s'). Must be greater than 0 to set.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tcpCloseWaitTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
tcpCloseWaitTimeout is how long an idle conntrack entry
|
||||
in CLOSE_WAIT state will remain in the conntrack
|
||||
table. (e.g. '60s'). Must be greater than 0 to set.</td>
|
||||
table. (e.g. '60s'). Must be greater than 0 to set.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeProxyIPTablesConfiguration` {#kubeproxy-config-k8s-io-v1alpha1-KubeProxyIPTablesConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
|
||||
KubeProxyIPTablesConfiguration contains iptables-related configuration
|
||||
details for the Kubernetes proxy server.
|
||||
|
||||
@@ -301,58 +260,48 @@ details for the Kubernetes proxy server.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>masqueradeBit</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
|
||||
the pure iptables proxy mode. Values must be within the range [0, 31].</td>
|
||||
the pure iptables proxy mode. Values must be within the range [0, 31].
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>masqueradeAll</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.</td>
|
||||
masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>syncPeriod</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
syncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
|
||||
'2h22m'). Must be greater than 0.</td>
|
||||
'2h22m'). Must be greater than 0.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>minSyncPeriod</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
minSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m',
|
||||
'2h22m').</td>
|
||||
'2h22m').
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeProxyIPVSConfiguration` {#kubeproxy-config-k8s-io-v1alpha1-KubeProxyIPVSConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
|
||||
KubeProxyIPVSConfiguration contains ipvs-related configuration
|
||||
details for the Kubernetes proxy server.
|
||||
|
||||
@@ -360,94 +309,80 @@ details for the Kubernetes proxy server.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>syncPeriod</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
syncPeriod is the period that ipvs rules are refreshed (e.g. '5s', '1m',
|
||||
'2h22m'). Must be greater than 0.</td>
|
||||
'2h22m'). Must be greater than 0.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>minSyncPeriod</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
minSyncPeriod is the minimum period that ipvs rules are refreshed (e.g. '5s', '1m',
|
||||
'2h22m').</td>
|
||||
'2h22m').
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>scheduler</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
ipvs scheduler</td>
|
||||
ipvs scheduler
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>excludeCIDRs</code> <B>[Required]</B><br/>
|
||||
<code>[]string</code>
|
||||
</td>
|
||||
<td>
|
||||
excludeCIDRs is a list of CIDR's which the ipvs proxier should not touch
|
||||
when cleaning up ipvs services.</td>
|
||||
when cleaning up ipvs services.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>strictARP</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
strict ARP configure arp_ignore and arp_announce to avoid answering ARP queries
|
||||
from kube-ipvs0 interface</td>
|
||||
from kube-ipvs0 interface
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tcpTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
tcpTimeout is the timeout value used for idle IPVS TCP sessions.
|
||||
The default value is 0, which preserves the current timeout value on the system.</td>
|
||||
The default value is 0, which preserves the current timeout value on the system.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tcpFinTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
tcpFinTimeout is the timeout value used for IPVS TCP sessions after receiving a FIN.
|
||||
The default value is 0, which preserves the current timeout value on the system.</td>
|
||||
The default value is 0, which preserves the current timeout value on the system.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>udpTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
udpTimeout is the timeout value used for IPVS UDP packets.
|
||||
The default value is 0, which preserves the current timeout value on the system.</td>
|
||||
The default value is 0, which preserves the current timeout value on the system.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeProxyWinkernelConfiguration` {#kubeproxy-config-k8s-io-v1alpha1-KubeProxyWinkernelConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
|
||||
KubeProxyWinkernelConfiguration contains Windows/HNS settings for
|
||||
the Kubernetes proxy server.
|
||||
|
||||
@@ -455,66 +390,52 @@ the Kubernetes proxy server.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>networkName</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
networkName is the name of the network kube-proxy will use
|
||||
to create endpoints and policies</td>
|
||||
to create endpoints and policies
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>sourceVip</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
sourceVip is the IP address of the source VIP endoint used for
|
||||
NAT when loadbalancing</td>
|
||||
NAT when loadbalancing
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>enableDSR</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
enableDSR tells kube-proxy whether HNS policies should be created
|
||||
with DSR</td>
|
||||
with DSR
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `LocalMode` {#kubeproxy-config-k8s-io-v1alpha1-LocalMode}
|
||||
|
||||
(Alias of `string`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
|
||||
LocalMode represents modes to detect local traffic from the node
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `ProxyMode` {#kubeproxy-config-k8s-io-v1alpha1-ProxyMode}
|
||||
|
||||
(Alias of `string`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
|
||||
ProxyMode represents modes used by the Kubernetes proxy server.
|
||||
|
||||
Currently, three modes of proxy are available in Linux platform: 'userspace' (older, going to be EOL), 'iptables'
|
||||
@@ -532,7 +453,6 @@ future). If winkernel proxy is selected, regardless of how, but the Windows kern
|
||||
this always falls back to the userspace proxy.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -540,122 +460,62 @@ this always falls back to the userspace proxy.
|
||||
## `ClientConnectionConfiguration` {#ClientConnectionConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeProxyConfiguration](#kubeproxy-config-k8s-io-v1alpha1-KubeProxyConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
- [GenericControllerManagerConfiguration](#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration)
|
||||
|
||||
|
||||
ClientConnectionConfiguration contains details for constructing a client.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>kubeconfig</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
kubeconfig is the path to a KubeConfig file.</td>
|
||||
kubeconfig is the path to a KubeConfig file.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>acceptContentTypes</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
||||
default value of 'application/json'. This field will control all connections to the server used by a particular
|
||||
client.</td>
|
||||
client.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>contentType</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
contentType is the content type used when sending data to the server from this client.</td>
|
||||
contentType is the content type used when sending data to the server from this client.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>qps</code> <B>[Required]</B><br/>
|
||||
<code>float32</code>
|
||||
</td>
|
||||
<td>
|
||||
qps controls the number of queries per second allowed for this connection.</td>
|
||||
qps controls the number of queries per second allowed for this connection.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>burst</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
burst allows extra queries to accumulate when a client is exceeding its rate.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `DebuggingConfiguration` {#DebuggingConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
- [GenericControllerManagerConfiguration](#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration)
|
||||
|
||||
|
||||
DebuggingConfiguration holds configuration for Debugging related features.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>enableProfiling</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
burst allows extra queries to accumulate when a client is exceeding its rate.
|
||||
</td>
|
||||
<td>
|
||||
enableProfiling enables profiling via web interface host:port/debug/pprof/</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>enableContentionProfiling</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
enableContentionProfiling enables lock contention profiling, if
|
||||
enableProfiling is true.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `FormatOptions` {#FormatOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
FormatOptions contains options for the different logging formats.
|
||||
@@ -664,36 +524,30 @@ FormatOptions contains options for the different logging formats.
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>json</code> <B>[Required]</B><br/>
|
||||
<a href="#JSONOptions"><code>JSONOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] JSON contains options for logging format "json".</td>
|
||||
[Experimental] JSON contains options for logging format "json".
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `JSONOptions` {#JSONOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [FormatOptions](#FormatOptions)
|
||||
|
||||
|
||||
JSONOptions contains options for logging format "json".
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>splitStream</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
@@ -701,206 +555,25 @@ JSONOptions contains options for logging format "json".
|
||||
<td>
|
||||
[Experimental] SplitStream redirects error messages to stderr while
|
||||
info messages go to stdout, with buffering. The default is to write
|
||||
both to stdout, without buffering.</td>
|
||||
both to stdout, without buffering.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
||||
<code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue"><code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] InfoBufferSize sets the size of the info stream when
|
||||
using split streams. The default is zero, which disables buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `LeaderElectionConfiguration` {#LeaderElectionConfiguration}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
- [GenericControllerManagerConfiguration](#controllermanager-config-k8s-io-v1alpha1-GenericControllerManagerConfiguration)
|
||||
|
||||
|
||||
LeaderElectionConfiguration defines the configuration of leader election
|
||||
clients for components that can run with leader election enabled.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>leaderElect</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
using split streams. The default is zero, which disables buffering.
|
||||
</td>
|
||||
<td>
|
||||
leaderElect enables a leader election client to gain leadership
|
||||
before executing the main loop. Enable this when running replicated
|
||||
components for high availability.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>leaseDuration</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
leaseDuration is the duration that non-leader candidates will wait
|
||||
after observing a leadership renewal until attempting to acquire
|
||||
leadership of a led but unrenewed leader slot. This is effectively the
|
||||
maximum duration that a leader can be stopped before it is replaced
|
||||
by another candidate. This is only applicable if leader election is
|
||||
enabled.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>renewDeadline</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
renewDeadline is the interval between attempts by the acting master to
|
||||
renew a leadership slot before it stops leading. This must be less
|
||||
than or equal to the lease duration. This is only applicable if leader
|
||||
election is enabled.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>retryPeriod</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
retryPeriod is the duration the clients should wait between attempting
|
||||
acquisition and renewal of a leadership. This is only applicable if
|
||||
leader election is enabled.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>resourceLock</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
resourceLock indicates the resource object type that will be used to lock
|
||||
during leader election cycles.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>resourceName</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
resourceName indicates the name of resource object that will be used to lock
|
||||
during leader election cycles.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>resourceNamespace</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
resourceName indicates the namespace of resource object that will be used to lock
|
||||
during leader election cycles.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `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>flushFrequency</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/time#Duration"><code>time.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Maximum number of seconds between log flushes. Ignored if the
|
||||
selected logging backend writes log messages without buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>verbosity</code> <B>[Required]</B><br/>
|
||||
<code>uint32</code>
|
||||
</td>
|
||||
<td>
|
||||
Verbosity is the threshold that determines which log messages are
|
||||
logged. Default is zero which logs only the most important
|
||||
messages. Higher values enable additional messages. Error messages
|
||||
are always logged.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>vmodule</code> <B>[Required]</B><br/>
|
||||
<a href="#VModuleConfiguration"><code>VModuleConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
VModule overrides the verbosity threshold for individual files.
|
||||
Only supported for "text" log format.</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>
|
||||
|
||||
|
||||
<tr><td><code>options</code> <B>[Required]</B><br/>
|
||||
<a href="#FormatOptions"><code>FormatOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] Options holds additional parameters that are specific
|
||||
to the different logging formats. Only the options for the selected
|
||||
format get used, but all of them get validated.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `VModuleConfiguration` {#VModuleConfiguration}
|
||||
|
||||
(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
VModuleConfiguration is a collection of individual file names or patterns
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,6 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
|
||||
## `DefaultPreemptionArgs` {#kubescheduler-config-k8s-io-v1beta2-DefaultPreemptionArgs}
|
||||
|
||||
|
||||
@@ -67,8 +66,6 @@ that play a role in the number of candidates shortlisted. Must be at least
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `InterPodAffinityArgs` {#kubescheduler-config-k8s-io-v1beta2-InterPodAffinityArgs}
|
||||
|
||||
@@ -99,8 +96,6 @@ matching hard affinity to the incoming pod.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeSchedulerConfiguration` {#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration}
|
||||
|
||||
@@ -229,8 +224,6 @@ with the extender. These extenders are shared by all scheduler profiles.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `NodeAffinityArgs` {#kubescheduler-config-k8s-io-v1beta2-NodeAffinityArgs}
|
||||
|
||||
@@ -251,7 +244,7 @@ NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.
|
||||
|
||||
|
||||
<tr><td><code>addedAffinity</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#nodeaffinity-v1-core"><code>core/v1.NodeAffinity</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#nodeaffinity-v1-core"><code>core/v1.NodeAffinity</code></a>
|
||||
</td>
|
||||
<td>
|
||||
AddedAffinity is applied to all Pods additionally to the NodeAffinity
|
||||
@@ -265,8 +258,6 @@ a specific Node (such as Daemonset Pods) might remain unschedulable.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `NodeResourcesBalancedAllocationArgs` {#kubescheduler-config-k8s-io-v1beta2-NodeResourcesBalancedAllocationArgs}
|
||||
|
||||
@@ -296,8 +287,6 @@ NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResour
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `NodeResourcesFitArgs` {#kubescheduler-config-k8s-io-v1beta2-NodeResourcesFitArgs}
|
||||
|
||||
@@ -348,8 +337,6 @@ The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.<
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PodTopologySpreadArgs` {#kubescheduler-config-k8s-io-v1beta2-PodTopologySpreadArgs}
|
||||
|
||||
@@ -370,7 +357,7 @@ PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread pl
|
||||
|
||||
|
||||
<tr><td><code>defaultConstraints</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#topologyspreadconstraint-v1-core"><code>[]core/v1.TopologySpreadConstraint</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#topologyspreadconstraint-v1-core"><code>[]core/v1.TopologySpreadConstraint</code></a>
|
||||
</td>
|
||||
<td>
|
||||
DefaultConstraints defines topology spread constraints to be applied to
|
||||
@@ -400,8 +387,6 @@ and to "System" if enabled.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `VolumeBindingArgs` {#kubescheduler-config-k8s-io-v1beta2-VolumeBindingArgs}
|
||||
|
||||
@@ -451,8 +436,6 @@ All points must be sorted in increasing order by utilization.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Extender` {#kubescheduler-config-k8s-io-v1beta2-Extender}
|
||||
|
||||
@@ -460,7 +443,6 @@ All points must be sorted in increasing order by utilization.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -585,8 +567,6 @@ fail when the extender returns an error or is not reachable.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExtenderManagedResource` {#kubescheduler-config-k8s-io-v1beta2-ExtenderManagedResource}
|
||||
|
||||
@@ -594,7 +574,6 @@ fail when the extender returns an error or is not reachable.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Extender](#kubescheduler-config-k8s-io-v1beta2-Extender)
|
||||
|
||||
|
||||
@@ -626,8 +605,6 @@ resource when applying predicates.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExtenderTLSConfig` {#kubescheduler-config-k8s-io-v1beta2-ExtenderTLSConfig}
|
||||
|
||||
@@ -635,7 +612,6 @@ resource when applying predicates.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Extender](#kubescheduler-config-k8s-io-v1beta2-Extender)
|
||||
|
||||
|
||||
@@ -718,8 +694,6 @@ CAData takes precedence over CAFile</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeSchedulerProfile` {#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerProfile}
|
||||
|
||||
@@ -727,7 +701,6 @@ CAData takes precedence over CAFile</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -776,8 +749,6 @@ for that plugin.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Plugin` {#kubescheduler-config-k8s-io-v1beta2-Plugin}
|
||||
|
||||
@@ -785,7 +756,6 @@ for that plugin.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PluginSet](#kubescheduler-config-k8s-io-v1beta2-PluginSet)
|
||||
|
||||
|
||||
@@ -815,8 +785,6 @@ Plugin specifies a plugin name and its weight when applicable. Weight is used on
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PluginConfig` {#kubescheduler-config-k8s-io-v1beta2-PluginConfig}
|
||||
|
||||
@@ -824,7 +792,6 @@ Plugin specifies a plugin name and its weight when applicable. Weight is used on
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerProfile)
|
||||
|
||||
|
||||
@@ -856,8 +823,6 @@ It is up to the plugin to process these Args.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PluginSet` {#kubescheduler-config-k8s-io-v1beta2-PluginSet}
|
||||
|
||||
@@ -865,7 +830,6 @@ It is up to the plugin to process these Args.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Plugins](#kubescheduler-config-k8s-io-v1beta2-Plugins)
|
||||
|
||||
|
||||
@@ -900,8 +864,6 @@ When all default plugins need to be disabled, an array containing only one "&low
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Plugins` {#kubescheduler-config-k8s-io-v1beta2-Plugins}
|
||||
|
||||
@@ -909,7 +871,6 @@ When all default plugins need to be disabled, an array containing only one "&low
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerProfile)
|
||||
|
||||
|
||||
@@ -1025,8 +986,6 @@ The scheduler call these plugins in order. Scheduler skips the rest of these plu
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PodTopologySpreadConstraintsDefaulting` {#kubescheduler-config-k8s-io-v1beta2-PodTopologySpreadConstraintsDefaulting}
|
||||
|
||||
@@ -1034,7 +993,6 @@ The scheduler call these plugins in order. Scheduler skips the rest of these plu
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PodTopologySpreadArgs](#kubescheduler-config-k8s-io-v1beta2-PodTopologySpreadArgs)
|
||||
|
||||
|
||||
@@ -1042,8 +1000,6 @@ PodTopologySpreadConstraintsDefaulting defines how to set default constraints
|
||||
for the PodTopologySpread plugin.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `RequestedToCapacityRatioParam` {#kubescheduler-config-k8s-io-v1beta2-RequestedToCapacityRatioParam}
|
||||
|
||||
@@ -1051,7 +1007,6 @@ for the PodTopologySpread plugin.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy)
|
||||
|
||||
|
||||
@@ -1073,8 +1028,6 @@ RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ResourceSpec` {#kubescheduler-config-k8s-io-v1beta2-ResourceSpec}
|
||||
|
||||
@@ -1082,9 +1035,7 @@ RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [NodeResourcesBalancedAllocationArgs](#kubescheduler-config-k8s-io-v1beta2-NodeResourcesBalancedAllocationArgs)
|
||||
|
||||
- [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy)
|
||||
|
||||
|
||||
@@ -1114,8 +1065,6 @@ ResourceSpec represents a single resource.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ScoringStrategy` {#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy}
|
||||
|
||||
@@ -1123,7 +1072,6 @@ ResourceSpec represents a single resource.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [NodeResourcesFitArgs](#kubescheduler-config-k8s-io-v1beta2-NodeResourcesFitArgs)
|
||||
|
||||
|
||||
@@ -1164,8 +1112,6 @@ Weight defaults to 1 if not specified or explicitly set to 0.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ScoringStrategyType` {#kubescheduler-config-k8s-io-v1beta2-ScoringStrategyType}
|
||||
|
||||
@@ -1173,15 +1119,12 @@ Weight defaults to 1 if not specified or explicitly set to 0.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta2-ScoringStrategy)
|
||||
|
||||
|
||||
ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `UtilizationShapePoint` {#kubescheduler-config-k8s-io-v1beta2-UtilizationShapePoint}
|
||||
|
||||
@@ -1189,9 +1132,7 @@ ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [VolumeBindingArgs](#kubescheduler-config-k8s-io-v1beta2-VolumeBindingArgs)
|
||||
|
||||
- [RequestedToCapacityRatioParam](#kubescheduler-config-k8s-io-v1beta2-RequestedToCapacityRatioParam)
|
||||
|
||||
|
||||
@@ -1221,7 +1162,6 @@ UtilizationShapePoint represents single point of priority function shape.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1232,7 +1172,6 @@ UtilizationShapePoint represents single point of priority function shape.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -1295,7 +1234,6 @@ client.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -1333,7 +1271,6 @@ enableProfiling is true.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
@@ -1362,7 +1299,6 @@ FormatOptions contains options for the different logging formats.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [FormatOptions](#FormatOptions)
|
||||
|
||||
|
||||
@@ -1385,7 +1321,7 @@ both to stdout, without buffering.</td>
|
||||
|
||||
|
||||
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
||||
<code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue"><code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] InfoBufferSize sets the size of the info stream when
|
||||
@@ -1402,7 +1338,6 @@ using split streams. The default is zero, which disables buffering.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -1495,7 +1430,6 @@ during leader election cycles.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1574,7 +1508,6 @@ format get used, but all of them get validated.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
|
||||
## `DefaultPreemptionArgs` {#kubescheduler-config-k8s-io-v1beta3-DefaultPreemptionArgs}
|
||||
|
||||
|
||||
@@ -67,8 +66,6 @@ that play a role in the number of candidates shortlisted. Must be at least
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `InterPodAffinityArgs` {#kubescheduler-config-k8s-io-v1beta3-InterPodAffinityArgs}
|
||||
|
||||
@@ -99,8 +96,6 @@ matching hard affinity to the incoming pod.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeSchedulerConfiguration` {#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration}
|
||||
|
||||
@@ -211,8 +206,6 @@ with the extender. These extenders are shared by all scheduler profiles.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `NodeAffinityArgs` {#kubescheduler-config-k8s-io-v1beta3-NodeAffinityArgs}
|
||||
|
||||
@@ -233,7 +226,7 @@ NodeAffinityArgs holds arguments to configure the NodeAffinity plugin.
|
||||
|
||||
|
||||
<tr><td><code>addedAffinity</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#nodeaffinity-v1-core"><code>core/v1.NodeAffinity</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#nodeaffinity-v1-core"><code>core/v1.NodeAffinity</code></a>
|
||||
</td>
|
||||
<td>
|
||||
AddedAffinity is applied to all Pods additionally to the NodeAffinity
|
||||
@@ -247,8 +240,6 @@ a specific Node (such as Daemonset Pods) might remain unschedulable.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `NodeResourcesBalancedAllocationArgs` {#kubescheduler-config-k8s-io-v1beta3-NodeResourcesBalancedAllocationArgs}
|
||||
|
||||
@@ -278,8 +269,6 @@ NodeResourcesBalancedAllocationArgs holds arguments used to configure NodeResour
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `NodeResourcesFitArgs` {#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs}
|
||||
|
||||
@@ -330,8 +319,6 @@ The default strategy is LeastAllocated with an equal "cpu" and "memory" weight.<
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PodTopologySpreadArgs` {#kubescheduler-config-k8s-io-v1beta3-PodTopologySpreadArgs}
|
||||
|
||||
@@ -352,7 +339,7 @@ PodTopologySpreadArgs holds arguments used to configure the PodTopologySpread pl
|
||||
|
||||
|
||||
<tr><td><code>defaultConstraints</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#topologyspreadconstraint-v1-core"><code>[]core/v1.TopologySpreadConstraint</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#topologyspreadconstraint-v1-core"><code>[]core/v1.TopologySpreadConstraint</code></a>
|
||||
</td>
|
||||
<td>
|
||||
DefaultConstraints defines topology spread constraints to be applied to
|
||||
@@ -382,8 +369,6 @@ and to "System" if enabled.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `VolumeBindingArgs` {#kubescheduler-config-k8s-io-v1beta3-VolumeBindingArgs}
|
||||
|
||||
@@ -433,8 +418,6 @@ All points must be sorted in increasing order by utilization.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Extender` {#kubescheduler-config-k8s-io-v1beta3-Extender}
|
||||
|
||||
@@ -442,7 +425,6 @@ All points must be sorted in increasing order by utilization.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -567,8 +549,6 @@ fail when the extender returns an error or is not reachable.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExtenderManagedResource` {#kubescheduler-config-k8s-io-v1beta3-ExtenderManagedResource}
|
||||
|
||||
@@ -576,7 +556,6 @@ fail when the extender returns an error or is not reachable.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Extender](#kubescheduler-config-k8s-io-v1beta3-Extender)
|
||||
|
||||
|
||||
@@ -608,8 +587,6 @@ resource when applying predicates.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExtenderTLSConfig` {#kubescheduler-config-k8s-io-v1beta3-ExtenderTLSConfig}
|
||||
|
||||
@@ -617,7 +594,6 @@ resource when applying predicates.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Extender](#kubescheduler-config-k8s-io-v1beta3-Extender)
|
||||
|
||||
|
||||
@@ -700,8 +676,6 @@ CAData takes precedence over CAFile</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeSchedulerProfile` {#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerProfile}
|
||||
|
||||
@@ -709,7 +683,6 @@ CAData takes precedence over CAFile</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -758,8 +731,6 @@ for that plugin.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Plugin` {#kubescheduler-config-k8s-io-v1beta3-Plugin}
|
||||
|
||||
@@ -767,7 +738,6 @@ for that plugin.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PluginSet](#kubescheduler-config-k8s-io-v1beta3-PluginSet)
|
||||
|
||||
|
||||
@@ -797,8 +767,6 @@ Plugin specifies a plugin name and its weight when applicable. Weight is used on
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PluginConfig` {#kubescheduler-config-k8s-io-v1beta3-PluginConfig}
|
||||
|
||||
@@ -806,7 +774,6 @@ Plugin specifies a plugin name and its weight when applicable. Weight is used on
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerProfile)
|
||||
|
||||
|
||||
@@ -838,8 +805,6 @@ It is up to the plugin to process these Args.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PluginSet` {#kubescheduler-config-k8s-io-v1beta3-PluginSet}
|
||||
|
||||
@@ -847,7 +812,6 @@ It is up to the plugin to process these Args.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Plugins](#kubescheduler-config-k8s-io-v1beta3-Plugins)
|
||||
|
||||
|
||||
@@ -882,8 +846,6 @@ When all default plugins need to be disabled, an array containing only one "&low
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `Plugins` {#kubescheduler-config-k8s-io-v1beta3-Plugins}
|
||||
|
||||
@@ -891,7 +853,6 @@ When all default plugins need to be disabled, an array containing only one "&low
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerProfile](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerProfile)
|
||||
|
||||
|
||||
@@ -1022,8 +983,6 @@ plugin through MultiPoint. This follows the same behavior as all other extension
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PodTopologySpreadConstraintsDefaulting` {#kubescheduler-config-k8s-io-v1beta3-PodTopologySpreadConstraintsDefaulting}
|
||||
|
||||
@@ -1031,7 +990,6 @@ plugin through MultiPoint. This follows the same behavior as all other extension
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PodTopologySpreadArgs](#kubescheduler-config-k8s-io-v1beta3-PodTopologySpreadArgs)
|
||||
|
||||
|
||||
@@ -1039,8 +997,6 @@ PodTopologySpreadConstraintsDefaulting defines how to set default constraints
|
||||
for the PodTopologySpread plugin.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `RequestedToCapacityRatioParam` {#kubescheduler-config-k8s-io-v1beta3-RequestedToCapacityRatioParam}
|
||||
|
||||
@@ -1048,7 +1004,6 @@ for the PodTopologySpread plugin.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy)
|
||||
|
||||
|
||||
@@ -1070,8 +1025,6 @@ RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ResourceSpec` {#kubescheduler-config-k8s-io-v1beta3-ResourceSpec}
|
||||
|
||||
@@ -1079,9 +1032,7 @@ RequestedToCapacityRatioParam define RequestedToCapacityRatio parameters
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [NodeResourcesBalancedAllocationArgs](#kubescheduler-config-k8s-io-v1beta3-NodeResourcesBalancedAllocationArgs)
|
||||
|
||||
- [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy)
|
||||
|
||||
|
||||
@@ -1111,8 +1062,6 @@ ResourceSpec represents a single resource.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ScoringStrategy` {#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy}
|
||||
|
||||
@@ -1120,7 +1069,6 @@ ResourceSpec represents a single resource.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [NodeResourcesFitArgs](#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs)
|
||||
|
||||
|
||||
@@ -1161,8 +1109,6 @@ Weight defaults to 1 if not specified or explicitly set to 0.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ScoringStrategyType` {#kubescheduler-config-k8s-io-v1beta3-ScoringStrategyType}
|
||||
|
||||
@@ -1170,15 +1116,12 @@ Weight defaults to 1 if not specified or explicitly set to 0.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [ScoringStrategy](#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy)
|
||||
|
||||
|
||||
ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `UtilizationShapePoint` {#kubescheduler-config-k8s-io-v1beta3-UtilizationShapePoint}
|
||||
|
||||
@@ -1186,9 +1129,7 @@ ScoringStrategyType the type of scoring strategy used in NodeResourcesFit plugin
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [VolumeBindingArgs](#kubescheduler-config-k8s-io-v1beta3-VolumeBindingArgs)
|
||||
|
||||
- [RequestedToCapacityRatioParam](#kubescheduler-config-k8s-io-v1beta3-RequestedToCapacityRatioParam)
|
||||
|
||||
|
||||
@@ -1218,7 +1159,6 @@ UtilizationShapePoint represents single point of priority function shape.
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1229,9 +1169,7 @@ UtilizationShapePoint represents single point of priority function shape.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -1294,10 +1232,8 @@ client.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
DebuggingConfiguration holds configuration for Debugging related features.
|
||||
@@ -1334,7 +1270,6 @@ enableProfiling is true.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
@@ -1363,7 +1298,6 @@ FormatOptions contains options for the different logging formats.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [FormatOptions](#FormatOptions)
|
||||
|
||||
|
||||
@@ -1386,7 +1320,7 @@ both to stdout, without buffering.</td>
|
||||
|
||||
|
||||
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
||||
<code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue"><code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] InfoBufferSize sets the size of the info stream when
|
||||
@@ -1403,9 +1337,7 @@ using split streams. The default is zero, which disables buffering.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta2-KubeSchedulerConfiguration)
|
||||
|
||||
- [KubeSchedulerConfiguration](#kubescheduler-config-k8s-io-v1beta3-KubeSchedulerConfiguration)
|
||||
|
||||
|
||||
@@ -1498,7 +1430,6 @@ during leader election cycles.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1577,7 +1508,6 @@ format get used, but all of them get validated.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
|
||||
@@ -1,799 +0,0 @@
|
||||
---
|
||||
title: kube-scheduler Policy Configuration (v1)
|
||||
content_type: tool-reference
|
||||
package: kubescheduler.config.k8s.io/v1
|
||||
auto_generated: true
|
||||
---
|
||||
|
||||
|
||||
## Resource Types
|
||||
|
||||
|
||||
- [Policy](#kubescheduler-config-k8s-io-v1-Policy)
|
||||
|
||||
|
||||
|
||||
|
||||
## `Policy` {#kubescheduler-config-k8s-io-v1-Policy}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Policy describes a struct for a policy resource used in api.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubescheduler.config.k8s.io/v1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>Policy</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>predicates</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-PredicatePolicy"><code>[]PredicatePolicy</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Holds the information to configure the fit predicate functions</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>priorities</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-PriorityPolicy"><code>[]PriorityPolicy</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Holds the information to configure the priority functions</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>extenders</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-LegacyExtender"><code>[]LegacyExtender</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Holds the information to communicate with the extender(s)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>hardPodAffinitySymmetricWeight</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
|
||||
corresponding to every RequiredDuringScheduling affinity rule.
|
||||
HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 1-100.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>alwaysCheckAllPredicates</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
When AlwaysCheckAllPredicates is set to true, scheduler checks all
|
||||
the configured predicates even after one or more of them fails.
|
||||
When the flag is set to false, scheduler skips checking the rest
|
||||
of the predicates after it finds one predicate that failed.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExtenderManagedResource` {#kubescheduler-config-k8s-io-v1-ExtenderManagedResource}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Extender](#kubescheduler-config-k8s-io-v1beta1-Extender)
|
||||
|
||||
- [LegacyExtender](#kubescheduler-config-k8s-io-v1-LegacyExtender)
|
||||
|
||||
|
||||
ExtenderManagedResource describes the arguments of extended resources
|
||||
managed by an extender.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Name is the extended resource name.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>ignoredByScheduler</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
IgnoredByScheduler indicates whether kube-scheduler should ignore this
|
||||
resource when applying predicates.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExtenderTLSConfig` {#kubescheduler-config-k8s-io-v1-ExtenderTLSConfig}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Extender](#kubescheduler-config-k8s-io-v1beta1-Extender)
|
||||
|
||||
- [LegacyExtender](#kubescheduler-config-k8s-io-v1-LegacyExtender)
|
||||
|
||||
|
||||
ExtenderTLSConfig contains settings to enable TLS with extender
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>insecure</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
Server should be accessed without verifying the TLS certificate. For testing only.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>serverName</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
ServerName is passed to the server for SNI and is used in the client to check server
|
||||
certificates against. If ServerName is empty, the hostname used to contact the
|
||||
server is used.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>certFile</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Server requires TLS client certificate authentication</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>keyFile</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Server requires TLS client certificate authentication</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>caFile</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Trusted root certificates for server</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>certData</code> <B>[Required]</B><br/>
|
||||
<code>[]byte</code>
|
||||
</td>
|
||||
<td>
|
||||
CertData holds PEM-encoded bytes (typically read from a client certificate file).
|
||||
CertData takes precedence over CertFile</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>keyData</code> <B>[Required]</B><br/>
|
||||
<code>[]byte</code>
|
||||
</td>
|
||||
<td>
|
||||
KeyData holds PEM-encoded bytes (typically read from a client certificate key file).
|
||||
KeyData takes precedence over KeyFile</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>caData</code> <B>[Required]</B><br/>
|
||||
<code>[]byte</code>
|
||||
</td>
|
||||
<td>
|
||||
CAData holds PEM-encoded bytes (typically read from a root certificates bundle).
|
||||
CAData takes precedence over CAFile</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `LabelPreference` {#kubescheduler-config-k8s-io-v1-LabelPreference}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PriorityArgument](#kubescheduler-config-k8s-io-v1-PriorityArgument)
|
||||
|
||||
|
||||
LabelPreference holds the parameters that are used to configure the corresponding priority function
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>label</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Used to identify node "groups"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>presence</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
This is a boolean flag
|
||||
If true, higher priority is given to nodes that have the label
|
||||
If false, higher priority is given to nodes that do not have the label</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `LabelsPresence` {#kubescheduler-config-k8s-io-v1-LabelsPresence}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PredicateArgument](#kubescheduler-config-k8s-io-v1-PredicateArgument)
|
||||
|
||||
|
||||
LabelsPresence holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>labels</code> <B>[Required]</B><br/>
|
||||
<code>[]string</code>
|
||||
</td>
|
||||
<td>
|
||||
The list of labels that identify node "groups"
|
||||
All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>presence</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
The boolean flag that indicates whether the labels should be present or absent from the node</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `LegacyExtender` {#kubescheduler-config-k8s-io-v1-LegacyExtender}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Policy](#kubescheduler-config-k8s-io-v1-Policy)
|
||||
|
||||
|
||||
LegacyExtender holds the parameters used to communicate with the extender. If a verb is unspecified/empty,
|
||||
it is assumed that the extender chose not to provide that extension.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>urlPrefix</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
URLPrefix at which the extender is available</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>filterVerb</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>preemptVerb</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Verb for the preempt call, empty if not supported. This verb is appended to the URLPrefix when issuing the preempt call to extender.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>prioritizeVerb</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>weight</code> <B>[Required]</B><br/>
|
||||
<code>int64</code>
|
||||
</td>
|
||||
<td>
|
||||
The numeric multiplier for the node scores that the prioritize call generates.
|
||||
The weight should be a positive integer</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>bindVerb</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender.
|
||||
If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver. Only one extender
|
||||
can implement this function.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>enableHttps</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
EnableHTTPS specifies whether https should be used to communicate with the extender</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>tlsConfig</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-ExtenderTLSConfig"><code>ExtenderTLSConfig</code></a>
|
||||
</td>
|
||||
<td>
|
||||
TLSConfig specifies the transport layer security config</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>httpTimeout</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/time#Duration"><code>time.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize
|
||||
timeout is ignored, k8s/other extenders priorities are used to select the node.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>nodeCacheCapable</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
NodeCacheCapable specifies that the extender is capable of caching node information,
|
||||
so the scheduler should only send minimal information about the eligible nodes
|
||||
assuming that the extender already cached full details of all nodes in the cluster</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>managedResources</code><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-ExtenderManagedResource"><code>[]ExtenderManagedResource</code></a>
|
||||
</td>
|
||||
<td>
|
||||
ManagedResources is a list of extended resources that are managed by
|
||||
this extender.
|
||||
- A pod will be sent to the extender on the Filter, Prioritize and Bind
|
||||
(if the extender is the binder) phases iff the pod requests at least
|
||||
one of the extended resources in this list. If empty or unspecified,
|
||||
all pods will be sent to this extender.
|
||||
- If IgnoredByScheduler is set to true for a resource, kube-scheduler
|
||||
will skip checking the resource in predicates.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>ignorable</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
Ignorable specifies if the extender is ignorable, i.e. scheduling should not
|
||||
fail when the extender returns an error or is not reachable.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PredicateArgument` {#kubescheduler-config-k8s-io-v1-PredicateArgument}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PredicatePolicy](#kubescheduler-config-k8s-io-v1-PredicatePolicy)
|
||||
|
||||
|
||||
PredicateArgument represents the arguments to configure predicate functions in scheduler policy configuration.
|
||||
Only one of its members may be specified
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>serviceAffinity</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-ServiceAffinity"><code>ServiceAffinity</code></a>
|
||||
</td>
|
||||
<td>
|
||||
The predicate that provides affinity for pods belonging to a service
|
||||
It uses a label to identify nodes that belong to the same "group"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>labelsPresence</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-LabelsPresence"><code>LabelsPresence</code></a>
|
||||
</td>
|
||||
<td>
|
||||
The predicate that checks whether a particular node has a certain label
|
||||
defined or not, regardless of value</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PredicatePolicy` {#kubescheduler-config-k8s-io-v1-PredicatePolicy}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Policy](#kubescheduler-config-k8s-io-v1-Policy)
|
||||
|
||||
|
||||
PredicatePolicy describes a struct of a predicate policy.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Identifier of the predicate policy
|
||||
For a custom predicate, the name can be user-defined
|
||||
For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>argument</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-PredicateArgument"><code>PredicateArgument</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Holds the parameters to configure the given predicate</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PriorityArgument` {#kubescheduler-config-k8s-io-v1-PriorityArgument}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PriorityPolicy](#kubescheduler-config-k8s-io-v1-PriorityPolicy)
|
||||
|
||||
|
||||
PriorityArgument represents the arguments to configure priority functions in scheduler policy configuration.
|
||||
Only one of its members may be specified
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>serviceAntiAffinity</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-ServiceAntiAffinity"><code>ServiceAntiAffinity</code></a>
|
||||
</td>
|
||||
<td>
|
||||
The priority function that ensures a good spread (anti-affinity) for pods belonging to a service
|
||||
It uses a label to identify nodes that belong to the same "group"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>labelPreference</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-LabelPreference"><code>LabelPreference</code></a>
|
||||
</td>
|
||||
<td>
|
||||
The priority function that checks whether a particular node has a certain label
|
||||
defined or not, regardless of value</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>requestedToCapacityRatioArguments</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-RequestedToCapacityRatioArguments"><code>RequestedToCapacityRatioArguments</code></a>
|
||||
</td>
|
||||
<td>
|
||||
The RequestedToCapacityRatio priority function is parametrized with function shape.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `PriorityPolicy` {#kubescheduler-config-k8s-io-v1-PriorityPolicy}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [Policy](#kubescheduler-config-k8s-io-v1-Policy)
|
||||
|
||||
|
||||
PriorityPolicy describes a struct of a priority policy.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Identifier of the priority policy
|
||||
For a custom priority, the name can be user-defined
|
||||
For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>weight</code> <B>[Required]</B><br/>
|
||||
<code>int64</code>
|
||||
</td>
|
||||
<td>
|
||||
The numeric multiplier for the node scores that the priority function generates
|
||||
The weight should be non-zero and can be a positive or a negative integer</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>argument</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-PriorityArgument"><code>PriorityArgument</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Holds the parameters to configure the given priority function</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `RequestedToCapacityRatioArguments` {#kubescheduler-config-k8s-io-v1-RequestedToCapacityRatioArguments}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PriorityArgument](#kubescheduler-config-k8s-io-v1-PriorityArgument)
|
||||
|
||||
|
||||
RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>shape</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-UtilizationShapePoint"><code>[]UtilizationShapePoint</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Array of point defining priority function shape.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>resources</code> <B>[Required]</B><br/>
|
||||
<a href="#kubescheduler-config-k8s-io-v1-ResourceSpec"><code>[]ResourceSpec</code></a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ResourceSpec` {#kubescheduler-config-k8s-io-v1-ResourceSpec}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [RequestedToCapacityRatioArguments](#kubescheduler-config-k8s-io-v1-RequestedToCapacityRatioArguments)
|
||||
|
||||
|
||||
ResourceSpec represents single resource and weight for bin packing of priority RequestedToCapacityRatioArguments.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Name of the resource to be managed by RequestedToCapacityRatio function.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>weight</code> <B>[Required]</B><br/>
|
||||
<code>int64</code>
|
||||
</td>
|
||||
<td>
|
||||
Weight of the resource.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ServiceAffinity` {#kubescheduler-config-k8s-io-v1-ServiceAffinity}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PredicateArgument](#kubescheduler-config-k8s-io-v1-PredicateArgument)
|
||||
|
||||
|
||||
ServiceAffinity holds the parameters that are used to configure the corresponding predicate in scheduler policy configuration.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>labels</code> <B>[Required]</B><br/>
|
||||
<code>[]string</code>
|
||||
</td>
|
||||
<td>
|
||||
The list of labels that identify node "groups"
|
||||
All of the labels should match for the node to be considered a fit for hosting the pod</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ServiceAntiAffinity` {#kubescheduler-config-k8s-io-v1-ServiceAntiAffinity}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [PriorityArgument](#kubescheduler-config-k8s-io-v1-PriorityArgument)
|
||||
|
||||
|
||||
ServiceAntiAffinity holds the parameters that are used to configure the corresponding priority function
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>label</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Used to identify node "groups"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `UtilizationShapePoint` {#kubescheduler-config-k8s-io-v1-UtilizationShapePoint}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [RequestedToCapacityRatioArguments](#kubescheduler-config-k8s-io-v1-RequestedToCapacityRatioArguments)
|
||||
|
||||
|
||||
UtilizationShapePoint represents single point of priority function shape.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>utilization</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
Utilization (x axis). Valid values are 0 to 100. Fully utilized node maps to 100.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>score</code> <B>[Required]</B><br/>
|
||||
<code>int32</code>
|
||||
</td>
|
||||
<td>
|
||||
Score assigned to given utilization (y axis). Valid values are 0 to 10.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,281 @@
|
||||
---
|
||||
title: Kubelet Configuration (v1alpha1)
|
||||
content_type: tool-reference
|
||||
package: kubelet.config.k8s.io/v1alpha1
|
||||
auto_generated: true
|
||||
---
|
||||
|
||||
|
||||
## Resource Types
|
||||
|
||||
|
||||
- [CredentialProviderConfig](#kubelet-config-k8s-io-v1alpha1-CredentialProviderConfig)
|
||||
|
||||
|
||||
|
||||
## `FormatOptions` {#FormatOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
FormatOptions contains options for the different logging formats.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>json</code> <B>[Required]</B><br/>
|
||||
<a href="#JSONOptions"><code>JSONOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] JSON contains options for logging format "json".</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `JSONOptions` {#JSONOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [FormatOptions](#FormatOptions)
|
||||
|
||||
|
||||
JSONOptions contains options for logging format "json".
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>splitStream</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] SplitStream redirects error messages to stderr while
|
||||
info messages go to stdout, with buffering. The default is to write
|
||||
both to stdout, without buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue"><code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] InfoBufferSize sets the size of the info stream when
|
||||
using split streams. The default is zero, which disables buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `VModuleConfiguration` {#VModuleConfiguration}
|
||||
|
||||
(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
VModuleConfiguration is a collection of individual file names or patterns
|
||||
and the corresponding verbosity threshold.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `CredentialProviderConfig` {#kubelet-config-k8s-io-v1alpha1-CredentialProviderConfig}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CredentialProviderConfig is the configuration containing information about
|
||||
each exec credential provider. Kubelet reads this configuration from disk and enables
|
||||
each provider as specified by the CredentialProvider type.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubelet.config.k8s.io/v1alpha1</code></td></tr>
|
||||
<tr><td><code>kind</code><br/>string</td><td><code>CredentialProviderConfig</code></td></tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr><td><code>providers</code> <B>[Required]</B><br/>
|
||||
<a href="#kubelet-config-k8s-io-v1alpha1-CredentialProvider"><code>[]CredentialProvider</code></a>
|
||||
</td>
|
||||
<td>
|
||||
providers is a list of credential provider plugins that will be enabled by the kubelet.
|
||||
Multiple providers may match against a single image, in which case credentials
|
||||
from all providers will be returned to the kubelet. If multiple providers are called
|
||||
for a single image, the results are combined. If providers return overlapping
|
||||
auth keys, the value from the provider earlier in this list is used.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `CredentialProvider` {#kubelet-config-k8s-io-v1alpha1-CredentialProvider}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [CredentialProviderConfig](#kubelet-config-k8s-io-v1alpha1-CredentialProviderConfig)
|
||||
|
||||
|
||||
CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only
|
||||
invoked when an image being pulled matches the images handled by the plugin (see matchImages).
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
name is the required name of the credential provider. It must match the name of the
|
||||
provider executable as seen by the kubelet. The executable must be in the kubelet's
|
||||
bin directory (set by the --image-credential-provider-bin-dir flag).</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>matchImages</code> <B>[Required]</B><br/>
|
||||
<code>[]string</code>
|
||||
</td>
|
||||
<td>
|
||||
matchImages is a required list of strings used to match against images in order to
|
||||
determine if this provider should be invoked. If one of the strings matches the
|
||||
requested image from the kubelet, the plugin will be invoked and given a chance
|
||||
to provide credentials. Images are expected to contain the registry domain
|
||||
and URL path.
|
||||
|
||||
Each entry in matchImages is a pattern which can optionally contain a port and a path.
|
||||
Globs can be used in the domain, but not in the port or the path. Globs are supported
|
||||
as subdomains like '∗.k8s.io' or 'k8s.∗.io', and top-level-domains such as 'k8s.∗'.
|
||||
Matching partial subdomains like 'app∗.k8s.io' is also supported. Each glob can only match
|
||||
a single subdomain segment, so ∗.io does not match ∗.k8s.io.
|
||||
|
||||
A match exists between an image and a matchImage when all of the below are true:
|
||||
- Both contain the same number of domain parts and each part matches.
|
||||
- The URL path of an imageMatch must be a prefix of the target image URL path.
|
||||
- If the imageMatch contains a port, then the port must match in the image as well.
|
||||
|
||||
Example values of matchImages:
|
||||
- 123456789.dkr.ecr.us-east-1.amazonaws.com
|
||||
- ∗.azurecr.io
|
||||
- gcr.io
|
||||
- ∗.∗.registry.io
|
||||
- registry.io:8080/path</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>defaultCacheDuration</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
defaultCacheDuration is the default duration the plugin will cache credentials in-memory
|
||||
if a cache duration is not provided in the plugin response. This field is required.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>apiVersion</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse
|
||||
MUST use the same encoding version as the input. Current supported values are:
|
||||
- credentialprovider.kubelet.k8s.io/v1alpha1</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>args</code><br/>
|
||||
<code>[]string</code>
|
||||
</td>
|
||||
<td>
|
||||
Arguments to pass to the command when executing it.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>env</code><br/>
|
||||
<a href="#kubelet-config-k8s-io-v1alpha1-ExecEnvVar"><code>[]ExecEnvVar</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Env defines additional environment variables to expose to the process. These
|
||||
are unioned with the host's environment, as well as variables client-go uses
|
||||
to pass argument to the plugin.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ExecEnvVar` {#kubelet-config-k8s-io-v1alpha1-ExecEnvVar}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [CredentialProvider](#kubelet-config-k8s-io-v1alpha1-CredentialProvider)
|
||||
|
||||
|
||||
ExecEnvVar is used for setting environment variables when executing an exec-based
|
||||
credential plugin.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>name</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>value</code> <B>[Required]</B><br/>
|
||||
<code>string</code>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -14,6 +14,166 @@ auto_generated: true
|
||||
|
||||
|
||||
|
||||
## `FormatOptions` {#FormatOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
FormatOptions contains options for the different logging formats.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>json</code> <B>[Required]</B><br/>
|
||||
<a href="#JSONOptions"><code>JSONOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] JSON contains options for logging format "json".</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `JSONOptions` {#JSONOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [FormatOptions](#FormatOptions)
|
||||
|
||||
|
||||
JSONOptions contains options for logging format "json".
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>splitStream</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] SplitStream redirects error messages to stderr while
|
||||
info messages go to stdout, with buffering. The default is to write
|
||||
both to stdout, without buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue"><code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] InfoBufferSize sets the size of the info stream when
|
||||
using split streams. The default is zero, which disables buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `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>flushFrequency</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/time#Duration"><code>time.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Maximum number of seconds between log flushes. Ignored if the
|
||||
selected logging backend writes log messages without buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>verbosity</code> <B>[Required]</B><br/>
|
||||
<code>uint32</code>
|
||||
</td>
|
||||
<td>
|
||||
Verbosity is the threshold that determines which log messages are
|
||||
logged. Default is zero which logs only the most important
|
||||
messages. Higher values enable additional messages. Error messages
|
||||
are always logged.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>vmodule</code> <B>[Required]</B><br/>
|
||||
<a href="#VModuleConfiguration"><code>VModuleConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
VModule overrides the verbosity threshold for individual files.
|
||||
Only supported for "text" log format.</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>
|
||||
|
||||
|
||||
<tr><td><code>options</code> <B>[Required]</B><br/>
|
||||
<a href="#FormatOptions"><code>FormatOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] Options holds additional parameters that are specific
|
||||
to the different logging formats. Only the options for the selected
|
||||
format get used, but all of them get validated.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `VModuleConfiguration` {#VModuleConfiguration}
|
||||
|
||||
(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
VModuleConfiguration is a collection of individual file names or patterns
|
||||
and the corresponding verbosity threshold.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `KubeletConfiguration` {#kubelet-config-k8s-io-v1beta1-KubeletConfiguration}
|
||||
|
||||
@@ -1517,7 +1677,7 @@ Default: 0.8</td>
|
||||
|
||||
|
||||
<tr><td><code>registerWithTaints</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#taint-v1-core"><code>[]core/v1.Taint</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#taint-v1-core"><code>[]core/v1.Taint</code></a>
|
||||
</td>
|
||||
<td>
|
||||
registerWithTaints are an array of taints to add to a node object when
|
||||
@@ -1538,8 +1698,6 @@ Default: true</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `SerializedNodeConfigSource` {#kubelet-config-k8s-io-v1beta1-SerializedNodeConfigSource}
|
||||
|
||||
@@ -1562,7 +1720,7 @@ It exists in the kubeletconfig API group because it is classified as a versioned
|
||||
|
||||
|
||||
<tr><td><code>source</code><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#nodeconfigsource-v1-core"><code>core/v1.NodeConfigSource</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#nodeconfigsource-v1-core"><code>core/v1.NodeConfigSource</code></a>
|
||||
</td>
|
||||
<td>
|
||||
source is the source that we are serializing.</td>
|
||||
@@ -1571,21 +1729,6 @@ It exists in the kubeletconfig API group because it is classified as a versioned
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `HairpinMode` {#kubelet-config-k8s-io-v1beta1-HairpinMode}
|
||||
|
||||
(Alias of `string`)
|
||||
|
||||
|
||||
|
||||
HairpinMode denotes how the kubelet should configure networking to handle
|
||||
hairpin packets.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `KubeletAnonymousAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletAnonymousAuthentication}
|
||||
|
||||
@@ -1593,7 +1736,6 @@ hairpin packets.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication)
|
||||
|
||||
|
||||
@@ -1619,8 +1761,6 @@ Anonymous requests have a username of `system:anonymous`, and a group name of
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeletAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletAuthentication}
|
||||
|
||||
@@ -1628,7 +1768,6 @@ Anonymous requests have a username of `system:anonymous`, and a group name of
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1666,8 +1805,6 @@ Anonymous requests have a username of `system:anonymous`, and a group name of
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeletAuthorization` {#kubelet-config-k8s-io-v1beta1-KubeletAuthorization}
|
||||
|
||||
@@ -1675,7 +1812,6 @@ Anonymous requests have a username of `system:anonymous`, and a group name of
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1707,8 +1843,6 @@ Webhook mode uses the SubjectAccessReview API to determine authorization.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeletAuthorizationMode` {#kubelet-config-k8s-io-v1beta1-KubeletAuthorizationMode}
|
||||
|
||||
@@ -1716,15 +1850,12 @@ Webhook mode uses the SubjectAccessReview API to determine authorization.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletAuthorization](#kubelet-config-k8s-io-v1beta1-KubeletAuthorization)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `KubeletWebhookAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletWebhookAuthentication}
|
||||
|
||||
@@ -1732,7 +1863,6 @@ Webhook mode uses the SubjectAccessReview API to determine authorization.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication)
|
||||
|
||||
|
||||
@@ -1763,8 +1893,6 @@ tokenreviews.authentication.k8s.io API.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeletWebhookAuthorization` {#kubelet-config-k8s-io-v1beta1-KubeletWebhookAuthorization}
|
||||
|
||||
@@ -1772,7 +1900,6 @@ tokenreviews.authentication.k8s.io API.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletAuthorization](#kubelet-config-k8s-io-v1beta1-KubeletAuthorization)
|
||||
|
||||
|
||||
@@ -1804,8 +1931,6 @@ the webhook authorizer.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `KubeletX509Authentication` {#kubelet-config-k8s-io-v1beta1-KubeletX509Authentication}
|
||||
|
||||
@@ -1813,7 +1938,6 @@ the webhook authorizer.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletAuthentication](#kubelet-config-k8s-io-v1beta1-KubeletAuthentication)
|
||||
|
||||
|
||||
@@ -1838,8 +1962,6 @@ and groups corresponding to the Organization in the client certificate.</td>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `MemoryReservation` {#kubelet-config-k8s-io-v1beta1-MemoryReservation}
|
||||
|
||||
@@ -1847,7 +1969,6 @@ and groups corresponding to the Organization in the client certificate.</td>
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1869,7 +1990,7 @@ MemoryReservation specifies the memory reservation of different types for each N
|
||||
|
||||
|
||||
<tr><td><code>limits</code> <B>[Required]</B><br/>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#resourcelist-v1-core"><code>core/v1.ResourceList</code></a>
|
||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcelist-v1-core"><code>core/v1.ResourceList</code></a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted">No description provided.</span>
|
||||
@@ -1879,8 +2000,6 @@ MemoryReservation specifies the memory reservation of different types for each N
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `MemorySwapConfiguration` {#kubelet-config-k8s-io-v1beta1-MemorySwapConfiguration}
|
||||
|
||||
@@ -1888,7 +2007,6 @@ MemoryReservation specifies the memory reservation of different types for each N
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1912,8 +2030,6 @@ MemoryReservation specifies the memory reservation of different types for each N
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
## `ResourceChangeDetectionStrategy` {#kubelet-config-k8s-io-v1beta1-ResourceChangeDetectionStrategy}
|
||||
|
||||
@@ -1921,7 +2037,6 @@ MemoryReservation specifies the memory reservation of different types for each N
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1929,8 +2044,6 @@ ResourceChangeDetectionStrategy denotes a mode in which internal
|
||||
managers (secret, configmap) are discovering object changes.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `ShutdownGracePeriodByPodPriority` {#kubelet-config-k8s-io-v1beta1-ShutdownGracePeriodByPodPriority}
|
||||
|
||||
@@ -1938,7 +2051,6 @@ managers (secret, configmap) are discovering object changes.
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
||||
|
||||
|
||||
@@ -1968,170 +2080,4 @@ ShutdownGracePeriodByPodPriority specifies the shutdown grace period for Pods ba
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## `FormatOptions` {#FormatOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
FormatOptions contains options for the different logging formats.
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>json</code> <B>[Required]</B><br/>
|
||||
<a href="#JSONOptions"><code>JSONOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] JSON contains options for logging format "json".</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `JSONOptions` {#JSONOptions}
|
||||
|
||||
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [FormatOptions](#FormatOptions)
|
||||
|
||||
|
||||
JSONOptions contains options for logging format "json".
|
||||
|
||||
<table class="table">
|
||||
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<tr><td><code>splitStream</code> <B>[Required]</B><br/>
|
||||
<code>bool</code>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] SplitStream redirects error messages to stderr while
|
||||
info messages go to stdout, with buffering. The default is to write
|
||||
both to stdout, without buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
||||
<code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] InfoBufferSize sets the size of the info stream when
|
||||
using split streams. The default is zero, which disables buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `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>flushFrequency</code> <B>[Required]</B><br/>
|
||||
<a href="https://godoc.org/time#Duration"><code>time.Duration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
Maximum number of seconds between log flushes. Ignored if the
|
||||
selected logging backend writes log messages without buffering.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>verbosity</code> <B>[Required]</B><br/>
|
||||
<code>uint32</code>
|
||||
</td>
|
||||
<td>
|
||||
Verbosity is the threshold that determines which log messages are
|
||||
logged. Default is zero which logs only the most important
|
||||
messages. Higher values enable additional messages. Error messages
|
||||
are always logged.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td><code>vmodule</code> <B>[Required]</B><br/>
|
||||
<a href="#VModuleConfiguration"><code>VModuleConfiguration</code></a>
|
||||
</td>
|
||||
<td>
|
||||
VModule overrides the verbosity threshold for individual files.
|
||||
Only supported for "text" log format.</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>
|
||||
|
||||
|
||||
<tr><td><code>options</code> <B>[Required]</B><br/>
|
||||
<a href="#FormatOptions"><code>FormatOptions</code></a>
|
||||
</td>
|
||||
<td>
|
||||
[Experimental] Options holds additional parameters that are specific
|
||||
to the different logging formats. Only the options for the selected
|
||||
format get used, but all of them get validated.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## `VModuleConfiguration` {#VModuleConfiguration}
|
||||
|
||||
(Alias of `[]k8s.io/component-base/config/v1alpha1.VModuleItem`)
|
||||
|
||||
|
||||
**Appears in:**
|
||||
|
||||
- [LoggingConfiguration](#LoggingConfiguration)
|
||||
|
||||
|
||||
VModuleConfiguration is a collection of individual file names or patterns
|
||||
and the corresponding verbosity threshold.
|
||||
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@ This scheduling policy is not supported since Kubernetes v1.23. Associated flags
|
||||
* Learn about [scheduling](/docs/concepts/scheduling-eviction/kube-scheduler/)
|
||||
* Learn about [kube-scheduler Configuration](/docs/reference/scheduling/config/)
|
||||
* Read the [kube-scheduler configuration reference (v1beta3)](/docs/reference/config-api/kube-scheduler-config.v1beta3/)
|
||||
* Read the [kube-scheduler Policy reference (v1)](/docs/reference/config-api/kube-scheduler-policy-config.v1/)
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ kubeadm config images list [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ kubeadm config images pull [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -138,7 +138,7 @@ kubeadm init [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ kubeadm init phase addon all [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ kubeadm init phase addon coredns [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ kubeadm init phase control-plane all [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ kubeadm init phase control-plane apiserver [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -157,6 +157,13 @@ kubeadm join [api-server-endpoint] [flags]
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>For token-based discovery, allow joining without --discovery-token-ca-cert-hash pinning.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">--dry-run</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Don't apply any changes; just output what would be done.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">-h, --help</td>
|
||||
</tr>
|
||||
|
||||
@@ -19,10 +19,9 @@ Performs a best effort revert of changes made to this host by 'kubeadm init' or
|
||||
|
||||
The "reset" command executes the following phases:
|
||||
```
|
||||
preflight Run reset pre-flight checks
|
||||
update-cluster-status Remove this node from the ClusterStatus object (DEPRECATED).
|
||||
remove-etcd-member Remove a local etcd member.
|
||||
cleanup-node Run cleanup node.
|
||||
preflight Run reset pre-flight checks
|
||||
remove-etcd-member Remove a local etcd member.
|
||||
cleanup-node Run cleanup node.
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ kubeadm upgrade apply [version]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -55,7 +55,7 @@ kubeadm upgrade plan [version] [flags]
|
||||
<td colspan="2">--feature-gates string</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (BETA - default=true)<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)</p></td>
|
||||
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>A set of key=value pairs that describe feature gates for various features. Options are:<br/>PublicKeysECDSA=true|false (ALPHA - default=false)<br/>RootlessControlPlane=true|false (ALPHA - default=false)<br/>UnversionedKubeletConfigMap=true|false (ALPHA - default=false)</p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -67,6 +67,7 @@ their authors, not the Kubernetes team.
|
||||
| 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/fiaas/k8s](https://github.com/fiaas/k8s) |
|
||||
| Python | [github.com/gtsystem/lightkube](https://github.com/gtsystem/lightkube) |
|
||||
| Python | [github.com/mnubo/kubernetes-py](https://github.com/mnubo/kubernetes-py) |
|
||||
| Python | [github.com/tomplus/kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio) |
|
||||
| Python | [github.com/Frankkkkk/pykorm](https://github.com/Frankkkkk/pykorm) |
|
||||
|
||||
@@ -24,6 +24,14 @@ deprecated API versions to newer and more stable API versions.
|
||||
|
||||
The **v1.26** release will stop serving the following deprecated API versions:
|
||||
|
||||
#### Flow control resources {#flowcontrol-resources-v126}
|
||||
|
||||
The **flowcontrol.apiserver.k8s.io/v1beta1** API version of FlowSchema and PriorityLevelConfiguration will no longer be served in v1.26.
|
||||
|
||||
* Migrate manifests and API clients to use the **flowcontrol.apiserver.k8s.io/v1beta2** API version, available since v1.23.
|
||||
* All existing persisted objects are accessible via the new API
|
||||
* No notable changes
|
||||
|
||||
#### HorizontalPodAutoscaler {#horizontalpodautoscaler-v126}
|
||||
|
||||
The **autoscaling/v2beta2** API version of HorizontalPodAutoscaler will no longer be served in v1.26.
|
||||
|
||||
@@ -77,7 +77,7 @@ Required certificates:
|
||||
|
||||
| Default CN | Parent CA | O (in Subject) | kind | hosts (SAN) |
|
||||
|-------------------------------|---------------------------|----------------|----------------------------------------|---------------------------------------------|
|
||||
| kube-etcd | etcd-ca | | server, client | `localhost`, `127.0.0.1` |
|
||||
| kube-etcd | etcd-ca | | server, client | `<hostname>`, `<Host_IP>`, `localhost`, `127.0.0.1` |
|
||||
| kube-etcd-peer | etcd-ca | | server, client | `<hostname>`, `<Host_IP>`, `localhost`, `127.0.0.1` |
|
||||
| kube-etcd-healthcheck-client | etcd-ca | | client | |
|
||||
| kube-apiserver-etcd-client | etcd-ca | system:masters | client | |
|
||||
|
||||
@@ -43,7 +43,9 @@ similar to the following example:
|
||||
kubeadm init --pod-network-cidr=10.244.0.0/16,2001:db8:42:0::/56 --service-cidr=10.96.0.0/16,2001:db8:42:1::/112
|
||||
```
|
||||
|
||||
To make things clearer, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for the primary dual-stack control plane node.
|
||||
To make things clearer, here is an example kubeadm
|
||||
[configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/)
|
||||
`kubeadm-config.yaml` for the primary dual-stack control plane node.
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -81,7 +83,8 @@ The `--apiserver-advertise-address` flag does not support dual-stack.
|
||||
|
||||
Before joining a node, make sure that the node has IPv6 routable network interface and allows IPv6 forwarding.
|
||||
|
||||
Here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for joining a worker node to the cluster.
|
||||
Here is an example kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/)
|
||||
`kubeadm-config.yaml` for joining a worker node to the cluster.
|
||||
|
||||
```yaml
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
@@ -98,7 +101,9 @@ nodeRegistration:
|
||||
node-ip: 10.100.0.3,fd00:1:2:3::3
|
||||
```
|
||||
|
||||
Also, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for joining another control plane node to the cluster.
|
||||
Also, here is an example kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/)
|
||||
`kubeadm-config.yaml` for joining another control plane node to the cluster.
|
||||
|
||||
```yaml
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
kind: JoinConfiguration
|
||||
@@ -132,7 +137,9 @@ Dual-stack support doesn't mean that you need to use dual-stack addressing.
|
||||
You can deploy a single-stack cluster that has the dual-stack networking feature enabled.
|
||||
{{< /note >}}
|
||||
|
||||
To make things more clear, here is an example kubeadm [configuration file](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3) `kubeadm-config.yaml` for the single-stack control plane node.
|
||||
To make things more clear, here is an example kubeadm
|
||||
[configuration file](/docs/reference/config-api/kubeadm-config.v1beta3/)
|
||||
`kubeadm-config.yaml` for the single-stack control plane node.
|
||||
|
||||
```yaml
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
|
||||
@@ -612,12 +612,12 @@ network port spaces). Kubernetes uses pause containers to allow for worker conta
|
||||
crashing or restarting without losing any of the networking configuration.
|
||||
|
||||
Kubernetes maintains a multi-architecture image that includes support for Windows.
|
||||
For Kubernetes v1.22 the recommended pause image is `k8s.gcr.io/pause:3.5`.
|
||||
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.5`.
|
||||
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
|
||||
@@ -661,14 +661,15 @@ On Windows nodes, strict compatibility rules apply where the host OS version mus
|
||||
match the container base image OS version. Only Windows containers with a container
|
||||
operating system of Windows Server 2019 are fully supported.
|
||||
|
||||
For Kubernetes v1.22, operating system compatibility for Windows nodes (and Pods)
|
||||
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 2004, Windows Server version 20H2
|
||||
: Windows Server version 20H2
|
||||
|
||||
The Kubernetes [version-skew policy](/docs/setup/release/version-skew-policy/) also applies.
|
||||
|
||||
@@ -774,9 +775,9 @@ SIG Windows [contributing guide on gathering logs](https://github.com/kubernetes
|
||||
nssm start flanneld
|
||||
|
||||
# Register kubelet.exe
|
||||
# Microsoft releases the pause infrastructure container at mcr.microsoft.com/oss/kubernetes/pause:1.4.1
|
||||
# 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=<hostname> --v=6 --pod-infra-container-image=mcr.microsoft.com/oss/kubernetes/pause:1.4.1 --resolv-conf="" --allow-privileged=true --enable-debugging-handlers --cluster-dns=<DNS-service-IP> --cluster-domain=cluster.local --kubeconfig=c:\k\config --hairpin-mode=promiscuous-bridge --image-pull-progress-deadline=20m --cgroups-per-qos=false --log-dir=<log directory> --logtostderr=false --enforce-node-allocatable="" --network-plugin=cni --cni-bin-dir=c:\k\cni --cni-conf-dir=c:\k\cni\config
|
||||
nssm set kubelet AppParameters --hostname-override=<hostname> --v=6 --pod-infra-container-image=mcr.microsoft.com/oss/kubernetes/pause:3.6 --resolv-conf="" --allow-privileged=true --enable-debugging-handlers --cluster-dns=<DNS-service-IP> --cluster-domain=cluster.local --kubeconfig=c:\k\config --hairpin-mode=promiscuous-bridge --image-pull-progress-deadline=20m --cgroups-per-qos=false --log-dir=<log directory> --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
|
||||
|
||||
@@ -922,7 +923,7 @@ SIG Windows [contributing guide on gathering logs](https://github.com/kubernetes
|
||||
|
||||
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:1.4.1`. Be sure to use a supported version of Kubernetes.
|
||||
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
|
||||
|
||||
@@ -214,7 +214,7 @@ In each case, the credentials of the pod are used to communicate securely with t
|
||||
|
||||
## Accessing services running on the cluster
|
||||
|
||||
The previous section describes how to connect to the Kubernetes API server. For information about connecting to other services running on a Kubernetes cluster, see [Access Cluster Services.](/docs/tasks/access-application-cluster/access-cluster/)
|
||||
The previous section describes how to connect to the Kubernetes API server. For information about connecting to other services running on a Kubernetes cluster, see [Access Cluster Services.](/docs/tasks/administer-cluster/access-cluster-services/)
|
||||
|
||||
## Requesting redirects
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ allocated resources, events and pods running on the node.
|
||||
|
||||
Shows all applications running in the selected namespace.
|
||||
The view lists applications by workload kind (for example: Deployments, ReplicaSets, StatefulSets).
|
||||
and each workload kind can be viewed separately.
|
||||
Each workload kind can be viewed separately.
|
||||
The lists summarize actionable information about the workloads,
|
||||
such as the number of ready pods for a ReplicaSet or current memory usage for a Pod.
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ the node identity with an out of band mechanism.
|
||||
{{% thirdparty-content %}}
|
||||
|
||||
Third party custom controllers can be used:
|
||||
- [kubelet-rubber-stamp](https://github.com/kontena/kubelet-rubber-stamp)
|
||||
- [kubelet-csr-approver](https://github.com/postfinance/kubelet-csr-approver)
|
||||
|
||||
Such a controller is not a secure mechanism unless it not only verifies the CommonName
|
||||
in the CSR but also verifies the requested IPs and domain names. This would prevent
|
||||
|
||||
@@ -1,390 +1,478 @@
|
||||
---
|
||||
title: Utilizing the NUMA-aware Memory Manager
|
||||
|
||||
reviewers:
|
||||
- klueska
|
||||
- derekwaynecarr
|
||||
|
||||
content_type: task
|
||||
min-kubernetes-server-version: v1.21
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
{{< feature-state state="beta" for_k8s_version="v1.22" >}}
|
||||
|
||||
The Kubernetes *Memory Manager* enables the feature of guaranteed memory (and hugepages) allocation for pods in the `Guaranteed` {{< glossary_tooltip text="QoS class" term_id="qos-class" >}}.
|
||||
|
||||
The Memory Manager employs hint generation protocol to yield the most suitable NUMA affinity for a pod. The Memory Manager feeds the central manager (*Topology Manager*) with these affinity hints. Based on both the hints and Topology Manager policy, the pod is rejected or admitted to the node.
|
||||
|
||||
Moreover, the Memory Manager ensures that the memory which a pod requests is allocated from a minimum number of NUMA nodes.
|
||||
|
||||
The Memory Manager is only pertinent to Linux based hosts.
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
To align memory resources with other requested resources in a Pod Spec:
|
||||
- the CPU Manager should be enabled and proper CPU Manager policy should be configured on a Node. See [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/);
|
||||
- the Topology Manager should be enabled and proper Topology Manager policy should be configured on a Node. See [control Topology Management Policies](/docs/tasks/administer-cluster/topology-manager/).
|
||||
|
||||
Starting from v1.22, the Memory Manager is enabled by default through `MemoryManager` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
|
||||
|
||||
Preceding v1.22, the `kubelet` must be started with the following flag:
|
||||
|
||||
`--feature-gates=MemoryManager=true`
|
||||
|
||||
in order to enable the Memory Manager feature.
|
||||
|
||||
## How Memory Manager Operates?
|
||||
|
||||
The Memory Manager currently offers the guaranteed memory (and hugepages) allocation for Pods in Guaranteed QoS class. To immediately put the Memory Manager into operation follow the guidelines in the section [Memory Manager configuration](#memory-manager-configuration), and subsequently, prepare and deploy a `Guaranteed` pod as illustrated in the section [Placing a Pod in the Guaranteed QoS class](#placing-a-pod-in-the-guaranteed-qos-class).
|
||||
|
||||
The Memory Manager is a Hint Provider, and it provides topology hints for the Topology Manager which then aligns the requested resources according to these topology hints. It also enforces `cgroups` (i.e. `cpuset.mems`) for pods. The complete flow diagram concerning pod admission and deployment process is illustrated in [Memory Manager KEP: Design Overview][4] and below:
|
||||
|
||||

|
||||
|
||||
During this process, the Memory Manager updates its internal counters stored in [Node Map and Memory Maps][2] to manage guaranteed memory allocation.
|
||||
|
||||
The Memory Manager updates the Node Map during the startup and runtime as follows.
|
||||
|
||||
### Startup
|
||||
|
||||
This occurs once a node administrator employs `--reserved-memory` (section [Reserved memory flag](#reserved-memory-flag)). In this case, the Node Map becomes updated to reflect this reservation as illustrated in [Memory Manager KEP: Memory Maps at start-up (with examples)][5].
|
||||
|
||||
The administrator must provide `--reserved-memory` flag when `Static` policy is configured.
|
||||
|
||||
### Runtime
|
||||
|
||||
Reference [Memory Manager KEP: Memory Maps at runtime (with examples)][6] illustrates how a successful pod deployment affects the Node Map, and it also relates to how potential Out-of-Memory (OOM) situations are handled further by Kubernetes or operating system.
|
||||
|
||||
Important topic in the context of Memory Manager operation is the management of NUMA groups. Each time pod's memory request is in excess of single NUMA node capacity, the Memory Manager attempts to create a group that comprises several NUMA nodes and features extend memory capacity. The problem has been solved as elaborated in [Memory Manager KEP: How to enable the guaranteed memory allocation over many NUMA nodes?][3]. Also, reference [Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1] illustrates how the management of groups occurs.
|
||||
|
||||
## Memory Manager configuration
|
||||
|
||||
Other Managers should be first pre-configured (section [Pre-configuration](#pre-configuration)). Next, the Memory Manger feature should be enabled (section [Enable the Memory Manager feature](#enable-the-memory-manager-feature)) and be run with `Static` policy (section [Static policy](#static-policy)). Optionally, some amount of memory can be reserved for system or kubelet processes to increase node stability (section [Reserved memory flag](#reserved-memory-flag)).
|
||||
|
||||
### Policies
|
||||
|
||||
Memory Manager supports two policies. You can select a policy via a `kubelet` flag `--memory-manager-policy`.
|
||||
|
||||
Two policies can be selected:
|
||||
|
||||
* `None` (default)
|
||||
* `Static`
|
||||
|
||||
#### None policy {#policy-none}
|
||||
|
||||
This is the default policy and does not affect the memory allocation in any way.
|
||||
It acts the same as if the Memory Manager is not present at all.
|
||||
|
||||
The `None` policy returns default topology hint. This special hint denotes that Hint Provider (Memory Manger in this case) has no preference for NUMA affinity with any resource.
|
||||
|
||||
#### Static policy {#policy-static}
|
||||
|
||||
In the case of the `Guaranteed` pod, the `Static` Memory Manger policy returns topology hints relating to the set of NUMA nodes where the memory can be guaranteed, and reserves the memory through updating the internal [NodeMap][2] object.
|
||||
|
||||
In the case of the `BestEffort` or `Burstable` pod, the `Static` Memory Manager policy sends back the default topology hint as there is no request for the guaranteed memory, and does not reserve the memory in the internal [NodeMap][2] object.
|
||||
|
||||
### Reserved memory flag
|
||||
|
||||
The [Node Allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/) mechanism is commonly used by node administrators to reserve K8S node system resources for the kubelet or operating system processes in order to enhance the node stability. A dedicated set of flags can be used for this purpose to set the total amount of reserved memory for a node. This pre-configured value is subsequently utilized to calculate the real amount of node's "allocatable" memory available to pods.
|
||||
|
||||
The Kubernetes scheduler incorporates "allocatable" to optimise pod scheduling process. The foregoing flags include `--kube-reserved`, `--system-reserved` and `--eviction-threshold`. The sum of their values will account for the total amount of reserved memory.
|
||||
|
||||
|
||||
A new `--reserved-memory` flag was added to Memory Manager to allow for this total reserved memory to be split (by a node administrator) and accordingly reserved across many NUMA nodes.
|
||||
|
||||
The flag specifies a comma-separated list of memory reservations per NUMA node.
|
||||
This parameter is only useful in the context of the Memory Manager feature.
|
||||
The Memory Manager will not use this reserved memory for the allocation of container workloads.
|
||||
|
||||
For example, if you have a NUMA node "NUMA0" with `10Gi` of memory available, and the `--reserved-memory` was specified to reserve `1Gi` of memory at "NUMA0", the Memory Manager assumes that only `9Gi` is available for containers.
|
||||
|
||||
You can omit this parameter, however, you should be aware that the quantity of reserved memory from all NUMA nodes should be equal to the quantity of memory specified by the [Node Allocatable feature](/docs/tasks/administer-cluster/reserve-compute-resources/). If at least one node allocatable parameter is non-zero, you will need to specify `--reserved-memory` for at least one NUMA node. In fact, `eviction-hard` threshold value is equal to `100Mi` by default, so if `Static` policy is used, `--reserved-memory` is obligatory.
|
||||
|
||||
Also, avoid the following configurations:
|
||||
1. duplicates, i.e. the same NUMA node or memory type, but with a different value;
|
||||
2. setting zero limit for any of memory types;
|
||||
3. NUMA node IDs that do not exist in the machine hardware;
|
||||
4. memory type names different than `memory` or `hugepages-<size>` (hugepages of particular `<size>` should also exist).
|
||||
|
||||
Syntax:
|
||||
|
||||
`--reserved-memory N:memory-type1=value1,memory-type2=value2,...`
|
||||
* `N` (integer) - NUMA node index, e.g. `0`
|
||||
* `memory-type` (string) - represents memory type:
|
||||
* `memory` - conventional memory
|
||||
* `hugepages-2Mi` or `hugepages-1Gi` - hugepages
|
||||
* `value` (string) - the quantity of reserved memory, e.g. `1Gi`
|
||||
|
||||
Example usage:
|
||||
|
||||
`--reserved-memory 0:memory=1Gi,hugepages-1Gi=2Gi`
|
||||
|
||||
or
|
||||
|
||||
`--reserved-memory 0:memory=1Gi --reserved-memory 1:memory=2Gi`
|
||||
|
||||
When you specify values for `--reserved-memory` flag, you must comply with the setting that you prior provided via Node Allocatable Feature flags. That is, the following rule must be obeyed for each memory type:
|
||||
|
||||
`sum(reserved-memory(i)) = kube-reserved + system-reserved + eviction-threshold`,
|
||||
|
||||
where `i` is an index of a NUMA node.
|
||||
|
||||
If you do not follow the formula above, the Memory Manager will show an error on startup.
|
||||
|
||||
In other words, the example above illustrates that for the conventional memory (`type=memory`), we reserve `3Gi` in total, i.e.:
|
||||
|
||||
`sum(reserved-memory(i)) = reserved-memory(0) + reserved-memory(1) = 1Gi + 2Gi = 3Gi`
|
||||
|
||||
An example of kubelet command-line arguments relevant to the node Allocatable configuration:
|
||||
* `--kube-reserved=cpu=500m,memory=50Mi`
|
||||
* `--system-reserved=cpu=123m,memory=333Mi`
|
||||
* `--eviction-hard=memory.available<500Mi`
|
||||
|
||||
{{< note >}}
|
||||
The default hard eviction threshold is 100MiB, and **not** zero. Remember to increase the quantity of memory that you reserve by setting `--reserved-memory` by that hard eviction threshold. Otherwise, the kubelet will not start Memory Manager and display an error.
|
||||
{{< /note >}}
|
||||
|
||||
Here is an example of a correct configuration:
|
||||
|
||||
```shell
|
||||
--feature-gates=MemoryManager=true
|
||||
--kube-reserved=cpu=4,memory=4Gi
|
||||
--system-reserved=cpu=1,memory=1Gi
|
||||
--memory-manager-policy=Static
|
||||
--reserved-memory 0:memory=3Gi --reserved-memory 1:memory=2148Mi
|
||||
```
|
||||
Let us validate the configuration above:
|
||||
1. `kube-reserved + system-reserved + eviction-hard(default) = reserved-memory(0) + reserved-memory(1)`
|
||||
2. `4GiB + 1GiB + 100MiB = 3GiB + 2148MiB`
|
||||
3. `5120MiB + 100MiB = 3072MiB + 2148MiB`
|
||||
4. `5220MiB = 5220MiB` (which is correct)
|
||||
|
||||
## Placing a Pod in the Guaranteed QoS class
|
||||
|
||||
If the selected policy is anything other than `None`, the Memory Manager identifies pods that are in the `Guaranteed` QoS class. The Memory Manager provides specific topology hints to the Topology Manager for each `Guaranteed` pod. For pods in a QoS class other than `Guaranteed`, the Memory Manager provides default topology hints to the Topology Manager.
|
||||
|
||||
The following excerpts from pod manifests assign a pod to the `Guaranteed` QoS class.
|
||||
|
||||
Pod with integer CPU(s) runs in the `Guaranteed` QoS class, when `requests` are equal to `limits`:
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
resources:
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "2"
|
||||
example.com/device: "1"
|
||||
requests:
|
||||
memory: "200Mi"
|
||||
cpu: "2"
|
||||
example.com/device: "1"
|
||||
```
|
||||
|
||||
Also, a pod sharing CPU(s) runs in the `Guaranteed` QoS class, when `requests` are equal to `limits`.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
resources:
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "300m"
|
||||
example.com/device: "1"
|
||||
requests:
|
||||
memory: "200Mi"
|
||||
cpu: "300m"
|
||||
example.com/device: "1"
|
||||
```
|
||||
|
||||
Notice that both CPU and memory requests must be specified for a Pod to lend it to Guaranteed QoS class.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following means can be used to troubleshoot the reason why a pod could not be deployed or became rejected at a node:
|
||||
- pod status - indicates topology affinity errors
|
||||
- system logs - include valuable information for debugging, e.g., about generated hints
|
||||
- state file - the dump of internal state of the Memory Manager (includes [Node Map and Memory Maps][2])
|
||||
- starting from v1.22, the [device plugin resource API](#device-plugin-resource-api) can be used
|
||||
to retrieve information about the memory reserved for containers
|
||||
|
||||
|
||||
|
||||
### Pod status (TopologyAffinityError) {#TopologyAffinityError}
|
||||
|
||||
This error typically occurs in the following situations:
|
||||
* a node has not enough resources available to satisfy the pod's request
|
||||
* the pod's request is rejected due to particular Topology Manager policy constraints
|
||||
|
||||
The error appears in the status of a pod:
|
||||
```shell
|
||||
# kubectl get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
guaranteed 0/1 TopologyAffinityError 0 113s
|
||||
```
|
||||
|
||||
Use `kubectl describe pod <id>` or `kubectl get events` to obtain detailed error message:
|
||||
```shell
|
||||
Warning TopologyAffinityError 10m kubelet, dell8 Resources cannot be allocated with Topology locality
|
||||
```
|
||||
|
||||
### System logs
|
||||
|
||||
Search system logs with respect to a particular pod.
|
||||
|
||||
The set of hints that Memory Manager generated for the pod can be found in the logs.
|
||||
Also, the set of hints generated by CPU Manager should be present in the logs.
|
||||
|
||||
Topology Manager merges these hints to calculate a single best hint.
|
||||
The best hint should be also present in the logs.
|
||||
|
||||
The best hint indicates where to allocate all the resources. Topology Manager tests this hint against its current policy, and based on the verdict, it either admits the pod to the node or rejects it.
|
||||
|
||||
Also, search the logs for occurrences associated with the Memory Manager, e.g. to find out information about `cgroups` and `cpuset.mems` updates.
|
||||
|
||||
### Examine the memory manager state on a node
|
||||
|
||||
Let us first deploy a sample `Guaranteed` pod whose specification is as follows:
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: guaranteed
|
||||
spec:
|
||||
containers:
|
||||
- name: guaranteed
|
||||
image: consumer
|
||||
imagePullPolicy: Never
|
||||
resources:
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 150Gi
|
||||
requests:
|
||||
cpu: "2"
|
||||
memory: 150Gi
|
||||
command: ["sleep","infinity"]
|
||||
```
|
||||
|
||||
Next, let us log into the node where it was deployed and examine the state file in `/var/lib/kubelet/memory_manager_state`:
|
||||
```json
|
||||
{
|
||||
"policyName":"Static",
|
||||
"machineState":{
|
||||
"0":{
|
||||
"numberOfAssignments":1,
|
||||
"memoryMap":{
|
||||
"hugepages-1Gi":{
|
||||
"total":0,
|
||||
"systemReserved":0,
|
||||
"allocatable":0,
|
||||
"reserved":0,
|
||||
"free":0
|
||||
},
|
||||
"memory":{
|
||||
"total":134987354112,
|
||||
"systemReserved":3221225472,
|
||||
"allocatable":131766128640,
|
||||
"reserved":131766128640,
|
||||
"free":0
|
||||
}
|
||||
},
|
||||
"nodes":[
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"1":{
|
||||
"numberOfAssignments":1,
|
||||
"memoryMap":{
|
||||
"hugepages-1Gi":{
|
||||
"total":0,
|
||||
"systemReserved":0,
|
||||
"allocatable":0,
|
||||
"reserved":0,
|
||||
"free":0
|
||||
},
|
||||
"memory":{
|
||||
"total":135286722560,
|
||||
"systemReserved":2252341248,
|
||||
"allocatable":133034381312,
|
||||
"reserved":29295144960,
|
||||
"free":103739236352
|
||||
}
|
||||
},
|
||||
"nodes":[
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"entries":{
|
||||
"fa9bdd38-6df9-4cf9-aa67-8c4814da37a8":{
|
||||
"guaranteed":[
|
||||
{
|
||||
"numaAffinity":[
|
||||
0,
|
||||
1
|
||||
],
|
||||
"type":"memory",
|
||||
"size":161061273600
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"checksum":4142013182
|
||||
}
|
||||
```
|
||||
|
||||
It can be deduced from the state file that the pod was pinned to both NUMA nodes, i.e.:
|
||||
|
||||
```json
|
||||
"numaAffinity":[
|
||||
0,
|
||||
1
|
||||
],
|
||||
```
|
||||
|
||||
Pinned term means that pod's memory consumption is constrained (through `cgroups` configuration) to these NUMA nodes.
|
||||
|
||||
This automatically implies that Memory Manager instantiated a new group that comprises these two NUMA nodes, i.e. `0` and `1` indexed NUMA nodes.
|
||||
|
||||
Notice that the management of groups is handled in a relatively complex manner, and further elaboration is provided in Memory Manager KEP in [this][1] and [this][3] sections.
|
||||
|
||||
In order to analyse memory resources available in a group, the corresponding entries from NUMA nodes belonging to the group must be added up.
|
||||
|
||||
For example, the total amount of free "conventional" memory in the group can be computed by adding up the free memory available at every NUMA node in the group, i.e., in the `"memory"` section of NUMA node `0` (`"free":0`) and NUMA node `1` (`"free":103739236352`). So, the total amount of free "conventional" memory in this group is equal to `0 + 103739236352` bytes.
|
||||
|
||||
The line `"systemReserved":3221225472` indicates that the administrator of this node reserved `3221225472` bytes (i.e. `3Gi`) to serve kubelet and system processes at NUMA node `0`, by using `--reserved-memory` flag.
|
||||
|
||||
### Device plugin resource API
|
||||
|
||||
By employing the [API](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/), the information about reserved memory for each container can be retrieved, which is contained in protobuf `ContainerMemory` message. This information can be retrieved solely for pods in Guaranteed QoS class.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
- [Memory Manager KEP: Design Overview][4]
|
||||
|
||||
- [Memory Manager KEP: Memory Maps at start-up (with examples)][5]
|
||||
|
||||
- [Memory Manager KEP: Memory Maps at runtime (with examples)][6]
|
||||
|
||||
- [Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1]
|
||||
|
||||
- [Memory Manager KEP: The Concept of Node Map and Memory Maps][2]
|
||||
|
||||
- [Memory Manager KEP: How to enable the guaranteed memory allocation over many NUMA nodes?][3]
|
||||
|
||||
[1]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#simulation---how-the-memory-manager-works-by-examples
|
||||
[2]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#the-concept-of-node-map-and-memory-maps
|
||||
[3]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#how-to-enable-the-guaranteed-memory-allocation-over-many-numa-nodes
|
||||
[4]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#design-overview
|
||||
[5]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-start-up-with-examples
|
||||
[6]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-runtime-with-examples
|
||||
---
|
||||
title: Utilizing the NUMA-aware Memory Manager
|
||||
|
||||
reviewers:
|
||||
- klueska
|
||||
- derekwaynecarr
|
||||
|
||||
content_type: task
|
||||
min-kubernetes-server-version: v1.21
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
{{< feature-state state="beta" for_k8s_version="v1.22" >}}
|
||||
|
||||
The Kubernetes *Memory Manager* enables the feature of guaranteed memory (and hugepages)
|
||||
allocation for pods in the `Guaranteed` {{< glossary_tooltip text="QoS class" term_id="qos-class" >}}.
|
||||
|
||||
The Memory Manager employs hint generation protocol to yield the most suitable NUMA affinity for a pod.
|
||||
The Memory Manager feeds the central manager (*Topology Manager*) with these affinity hints.
|
||||
Based on both the hints and Topology Manager policy, the pod is rejected or admitted to the node.
|
||||
|
||||
Moreover, the Memory Manager ensures that the memory which a pod requests
|
||||
is allocated from a minimum number of NUMA nodes.
|
||||
|
||||
The Memory Manager is only pertinent to Linux based hosts.
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
To align memory resources with other requested resources in a Pod spec:
|
||||
|
||||
- the CPU Manager should be enabled and proper CPU Manager policy should be configured on a Node.
|
||||
See [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/);
|
||||
- the Topology Manager should be enabled and proper Topology Manager policy should be configured on a Node.
|
||||
See [control Topology Management Policies](/docs/tasks/administer-cluster/topology-manager/).
|
||||
|
||||
Starting from v1.22, the Memory Manager is enabled by default through `MemoryManager`
|
||||
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
|
||||
|
||||
Preceding v1.22, the `kubelet` must be started with the following flag:
|
||||
|
||||
`--feature-gates=MemoryManager=true`
|
||||
|
||||
in order to enable the Memory Manager feature.
|
||||
|
||||
## How Memory Manager Operates?
|
||||
|
||||
The Memory Manager currently offers the guaranteed memory (and hugepages) allocation
|
||||
for Pods in Guaranteed QoS class.
|
||||
To immediately put the Memory Manager into operation follow the guidelines in the section
|
||||
[Memory Manager configuration](#memory-manager-configuration), and subsequently,
|
||||
prepare and deploy a `Guaranteed` pod as illustrated in the section
|
||||
[Placing a Pod in the Guaranteed QoS class](#placing-a-pod-in-the-guaranteed-qos-class).
|
||||
|
||||
The Memory Manager is a Hint Provider, and it provides topology hints for
|
||||
the Topology Manager which then aligns the requested resources according to these topology hints.
|
||||
It also enforces `cgroups` (i.e. `cpuset.mems`) for pods.
|
||||
The complete flow diagram concerning pod admission and deployment process is illustrated in
|
||||
[Memory Manager KEP: Design Overview][4] and below:
|
||||
|
||||

|
||||
|
||||
During this process, the Memory Manager updates its internal counters stored in
|
||||
[Node Map and Memory Maps][2] to manage guaranteed memory allocation.
|
||||
|
||||
The Memory Manager updates the Node Map during the startup and runtime as follows.
|
||||
|
||||
### Startup
|
||||
|
||||
This occurs once a node administrator employs `--reserved-memory` (section
|
||||
[Reserved memory flag](#reserved-memory-flag)).
|
||||
In this case, the Node Map becomes updated to reflect this reservation as illustrated in
|
||||
[Memory Manager KEP: Memory Maps at start-up (with examples)][5].
|
||||
|
||||
The administrator must provide `--reserved-memory` flag when `Static` policy is configured.
|
||||
|
||||
### Runtime
|
||||
|
||||
Reference [Memory Manager KEP: Memory Maps at runtime (with examples)][6] illustrates
|
||||
how a successful pod deployment affects the Node Map, and it also relates to
|
||||
how potential Out-of-Memory (OOM) situations are handled further by Kubernetes or operating system.
|
||||
|
||||
Important topic in the context of Memory Manager operation is the management of NUMA groups.
|
||||
Each time pod's memory request is in excess of single NUMA node capacity, the Memory Manager
|
||||
attempts to create a group that comprises several NUMA nodes and features extend memory capacity.
|
||||
The problem has been solved as elaborated in
|
||||
[Memory Manager KEP: How to enable the guaranteed memory allocation over many NUMA nodes?][3].
|
||||
Also, reference [Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1]
|
||||
illustrates how the management of groups occurs.
|
||||
|
||||
## Memory Manager configuration
|
||||
|
||||
Other Managers should be first pre-configured. Next, the Memory Manger feature should be enabled
|
||||
and be run with `Static` policy (section [Static policy](#policy-static)).
|
||||
Optionally, some amount of memory can be reserved for system or kubelet processes to increase
|
||||
node stability (section [Reserved memory flag](#reserved-memory-flag)).
|
||||
|
||||
### Policies
|
||||
|
||||
Memory Manager supports two policies. You can select a policy via a `kubelet` flag `--memory-manager-policy`:
|
||||
|
||||
* `None` (default)
|
||||
* `Static`
|
||||
|
||||
#### None policy {#policy-none}
|
||||
|
||||
This is the default policy and does not affect the memory allocation in any way.
|
||||
It acts the same as if the Memory Manager is not present at all.
|
||||
|
||||
The `None` policy returns default topology hint. This special hint denotes that Hint Provider
|
||||
(Memory Manger in this case) has no preference for NUMA affinity with any resource.
|
||||
|
||||
#### Static policy {#policy-static}
|
||||
|
||||
In the case of the `Guaranteed` pod, the `Static` Memory Manger policy returns topology hints
|
||||
relating to the set of NUMA nodes where the memory can be guaranteed,
|
||||
and reserves the memory through updating the internal [NodeMap][2] object.
|
||||
|
||||
In the case of the `BestEffort` or `Burstable` pod, the `Static` Memory Manager policy sends back
|
||||
the default topology hint as there is no request for the guaranteed memory,
|
||||
and does not reserve the memory in the internal [NodeMap][2] object.
|
||||
|
||||
### Reserved memory flag
|
||||
|
||||
The [Node Allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/) mechanism
|
||||
is commonly used by node administrators to reserve K8S node system resources for the kubelet
|
||||
or operating system processes in order to enhance the node stability.
|
||||
A dedicated set of flags can be used for this purpose to set the total amount of reserved memory
|
||||
for a node. This pre-configured value is subsequently utilized to calculate
|
||||
the real amount of node's "allocatable" memory available to pods.
|
||||
|
||||
The Kubernetes scheduler incorporates "allocatable" to optimise pod scheduling process.
|
||||
The foregoing flags include `--kube-reserved`, `--system-reserved` and `--eviction-threshold`.
|
||||
The sum of their values will account for the total amount of reserved memory.
|
||||
|
||||
A new `--reserved-memory` flag was added to Memory Manager to allow for this total reserved memory
|
||||
to be split (by a node administrator) and accordingly reserved across many NUMA nodes.
|
||||
|
||||
The flag specifies a comma-separated list of memory reservations per NUMA node.
|
||||
This parameter is only useful in the context of the Memory Manager feature.
|
||||
The Memory Manager will not use this reserved memory for the allocation of container workloads.
|
||||
|
||||
For example, if you have a NUMA node "NUMA0" with `10Gi` of memory available, and
|
||||
the `--reserved-memory` was specified to reserve `1Gi` of memory at "NUMA0",
|
||||
the Memory Manager assumes that only `9Gi` is available for containers.
|
||||
|
||||
You can omit this parameter, however, you should be aware that the quantity of reserved memory
|
||||
from all NUMA nodes should be equal to the quantity of memory specified by the
|
||||
[Node Allocatable feature](/docs/tasks/administer-cluster/reserve-compute-resources/).
|
||||
If at least one node allocatable parameter is non-zero, you will need to specify
|
||||
`--reserved-memory` for at least one NUMA node.
|
||||
In fact, `eviction-hard` threshold value is equal to `100Mi` by default, so
|
||||
if `Static` policy is used, `--reserved-memory` is obligatory.
|
||||
|
||||
Also, avoid the following configurations:
|
||||
|
||||
1. duplicates, i.e. the same NUMA node or memory type, but with a different value;
|
||||
1. setting zero limit for any of memory types;
|
||||
1. NUMA node IDs that do not exist in the machine hardware;
|
||||
1. memory type names different than `memory` or `hugepages-<size>`
|
||||
(hugepages of particular `<size>` should also exist).
|
||||
|
||||
Syntax:
|
||||
|
||||
`--reserved-memory N:memory-type1=value1,memory-type2=value2,...`
|
||||
|
||||
* `N` (integer) - NUMA node index, e.g. `0`
|
||||
* `memory-type` (string) - represents memory type:
|
||||
* `memory` - conventional memory
|
||||
* `hugepages-2Mi` or `hugepages-1Gi` - hugepages
|
||||
* `value` (string) - the quantity of reserved memory, e.g. `1Gi`
|
||||
|
||||
Example usage:
|
||||
|
||||
`--reserved-memory 0:memory=1Gi,hugepages-1Gi=2Gi`
|
||||
|
||||
or
|
||||
|
||||
`--reserved-memory 0:memory=1Gi --reserved-memory 1:memory=2Gi`
|
||||
|
||||
When you specify values for `--reserved-memory` flag, you must comply with the setting that
|
||||
you prior provided via Node Allocatable Feature flags.
|
||||
That is, the following rule must be obeyed for each memory type:
|
||||
|
||||
`sum(reserved-memory(i)) = kube-reserved + system-reserved + eviction-threshold`,
|
||||
|
||||
where `i` is an index of a NUMA node.
|
||||
|
||||
If you do not follow the formula above, the Memory Manager will show an error on startup.
|
||||
|
||||
In other words, the example above illustrates that for the conventional memory (`type=memory`),
|
||||
we reserve `3Gi` in total, i.e.:
|
||||
|
||||
`sum(reserved-memory(i)) = reserved-memory(0) + reserved-memory(1) = 1Gi + 2Gi = 3Gi`
|
||||
|
||||
An example of kubelet command-line arguments relevant to the node Allocatable configuration:
|
||||
|
||||
* `--kube-reserved=cpu=500m,memory=50Mi`
|
||||
* `--system-reserved=cpu=123m,memory=333Mi`
|
||||
* `--eviction-hard=memory.available<500Mi`
|
||||
|
||||
{{< note >}}
|
||||
The default hard eviction threshold is 100MiB, and **not** zero.
|
||||
Remember to increase the quantity of memory that you reserve by setting `--reserved-memory`
|
||||
by that hard eviction threshold. Otherwise, the kubelet will not start Memory Manager and
|
||||
display an error.
|
||||
{{< /note >}}
|
||||
|
||||
Here is an example of a correct configuration:
|
||||
|
||||
```shell
|
||||
--feature-gates=MemoryManager=true
|
||||
--kube-reserved=cpu=4,memory=4Gi
|
||||
--system-reserved=cpu=1,memory=1Gi
|
||||
--memory-manager-policy=Static
|
||||
--reserved-memory 0:memory=3Gi --reserved-memory 1:memory=2148Mi
|
||||
```
|
||||
|
||||
Let us validate the configuration above:
|
||||
|
||||
1. `kube-reserved + system-reserved + eviction-hard(default) = reserved-memory(0) + reserved-memory(1)`
|
||||
1. `4GiB + 1GiB + 100MiB = 3GiB + 2148MiB`
|
||||
1. `5120MiB + 100MiB = 3072MiB + 2148MiB`
|
||||
1. `5220MiB = 5220MiB` (which is correct)
|
||||
|
||||
## Placing a Pod in the Guaranteed QoS class
|
||||
|
||||
If the selected policy is anything other than `None`, the Memory Manager identifies pods
|
||||
that are in the `Guaranteed` QoS class.
|
||||
The Memory Manager provides specific topology hints to the Topology Manager for each `Guaranteed` pod.
|
||||
For pods in a QoS class other than `Guaranteed`, the Memory Manager provides default topology hints
|
||||
to the Topology Manager.
|
||||
|
||||
The following excerpts from pod manifests assign a pod to the `Guaranteed` QoS class.
|
||||
|
||||
Pod with integer CPU(s) runs in the `Guaranteed` QoS class, when `requests` are equal to `limits`:
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
resources:
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "2"
|
||||
example.com/device: "1"
|
||||
requests:
|
||||
memory: "200Mi"
|
||||
cpu: "2"
|
||||
example.com/device: "1"
|
||||
```
|
||||
|
||||
Also, a pod sharing CPU(s) runs in the `Guaranteed` QoS class, when `requests` are equal to `limits`.
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
resources:
|
||||
limits:
|
||||
memory: "200Mi"
|
||||
cpu: "300m"
|
||||
example.com/device: "1"
|
||||
requests:
|
||||
memory: "200Mi"
|
||||
cpu: "300m"
|
||||
example.com/device: "1"
|
||||
```
|
||||
|
||||
Notice that both CPU and memory requests must be specified for a Pod to lend it to Guaranteed QoS class.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following means can be used to troubleshoot the reason why a pod could not be deployed or
|
||||
became rejected at a node:
|
||||
|
||||
- pod status - indicates topology affinity errors
|
||||
- system logs - include valuable information for debugging, e.g., about generated hints
|
||||
- state file - the dump of internal state of the Memory Manager
|
||||
(includes [Node Map and Memory Maps][2])
|
||||
- starting from v1.22, the [device plugin resource API](#device-plugin-resource-api) can be used
|
||||
to retrieve information about the memory reserved for containers
|
||||
|
||||
### Pod status (TopologyAffinityError) {#TopologyAffinityError}
|
||||
|
||||
This error typically occurs in the following situations:
|
||||
|
||||
* a node has not enough resources available to satisfy the pod's request
|
||||
* the pod's request is rejected due to particular Topology Manager policy constraints
|
||||
|
||||
The error appears in the status of a pod:
|
||||
|
||||
```shell
|
||||
kubectl get pods
|
||||
```
|
||||
|
||||
```none
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
guaranteed 0/1 TopologyAffinityError 0 113s
|
||||
```
|
||||
|
||||
Use `kubectl describe pod <id>` or `kubectl get events` to obtain detailed error message:
|
||||
|
||||
```none
|
||||
Warning TopologyAffinityError 10m kubelet, dell8 Resources cannot be allocated with Topology locality
|
||||
```
|
||||
|
||||
### System logs
|
||||
|
||||
Search system logs with respect to a particular pod.
|
||||
|
||||
The set of hints that Memory Manager generated for the pod can be found in the logs.
|
||||
Also, the set of hints generated by CPU Manager should be present in the logs.
|
||||
|
||||
Topology Manager merges these hints to calculate a single best hint.
|
||||
The best hint should be also present in the logs.
|
||||
|
||||
The best hint indicates where to allocate all the resources.
|
||||
Topology Manager tests this hint against its current policy, and based on the verdict,
|
||||
it either admits the pod to the node or rejects it.
|
||||
|
||||
Also, search the logs for occurrences associated with the Memory Manager,
|
||||
e.g. to find out information about `cgroups` and `cpuset.mems` updates.
|
||||
|
||||
### Examine the memory manager state on a node
|
||||
|
||||
Let us first deploy a sample `Guaranteed` pod whose specification is as follows:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: guaranteed
|
||||
spec:
|
||||
containers:
|
||||
- name: guaranteed
|
||||
image: consumer
|
||||
imagePullPolicy: Never
|
||||
resources:
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 150Gi
|
||||
requests:
|
||||
cpu: "2"
|
||||
memory: 150Gi
|
||||
command: ["sleep","infinity"]
|
||||
```
|
||||
|
||||
Next, let us log into the node where it was deployed and examine the state file in
|
||||
`/var/lib/kubelet/memory_manager_state`:
|
||||
|
||||
```json
|
||||
{
|
||||
"policyName":"Static",
|
||||
"machineState":{
|
||||
"0":{
|
||||
"numberOfAssignments":1,
|
||||
"memoryMap":{
|
||||
"hugepages-1Gi":{
|
||||
"total":0,
|
||||
"systemReserved":0,
|
||||
"allocatable":0,
|
||||
"reserved":0,
|
||||
"free":0
|
||||
},
|
||||
"memory":{
|
||||
"total":134987354112,
|
||||
"systemReserved":3221225472,
|
||||
"allocatable":131766128640,
|
||||
"reserved":131766128640,
|
||||
"free":0
|
||||
}
|
||||
},
|
||||
"nodes":[
|
||||
0,
|
||||
1
|
||||
]
|
||||
},
|
||||
"1":{
|
||||
"numberOfAssignments":1,
|
||||
"memoryMap":{
|
||||
"hugepages-1Gi":{
|
||||
"total":0,
|
||||
"systemReserved":0,
|
||||
"allocatable":0,
|
||||
"reserved":0,
|
||||
"free":0
|
||||
},
|
||||
"memory":{
|
||||
"total":135286722560,
|
||||
"systemReserved":2252341248,
|
||||
"allocatable":133034381312,
|
||||
"reserved":29295144960,
|
||||
"free":103739236352
|
||||
}
|
||||
},
|
||||
"nodes":[
|
||||
0,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"entries":{
|
||||
"fa9bdd38-6df9-4cf9-aa67-8c4814da37a8":{
|
||||
"guaranteed":[
|
||||
{
|
||||
"numaAffinity":[
|
||||
0,
|
||||
1
|
||||
],
|
||||
"type":"memory",
|
||||
"size":161061273600
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"checksum":4142013182
|
||||
}
|
||||
```
|
||||
|
||||
It can be deduced from the state file that the pod was pinned to both NUMA nodes, i.e.:
|
||||
|
||||
```json
|
||||
"numaAffinity":[
|
||||
0,
|
||||
1
|
||||
],
|
||||
```
|
||||
|
||||
Pinned term means that pod's memory consumption is constrained (through `cgroups` configuration)
|
||||
to these NUMA nodes.
|
||||
|
||||
This automatically implies that Memory Manager instantiated a new group that
|
||||
comprises these two NUMA nodes, i.e. `0` and `1` indexed NUMA nodes.
|
||||
|
||||
Notice that the management of groups is handled in a relatively complex manner, and
|
||||
further elaboration is provided in Memory Manager KEP in [this][1] and [this][3] sections.
|
||||
|
||||
In order to analyse memory resources available in a group,the corresponding entries from
|
||||
NUMA nodes belonging to the group must be added up.
|
||||
|
||||
For example, the total amount of free "conventional" memory in the group can be computed
|
||||
by adding up the free memory available at every NUMA node in the group,
|
||||
i.e., in the `"memory"` section of NUMA node `0` (`"free":0`) and NUMA node `1` (`"free":103739236352`).
|
||||
So, the total amount of free "conventional" memory in this group is equal to `0 + 103739236352` bytes.
|
||||
|
||||
The line `"systemReserved":3221225472` indicates that the administrator of this node reserved
|
||||
`3221225472` bytes (i.e. `3Gi`) to serve kubelet and system processes at NUMA node `0`,
|
||||
by using `--reserved-memory` flag.
|
||||
|
||||
### Device plugin resource API
|
||||
|
||||
By employing the [API](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/),
|
||||
the information about reserved memory for each container can be retrieved, which is contained
|
||||
in protobuf `ContainerMemory` message.
|
||||
This information can be retrieved solely for pods in Guaranteed QoS class.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
- [Memory Manager KEP: Design Overview][4]
|
||||
- [Memory Manager KEP: Memory Maps at start-up (with examples)][5]
|
||||
- [Memory Manager KEP: Memory Maps at runtime (with examples)][6]
|
||||
- [Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1]
|
||||
- [Memory Manager KEP: The Concept of Node Map and Memory Maps][2]
|
||||
- [Memory Manager KEP: How to enable the guaranteed memory allocation over many NUMA nodes?][3]
|
||||
|
||||
[1]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#simulation---how-the-memory-manager-works-by-examples
|
||||
[2]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#the-concept-of-node-map-and-memory-maps
|
||||
[3]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#how-to-enable-the-guaranteed-memory-allocation-over-many-numa-nodes
|
||||
[4]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#design-overview
|
||||
[5]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-start-up-with-examples
|
||||
[6]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-runtime-with-examples
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ To try the gRPC liveness check, create a Pod using the command below.
|
||||
In the example below, the etcd pod is configured to use gRPC liveness probe.
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://k8s.io/examples/pods/probe/content/en/examples/pods/probe/grpc-liveness.yaml
|
||||
kubectl apply -f https://k8s.io/examples/pods/probe/grpc-liveness.yaml
|
||||
```
|
||||
|
||||
After 15 seconds, view Pod events to verify that the liveness check has not failed:
|
||||
|
||||
@@ -165,6 +165,7 @@ and finally configure the `hostPath`:
|
||||
|
||||
```yaml
|
||||
...
|
||||
volumes:
|
||||
- name: audit
|
||||
hostPath:
|
||||
path: /etc/kubernetes/audit-policy.yaml
|
||||
@@ -174,7 +175,6 @@ and finally configure the `hostPath`:
|
||||
hostPath:
|
||||
path: /var/log/kubernetes/audit/
|
||||
type: DirectoryOrCreate
|
||||
|
||||
```
|
||||
|
||||
### Webhook backend
|
||||
|
||||
@@ -57,7 +57,7 @@ If a Pod is stuck in the `Waiting` state, then it has been scheduled to a worker
|
||||
Again, the information from `kubectl describe ...` should be informative. The most common cause of `Waiting` pods is a failure to pull the image. There are three things to check:
|
||||
|
||||
* Make sure that you have the name of the image correct.
|
||||
* Have you pushed the image to the repository?
|
||||
* Have you pushed the image to the registry?
|
||||
* Run a manual `docker pull <image>` on your machine to see if the image can be pulled.
|
||||
|
||||
#### My pod is crashing or otherwise unhealthy
|
||||
|
||||
@@ -5,57 +5,57 @@ content_type: task
|
||||
|
||||
<!-- overview -->
|
||||
|
||||
Kubernetes applications usually consist of multiple, separate services, each running in its own container. Developing and debugging these services on a remote Kubernetes cluster can be cumbersome, requiring you to [get a shell on a running container](/docs/tasks/debug-application-cluster/get-shell-running-container/) and running your tools inside the remote shell.
|
||||
|
||||
`telepresence` is a tool to ease the process of developing and debugging services locally, while proxying the service to a remote Kubernetes cluster. Using `telepresence` allows you to use custom tools, such as a debugger and IDE, for a local service and provides the service full access to ConfigMap, secrets, and the services running on the remote cluster.
|
||||
{{% thirdparty-content %}}
|
||||
|
||||
Kubernetes applications usually consist of multiple, separate services, each running in its own container. Developing and debugging these services on a remote Kubernetes cluster can be cumbersome, requiring you to [get a shell on a running container](/docs/tasks/debug-application-cluster/get-shell-running-container/) in order to run debugging tools.
|
||||
|
||||
`telepresence` is a tool to ease the process of developing and debugging services locally while proxying the service to a remote Kubernetes cluster. Using `telepresence` allows you to use custom tools, such as a debugger and IDE, for a local service and provides the service full access to ConfigMap, secrets, and the services running on the remote cluster.
|
||||
|
||||
This document describes using `telepresence` to develop and debug services running on a remote cluster locally.
|
||||
|
||||
|
||||
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
* Kubernetes cluster is installed
|
||||
* `kubectl` is configured to communicate with the cluster
|
||||
* [Telepresence](https://www.telepresence.io/reference/install) is installed
|
||||
|
||||
* [Telepresence](https://www.telepresence.io/docs/latest/install/) is installed
|
||||
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
## Getting a shell on a remote cluster
|
||||
## 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.
|
||||
|
||||
Open a terminal and run `telepresence` with no arguments to get a `telepresence` shell. This shell runs locally, giving you full access to your local filesystem.
|
||||
|
||||
The `telepresence` shell can be used in a variety of ways. For example, write a shell script on your laptop, and run it directly from the shell in real time. You can do this on a remote shell as well, but you might not be able to use your preferred code editor, and the script is deleted when the container is terminated.
|
||||
|
||||
Enter `exit` to quit and close the shell.
|
||||
```
|
||||
$ telepresence connect
|
||||
|
||||
Launching Telepresence Daemon
|
||||
...
|
||||
Connected to context default (https://<cluster public IP>)
|
||||
```
|
||||
|
||||
You can curl services using the Kubernetes syntax e.g. `curl -ik https://kubernetes.default`
|
||||
|
||||
## Developing or debugging an existing service
|
||||
|
||||
When developing an application on Kubernetes, you typically program or debug a single service. The service might require access to other services for testing and debugging. One option is to use the continuous deployment pipeline, but even the fastest deployment pipeline introduces a delay in the program or debug cycle.
|
||||
|
||||
Use the `telepresence intercept $SERVICE_NAME --port $LOCAL_PORT:REMOTE_PORT` command to create an "intercept" for rerouting remote service traffic.
|
||||
|
||||
Where:
|
||||
|
||||
Use the `--swap-deployment` option to swap an existing deployment with the Telepresence proxy. Swapping allows you to run a service locally and connect to the remote Kubernetes cluster. The services in the remote cluster can now access the locally running instance.
|
||||
- `$SERVICE_NAME` is the name of your local service
|
||||
- `$LOCAL_PORT` is the port that your service is running on your local workstation
|
||||
- And `$REMOTE_PORT` is the port your service listens to in the cluster
|
||||
|
||||
To run telepresence with `--swap-deployment`, enter:
|
||||
|
||||
`telepresence --swap-deployment $DEPLOYMENT_NAME`
|
||||
|
||||
where $DEPLOYMENT_NAME is the name of your existing deployment.
|
||||
|
||||
Running this command spawns a shell. In the shell, start your service. You can then make edits to the source code locally, save, and see the changes take effect immediately. You can also run your service in a debugger, or any other local development tool.
|
||||
Running this command tells Telepresence to send remote traffic to your local service instead of the service in the remote Kubernetes cluster. Make edits to your service source code locally, save, and see the corresponding changes when accessing your remote application take effect immediately. You can also run your local service using a debugger or any other local development tool.
|
||||
|
||||
## How does Telepresence work?
|
||||
|
||||
Telepresence installs a traffic-agent sidecar next to your existing application's container running in the remote cluster. It then captures all traffic requests going into the Pod, and instead of forwarding this to the application in the remote cluster, it routes all traffic (when you create a [global intercept](https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts/#global-intercept)) or a subset of the traffic (when you create a [personal intercept](https://www.getambassador.io/docs/telepresence/latest/concepts/intercepts/#personal-intercept)) to your local development environment.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
|
||||
If you're interested in a hands-on tutorial, check out [this tutorial](https://cloud.google.com/community/tutorials/developing-services-with-k8s) that walks through locally developing the Guestbook application on Google Kubernetes Engine.
|
||||
|
||||
Telepresence has [numerous proxying options](https://www.telepresence.io/reference/methods), depending on your situation.
|
||||
|
||||
For further reading, visit the [Telepresence website](https://www.telepresence.io).
|
||||
|
||||
|
||||
|
||||
For further reading, visit the [Telepresence website](https://www.telepresence.io).
|
||||
@@ -67,8 +67,8 @@ Learn more about the metrics server in
|
||||
[the design doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/metrics-server.md).
|
||||
|
||||
### Summary API Source
|
||||
The [Kubelet](/docs/reference/command-line-tools-reference/kubelet/) gathers stats at node, volume, pod and container level, and omits
|
||||
them in the [Summary API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go)
|
||||
The [Kubelet](/docs/reference/command-line-tools-reference/kubelet/) gathers stats at node, volume, pod and container level, and emits their statistics in
|
||||
the [Summary API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go)
|
||||
for consumers to read.
|
||||
|
||||
Pre-1.23, these resources have been primarily gathered from [cAdvisor](https://github.com/google/cadvisor). However, in 1.23 with the
|
||||
|
||||
@@ -36,8 +36,7 @@ If you define args, but do not define a command, the default command is used
|
||||
with your new arguments.
|
||||
|
||||
{{< note >}}
|
||||
The `command` field corresponds to `entrypoint` in some container
|
||||
runtimes. Refer to the [Notes](#notes) below.
|
||||
The `command` field corresponds to `entrypoint` in some container runtimes.
|
||||
{{< /note >}}
|
||||
|
||||
In this exercise, you create a Pod that runs one container. The configuration
|
||||
@@ -111,50 +110,9 @@ command: ["/bin/sh"]
|
||||
args: ["-c", "while true; do echo hello; sleep 10;done"]
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
This table summarizes the field names used by Docker and Kubernetes.
|
||||
|
||||
| Description | Docker field name | Kubernetes field name |
|
||||
|----------------------------------------|------------------------|-----------------------|
|
||||
| The command run by the container | Entrypoint | command |
|
||||
| The arguments passed to the command | Cmd | args |
|
||||
|
||||
When you override the default Entrypoint and Cmd, these rules apply:
|
||||
|
||||
* If you do not supply `command` or `args` for a Container, the defaults defined
|
||||
in the Docker image are used.
|
||||
|
||||
* If you supply a `command` but no `args` for a Container, only the supplied
|
||||
`command` is used. The default EntryPoint and the default Cmd defined in the Docker
|
||||
image are ignored.
|
||||
|
||||
* If you supply only `args` for a Container, the default Entrypoint defined in
|
||||
the Docker image is run with the `args` that you supplied.
|
||||
|
||||
* If you supply a `command` and `args`, the default Entrypoint and the default
|
||||
Cmd defined in the Docker image are ignored. Your `command` is run with your
|
||||
`args`.
|
||||
|
||||
Here are some examples:
|
||||
|
||||
| Image Entrypoint | Image Cmd | Container command | Container args | Command run |
|
||||
|--------------------|------------------|---------------------|--------------------|------------------|
|
||||
| `[/ep-1]` | `[foo bar]` | <not set> | <not set> | `[ep-1 foo bar]` |
|
||||
| `[/ep-1]` | `[foo bar]` | `[/ep-2]` | <not set> | `[ep-2]` |
|
||||
| `[/ep-1]` | `[foo bar]` | <not set> | `[zoo boo]` | `[ep-1 zoo boo]` |
|
||||
| `[/ep-1]` | `[foo bar]` | `[/ep-2]` | `[zoo boo]` | `[ep-2 zoo boo]` |
|
||||
|
||||
|
||||
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
* Learn more about [configuring pods and containers](/docs/tasks/).
|
||||
* Learn more about [running commands in a container](/docs/tasks/debug-application-cluster/get-shell-running-container/).
|
||||
* See [Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ This guide demonstrates how to configure the kubelet's image credential provider
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
* The kubelet image credential provider is introduced in v1.20 as an alpha feature. As with other alpha features,
|
||||
a feature gate `KubeletCredentialProviders` must be enabled on only the kubelet for the feature to work.
|
||||
a feature gate `KubeletCredentialProviders` must be enabled on only the kubelet for the feature to work.
|
||||
* A working implementation of a credential provider exec plugin. You can build your own plugin or use one provided by cloud providers.
|
||||
|
||||
<!-- steps -->
|
||||
@@ -41,17 +41,19 @@ every node in your cluster and stored in a known directory. The directory will b
|
||||
## Configuring the Kubelet
|
||||
|
||||
In order to use this feature, the kubelet expects two flags to be set:
|
||||
|
||||
* `--image-credential-provider-config` - the path to the credential provider plugin config file.
|
||||
* `--image-credential-provider-bin-dir` - the path to the directory where credential provider plugin binaries are located.
|
||||
|
||||
### Configure a kubelet credential provider
|
||||
|
||||
The configuration file passed into `--image-credential-provider-config` is read by the kubelet to determine which exec plugins
|
||||
should be invoked for which container images. Here's an example configuration file you may end up using if you are using the [ECR](https://aws.amazon.com/ecr/)-based plugin:
|
||||
should be invoked for which container images. Here's an example configuration file you may end up using if you are using the
|
||||
[ECR](https://aws.amazon.com/ecr/)-based plugin:
|
||||
|
||||
```yaml
|
||||
kind: CredentialProviderConfig
|
||||
apiVersion: kubelet.config.k8s.io/v1alpha1
|
||||
kind: CredentialProviderConfig
|
||||
# providers is a list of credential provider plugins that will be enabled by the kubelet.
|
||||
# Multiple providers may match against a single image, in which case credentials
|
||||
# from all providers will be returned to the kubelet. If multiple providers are called
|
||||
@@ -86,11 +88,11 @@ providers:
|
||||
# - *.*.registry.io
|
||||
# - registry.io:8080/path
|
||||
matchImages:
|
||||
- "*.dkr.ecr.*.amazonaws.com"
|
||||
- "*.dkr.ecr.*.amazonaws.cn"
|
||||
- "*.dkr.ecr-fips.*.amazonaws.com"
|
||||
- "*.dkr.ecr.us-iso-east-1.c2s.ic.gov"
|
||||
- "*.dkr.ecr.us-isob-east-1.sc2s.sgov.gov"
|
||||
- "*.dkr.ecr.*.amazonaws.com"
|
||||
- "*.dkr.ecr.*.amazonaws.cn"
|
||||
- "*.dkr.ecr-fips.*.amazonaws.com"
|
||||
- "*.dkr.ecr.us-iso-east-1.c2s.ic.gov"
|
||||
- "*.dkr.ecr.us-isob-east-1.sc2s.sgov.gov"
|
||||
# defaultCacheDuration is the default duration the plugin will cache credentials in-memory
|
||||
# if a cache duration is not provided in the plugin response. This field is required.
|
||||
defaultCacheDuration: "12h"
|
||||
@@ -101,23 +103,28 @@ providers:
|
||||
# Arguments to pass to the command when executing it.
|
||||
# +optional
|
||||
args:
|
||||
- get-credentials
|
||||
- get-credentials
|
||||
# Env defines additional environment variables to expose to the process. These
|
||||
# are unioned with the host's environment, as well as variables client-go uses
|
||||
# to pass argument to the plugin.
|
||||
# +optional
|
||||
env:
|
||||
- name: AWS_PROFILE
|
||||
value: example_profile
|
||||
- name: AWS_PROFILE
|
||||
value: example_profile
|
||||
```
|
||||
|
||||
The `providers` field is a list of enabled plugins used by the kubelet. Each entry has a few required fields:
|
||||
* `name`: the name of the plugin which MUST match the name of the executable binary that exists in the directory passed into `--image-credential-provider-bin-dir`.
|
||||
* `matchImages`: a list of strings used to match against images in order to determine if this provider should be invoked. More on this below.
|
||||
* `defaultCacheDuration`: the default duration the kubelet will cache credentials in-memory if a cache duration was not specified by the plugin.
|
||||
* `apiVersion`: the api version that the kubelet and the exec plugin will use when communicating.
|
||||
|
||||
Each credential provider can also be given optional args and environment variables as well. Consult the plugin implementors to determine what set of arguments and environment variables are required for a given plugin.
|
||||
* `name`: the name of the plugin which MUST match the name of the executable binary that exists
|
||||
in the directory passed into `--image-credential-provider-bin-dir`.
|
||||
* `matchImages`: a list of strings used to match against images in order to determine
|
||||
if this provider should be invoked. More on this below.
|
||||
* `defaultCacheDuration`: the default duration the kubelet will cache credentials in-memory
|
||||
if a cache duration was not specified by the plugin.
|
||||
* `apiVersion`: the API version that the kubelet and the exec plugin will use when communicating.
|
||||
|
||||
Each credential provider can also be given optional args and environment variables as well.
|
||||
Consult the plugin implementors to determine what set of arguments and environment variables are required for a given plugin.
|
||||
|
||||
#### Configure image matching
|
||||
|
||||
@@ -134,8 +141,15 @@ A match exists between an image name and a `matchImage` entry when all of the be
|
||||
* If the imageMatch contains a port, then the port must match in the image as well.
|
||||
|
||||
Some example values of `matchImages` patterns are:
|
||||
|
||||
* `123456789.dkr.ecr.us-east-1.amazonaws.com`
|
||||
* `*.azurecr.io`
|
||||
* `gcr.io`
|
||||
* `*.*.registry.io`
|
||||
* `foo.registry.io:8080/path`
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
* Read the details about `CredentialProviderConfig` in the
|
||||
[kubelet configuration API (v1alpha1) reference](/docs/reference/config-api/kubelet-config.v1alpha1/).
|
||||
|
||||
|
||||
@@ -86,12 +86,20 @@ metadata:
|
||||
name: example-configmap-1-8mbdf7882g
|
||||
```
|
||||
|
||||
To generate a ConfigMap from an env file, add an entry to the `envs` list in `configMapGenerator`. Here is an example of generating a ConfigMap with a data item from a `.env` file:
|
||||
To generate a ConfigMap from an env file, add an entry to the `envs` list in `configMapGenerator`. This can also be used to set values from local environment variables by omitting the `=` and the value.
|
||||
|
||||
{{< note >}}
|
||||
It's recommended to use the local environment variable population functionality sparingly - an overlay with a patch is often more maintainable. Setting values from the environment may be useful when they cannot easily be predicted, such as a git SHA.
|
||||
{{< /note >}}
|
||||
|
||||
Here is an example of generating a ConfigMap with a data item from a `.env` file:
|
||||
|
||||
```shell
|
||||
# Create a .env file
|
||||
# BAZ will be populated from the local environment variable $BAZ
|
||||
cat <<EOF >.env
|
||||
FOO=Bar
|
||||
BAZ
|
||||
EOF
|
||||
|
||||
cat <<EOF >./kustomization.yaml
|
||||
@@ -105,7 +113,7 @@ EOF
|
||||
The generated ConfigMap can be examined with the following command:
|
||||
|
||||
```shell
|
||||
kubectl kustomize ./
|
||||
BAZ=Qux kubectl kustomize ./
|
||||
```
|
||||
|
||||
The generated ConfigMap is:
|
||||
@@ -113,10 +121,11 @@ The generated ConfigMap is:
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
data:
|
||||
BAZ: Qux
|
||||
FOO: Bar
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: example-configmap-1-42cfbf598f
|
||||
name: example-configmap-1-892ghb99c8
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
@@ -748,8 +757,8 @@ Since the Service name may change as `namePrefix` or `nameSuffix` is added in th
|
||||
not recommended to hard code the Service name in the command argument. For this usage, Kustomize can inject the Service name into containers through `vars`.
|
||||
|
||||
```shell
|
||||
# Create a deployment.yaml file
|
||||
cat <<EOF > deployment.yaml
|
||||
# Create a deployment.yaml file (quoting the here doc delimiter)
|
||||
cat <<'EOF' > deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
||||
@@ -52,7 +52,7 @@ For example, to download version {{< param "fullversion" >}} on Linux, type:
|
||||
Validate the kubectl binary against the checksum file:
|
||||
|
||||
```bash
|
||||
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
|
||||
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
|
||||
```
|
||||
|
||||
If valid, the output is:
|
||||
|
||||
@@ -342,17 +342,16 @@ syscalls. Here seccomp has been instructed to error on any syscall by setting
|
||||
ability to do anything meaningful. What you really want is to give workloads
|
||||
only the privileges they need.
|
||||
|
||||
Clean up that Pod and Service before moving to the next section:
|
||||
Clean up that Pod before moving to the next section:
|
||||
|
||||
```shell
|
||||
kubectl delete service violation-pod --wait
|
||||
kubectl delete pod violation-pod --wait --now
|
||||
```
|
||||
|
||||
## Create Pod with seccomp profile that only allows necessary syscalls
|
||||
|
||||
If you take a look at the `fine-pod.json`, you will notice some of the syscalls
|
||||
seen in the first example where the profile set `"defaultAction":
|
||||
If you take a look at the `fine-grained.json` profile, you will notice some of the syscalls
|
||||
seen in syslog of the first example where the profile set `"defaultAction":
|
||||
"SCMP_ACT_LOG"`. Now the profile is setting `"defaultAction": "SCMP_ACT_ERRNO"`,
|
||||
but explicitly allowing a set of syscalls in the `"action": "SCMP_ACT_ALLOW"`
|
||||
block. Ideally, the container will run successfully and you will see no messages
|
||||
|
||||
@@ -2,3 +2,6 @@
|
||||
title: Create a Cluster
|
||||
weight: 10
|
||||
---
|
||||
|
||||
Learn about Kubernetes {{< glossary_tooltip text="cluster" term_id="cluster" length="all" >}} and create a simple cluster using Minikube.
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ that are most appropriate for your configuration, do the following:
|
||||
|
||||
1. Privileged
|
||||
```shell
|
||||
kubectl label --dry-run=server --overwrite ns --all \
|
||||
kubectl label --dry-run=server --overwrite ns --all \
|
||||
pod-security.kubernetes.io/enforce=privileged
|
||||
```
|
||||
The output is similar to this:
|
||||
@@ -304,8 +304,8 @@ following:
|
||||
|
||||
## Clean up
|
||||
|
||||
Run `kind delete cluster -name psa-with-cluster-pss` and
|
||||
`kind delete cluster -name psa-wo-cluster-pss` to delete the clusters you
|
||||
Run `kind delete cluster --name psa-with-cluster-pss` and
|
||||
`kind delete cluster --name psa-wo-cluster-pss` to delete the clusters you
|
||||
created.
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
Reference in New Issue
Block a user