apiVersion and beta versions

7/23/2016

Following the docs to create a Deployment, I have a .yaml file like this:

apiVersion: extensions/v1beta1
kind: Deployment
...

I wasn't sure what to make of the "extensions/v1beta1", so I ended up here in the API docs.

That makes it sound like I should use a value of "v1", but that doesn't seem to be valid when I try to kubectl apply my .yaml file.

Could someome help me to better understand what the apiVersion values mean and how I can determine the best value to use for each component?

Oh, and I'm using minikube and "kubectl version" reports that client and server are "GitVersion:"v1.3.0".

-- user605331
kubernetes

2 Answers

7/24/2016

The docs you linked to are from before the release of Kubernetes 1.0 (a year ago). At that time, we had beta versions of the API and were migrating to the v1 API. Since then, we have introduced multiple API groups, and each API group can have a different version. The version indicates the maturity of the API (alpha is under active development, beta means it will have compatibility/upgradability guarantees, and v1 means it's stable). The deployment API is currently in the second category, so using extensions/v1beta1 is correct.

-- Robert Bailey
Source: StackOverflow

3/2/2019

from documentation suggested by @Vern DeHaven

extensions/v1beta1

This version of the API includes many new, commonly used features of Kubernetes. Deployments, DaemonSets, ReplicaSets, and Ingresses all received significant changes in this release.

Note that in Kubernetes 1.6, some of these objects were relocated from extensions to specific API groups (e.g. apps). When these objects move out of beta, expect them to be in a specific API group like apps/v1.

Using extensions/v1beta1 is becoming deprecated—try to use the specific API group where possible, depending on your Kubernetes cluster version.

-- jkogut
Source: StackOverflow