admissionregistration.k8s.io/v1
·ValidatingAdmissionPolicy
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Click on Property Name to show the description, and Pink Types to expand schema.
Required properties are marked with *
Change History
Kubernetes v1.32
Kubernetes v1.31
Kubernetes v1.30
ValidatingAdmissionPolicy was first seen on this version of Kubernetes
Kubernetes v1.29
Kubernetes v1.28
Kubernetes v1.27
Kubernetes v1.26
Kubernetes v1.25
Kubernetes v1.24
Kubernetes v1.23
Kubernetes v1.22
Kubernetes v1.21
Kubernetes v1.20
Kubernetes v1.19
Kubernetes v1.18
Kubernetes v1.17
Kubernetes v1.16
Kubernetes v1.15
Kubernetes v1.14
Kubernetes v1.13
Kubernetes v1.12
Kubernetes v1.11
Examples
There is 1 example of ValidatingAdmissionPolicy that you can use as a starting point to create your own.
apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingAdmissionPolicy metadata: name: pod-label-enforcement-policy spec: matchConstraints: resourceRules: - apiGroups: [""] apiVersions: ["v1"] resources: ["pods"] operations: ["CREATE", "UPDATE"] validations: - expression: "object.metadata.labels['environment'] == 'production'" message: "Pods must have the label 'environment' set to 'production'."