
Brad Goss
I’m encountering the following error in exec’ing this cmd in the Cloud Shell: kubectl apply -f ./ping-deploy.yml
error: error validating "./ping-deploy.yml": error validating data: ValidationError(Deployment.spec.template.metadata): unknown field "spec" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
If I turn validation off (–validate=false), the error becomes:
The Deployment "pingtest" is invalid: spec.template.spec.containers: Required value
Any thoughts?
Could be a syntax error. How did you get the YAML file?