Merge pull request #28903 from sejr/feat/podsecurity
Add Pod Security Standards documentation
This commit is contained in:
@@ -696,6 +696,18 @@ PodNodeSelector allows forcing pods to run on specifically labeled nodes. Also s
|
||||
admission plugin, which allows preventing pods from running on specifically tainted nodes.
|
||||
{{< /note >}}
|
||||
|
||||
### PodSecurity {#podsecurity}
|
||||
|
||||
{{< feature-state for_k8s_version="v1.22" state="alpha" >}}
|
||||
|
||||
This is the replacement for the deprecated [PodSecurityPolicy](#podsecuritypolicy) admission controller
|
||||
defined in the next section. This admission controller acts on creation and modification of the pod and
|
||||
determines if it should be admitted based on the requested security context and the
|
||||
[Pod Security Standards](/docs/concepts/security/pod-security-standards/).
|
||||
|
||||
See the [Pod Security Admission documentation](/docs/concepts/security/pod-security-admission/)
|
||||
for more information.
|
||||
|
||||
### PodSecurityPolicy {#podsecuritypolicy}
|
||||
|
||||
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
|
||||
|
||||
@@ -341,3 +341,87 @@ Sets this taint on a node to mark it as unusable, when kubelet is started with t
|
||||
Example: `node.cloudprovider.kubernetes.io/shutdown:NoSchedule`
|
||||
|
||||
If a Node is in a cloud provider specified shutdown state, the Node gets tainted accordingly with `node.cloudprovider.kubernetes.io/shutdown` and the taint effect of `NoSchedule`.
|
||||
|
||||
## pod-security.kubernetes.io/enforce
|
||||
|
||||
Example: `pod-security.kubernetes.io/enforce: baseline`
|
||||
|
||||
Used on: Namespace
|
||||
|
||||
Value **must** be one of `privileged`, `baseline`, or `restricted` which correspond to
|
||||
[Pod Security Standard](/docs/concepts/security/pod-security-standards) levels. Specifically,
|
||||
the `enforce` label _prohibits_ the creation of any Pod in the labeled Namespace which does not meet
|
||||
the requirements outlined in the indicated level.
|
||||
|
||||
See [Enforcing Pod Security at the Namespace Level](/docs/concepts/security/pod-security-admission)
|
||||
for more information.
|
||||
|
||||
## pod-security.kubernetes.io/enforce-version
|
||||
|
||||
Example: `pod-security.kubernetes.io/enforce-version: {{< skew latestVersion >}}`
|
||||
|
||||
Used on: Namespace
|
||||
|
||||
Value **must** be `latest` or a valid Kubernetes version in the format `v<MAJOR>.<MINOR>`.
|
||||
This determines the version of the [Pod Security Standard](/docs/concepts/security/pod-security-standards)
|
||||
policies to apply when validating a submitted Pod.
|
||||
|
||||
See [Enforcing Pod Security at the Namespace Level](/docs/concepts/security/pod-security-admission)
|
||||
for more information.
|
||||
|
||||
## pod-security.kubernetes.io/audit
|
||||
|
||||
Example: `pod-security.kubernetes.io/audit: baseline`
|
||||
|
||||
Used on: Namespace
|
||||
|
||||
Value **must** be one of `privileged`, `baseline`, or `restricted` which correspond to
|
||||
[Pod Security Standard](/docs/concepts/security/pod-security-standards) levels. Specifically,
|
||||
the `audit` label does not prevent the creation of a Pod in the labeled Namespace which does not meet
|
||||
the requirements outlined in the indicated level, but adds an audit annotation to that Pod.
|
||||
|
||||
See [Enforcing Pod Security at the Namespace Level](/docs/concepts/security/pod-security-admission)
|
||||
for more information.
|
||||
|
||||
## pod-security.kubernetes.io/audit-version
|
||||
|
||||
Example: `pod-security.kubernetes.io/audit-version: {{< skew latestVersion >}}`
|
||||
|
||||
Used on: Namespace
|
||||
|
||||
Value **must** be `latest` or a valid Kubernetes version in the format `v<MAJOR>.<MINOR>`.
|
||||
This determines the version of the [Pod Security Standard](/docs/concepts/security/pod-security-standards)
|
||||
policies to apply when validating a submitted Pod.
|
||||
|
||||
See [Enforcing Pod Security at the Namespace Level](/docs/concepts/security/pod-security-admission)
|
||||
for more information.
|
||||
|
||||
## pod-security.kubernetes.io/warn
|
||||
|
||||
Example: `pod-security.kubernetes.io/warn: baseline`
|
||||
|
||||
Used on: Namespace
|
||||
|
||||
Value **must** be one of `privileged`, `baseline`, or `restricted` which correspond to
|
||||
[Pod Security Standard](/docs/concepts/security/pod-security-standards) levels. Specifically,
|
||||
the `warn` label does not prevent the creation of a Pod in the labeled Namespace which does not meet the
|
||||
requirements outlined in the indicated level, but returns a warning to the user after doing so.
|
||||
Note that warnings are also displayed when creating or updating objects that contain Pod templates,
|
||||
such as Deployments, Jobs, StatefulSets, etc.
|
||||
|
||||
See [Enforcing Pod Security at the Namespace Level](/docs/concepts/security/pod-security-admission)
|
||||
for more information.
|
||||
|
||||
## pod-security.kubernetes.io/warn-version
|
||||
|
||||
Example: `pod-security.kubernetes.io/warn-version: {{< skew latestVersion >}}`
|
||||
|
||||
Used on: Namespace
|
||||
|
||||
Value **must** be `latest` or a valid Kubernetes version in the format `v<MAJOR>.<MINOR>`.
|
||||
This determines the version of the [Pod Security Standard](/docs/concepts/security/pod-security-standards)
|
||||
policies to apply when validating a submitted Pod. Note that warnings are also displayed when creating
|
||||
or updating objects that contain Pod templates, such as Deployments, Jobs, StatefulSets, etc.
|
||||
|
||||
See [Enforcing Pod Security at the Namespace Level](/docs/concepts/security/pod-security-admission)
|
||||
for more information.
|
||||
Reference in New Issue
Block a user