Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I use Deployment in Kubernetes, what's the differences between apps/v1beta1 and extensions/v1beta1?

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"} 
like image 351
styshoo Avatar asked Apr 02 '17 01:04

styshoo


People also ask

What is API version in Kubernetes?

The format of the apiVersion is api_group/version . An object definition in Kubernetes requires a apiVersion field. When Kubernetes has a release that updates what is available for you to use—changes something in its API—a new apiVersion is created.


1 Answers

The apps API group will be where the v1 Deployment type lives. The apps/v1beta1 version was added in 1.6.0, so if you have a 1.5.x client or server, you should still use the extensions/v1beta1 version.

The apps/v1beta1 and extensions/v1beta1 Deployment types are identical, but when creating via the apps API, some improved defaults are used

like image 188
Jordan Liggitt Avatar answered Oct 13 '22 18:10

Jordan Liggitt