You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ kubeval pod.yaml
PASS - pod.yaml contains a valid Pod (pv_demo)
Trying to create the Pod produces
$ kubectl create -f pod.yaml
The Pod "pv_demo" is invalid:
* metadata.name: Invalid value: "pv_demo": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
* spec.containers[0].name: Invalid value: "pv_demo": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
The text was updated successfully, but these errors were encountered:
While this file might tell you that this or that field is required, optional, or must be a string, an array or an integer, what that file does not contain is advanced validation logic that the Kubernetes server does.
The following yaml should FAIL due to the underscore in 'pv_demo', but it PASSes:
Kubeval produces
Trying to create the Pod produces
The text was updated successfully, but these errors were encountered: