Closed allenhartwig closed 6 years ago
You should be able to trigger the error by passing the --strict
flag. Realising I need to update the documentation with details of that option.
The reason for this is the above YAML is valid for the API, in that it happily accepts additional properties. However kubectl
doesn't.
The following spec passes kubeval but fails
kubectl apply
with the error "ValidationError(CronJob.spec.jobTemplate.spec.template.spec): unknown field "env" in io.k8s.api.core.v1.PodSpec" as theenv
spec doesn't have the right indentation.