Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Kubernetes Networking Demo error (Lesson 75)

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?

Tuan LE

Could be a syntax error. How did you get the YAML file?

0 Answers

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?