kubernetes: kubectl --validate doesn't work for optional APIs

kubectl fails to create deployment resource and emits the following: error validating "/examples/extensions/deployment.yaml": error validating data: couldn't find type: v1beta1.Deployment; if you choose to ignore these errors, turn validation off with --validate=false

I guess that is because deployment is disabled by default.

I could be wrong, but I think this used to work before. Not sure if we changed some validation code recently.

Steps I did: RUNTIME_CONFIG=extensions/v1beta1/deployments=true ./hack/local-up-cluster.sh ./cluster/kubectl.sh create -f examples/extensions/deployment.yaml

cc @kubernetes/sig-api-machinery @kubernetes/goog-csi @janetkuo

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 38 (19 by maintainers)

Commits related to this issue

Most upvoted comments

Same here. I’m taking the tutorial “Running a Stateless Application Using a Deployment”. There seems to be a typo in the YAML in the section “Creating and exploring an nginx deployment”.

@RaghavendraNandagopal Try changing the line that says

apiVersion: v1beta1

to

apiVersion: extensions/v1beta1

At least, this worked for me.

Hi, Running into same issue. Below are the versions and environment Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T23:43:00Z", GoVersion:"go1.8", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.3", GitCommit:"029c3a408176b55c30846f0faedf56aae5992e9b", GitTreeState:"clean", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.7.3", Compiler:"gc", Platform:"linux/amd64"}

Minikube version: minikube version: v0.17.1

Here is the error that I am getting: error: error validating “deployment.yaml”: error validating data: couldn’t find type: v1beta1.Deployment; if you choose to ignore these errors, turn validation off with --validate=false