Sharing some of the tips and tricks, that will be helpful while operating on kubernetes clusters.
* If you are working on multiple kubernetes clusters running with different versions, its hard to remember apiVersion for kubernetes objects.This can be sorted out by using following commands
* If you are working on multiple kubernetes clusters running with different versions, its hard to remember apiVersion for kubernetes objects.This can be sorted out by using following commands
kubectl api-resources : This will show kubernetes objects, their short names, kind and whether they can be namespaced. Here we can get apiGroup of the object we are looking for. If apiGroup is empty, it means object belongs to core api group(v1)
We can look for versions available for given api group by using kubectl api-versions command
kubectl api-versions
admissionregistration.k8s.io/v1beta1
apiextensions.k8s.io/v1beta1
apiregistration.k8s.io/v1
apiregistration.k8s.io/v1beta1
apps/v1
apps/v1beta1
apps/v1beta2
admissionregistration.k8s.io/v1beta1
apiextensions.k8s.io/v1beta1
apiregistration.k8s.io/v1
apiregistration.k8s.io/v1beta1
apps/v1
apps/v1beta1
apps/v1beta2
extensions/v1beta1
Order of kubernetes feature maturity: v1alpha1 - v1alpha2..v1alphaN - v1beta1 - v1beta2..v1betaN - v1, we should always take latest version available.
Looking at above, we can say deployment object apiVersion is apiVersion: apps/v1
Comments
Post a Comment