I use the yaml file, which is in the Kubernetes official document, to create a Deployment in Kubernetes, and it uses apiVersion: apps/v1beta1
at the top. Then I typed kubectl create -f deployment.yaml
to create this Deployment, but it occured an error as following:
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`
After some search, I changed apiVersion: apps/v1beta1
to extensions/v1beta1
, and then recreate the Deployment with the yaml file, and it worked fine.
So, I wanna know what's the differences between apps/v1beta1
and extensions/v1beta1
. Is it pertinent to the Kubernetes version?
# kubectl version Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.4", GitCommit:"7243c69eb523aa4377bce883e7c0dd76b84709a1", GitTreeState:"clean", BuildDate:"2017-03-07T23:53:09Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.4", GitCommit:"7243c69eb523aa4377bce883e7c0dd76b84709a1", GitTreeState:"clean", BuildDate:"2017-03-07T23:34:32Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}