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".
apiVersion - Which version of the Kubernetes API you're using to create this object. kind - What kind of object you want to create. metadata - Data that helps uniquely identify the object, including a name string, UID , and optional namespace. spec - What state you desire for the object.
There are four types of Kubernetes services — ClusterIP , NodePort , LoadBalancer and ExternalName .
Node Version For instance, you can also view the version details of the kubelets of each node by running kubectl get nodes -o yaml and searching through the output for “kubelet”.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With