Which Kubernetes apiVersion Should I Use?
An object definition in Kubernetes requires an 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.
However, the official Kubernetes documentation provides little guidance on apiVersion
. This guide gives you a cheat sheet on which version to use, explains each version, and gives you the timeline of releases.
Kind | apiVersion |
Service | v1 |
StatefulSet | apps/v |
ClusterRole | rbac.authorization.k8s.io/v1 |
ComponentStatus | v1 |
ConfigMap | v1 |
ControllerRevision | apps/v1 |
CronJob | batch/v1beta1 |
DaemonSet | extensions/v1beta1 |
Deployment | extensions/v1beta1 |
Endpoints | v1 |
Event | v1 |
HorizontalPodAutoscaler | autoscaling/v1 |
Ingress | extensions/v1beta1 |
Job | batch/v1 |
LimitRange | v1 |
Namespace | v1 |
NetworkPolicy | extensions/v1beta1 |
Node | v1 |
PersistentVolumeClaim | v1 |
PersistentVolume | v1 |
PodDisruptionBudget | policy/v1beta1 |
Pod | v1 |
PodSecurityPolicy | extensions/v1beta1 |
PodTemplate | v1 |
ReplicaSet | extensions/v1beta1 |
ReplicationController | v1 |
ResourceQuota | v1 |
RoleBinding | rbac.authorization.k8s.io/v1 |
Role | rbac.authorization.k8s.io/v1 |
Secret | v1 |
ServiceAccount | v1 |
CertificateSigningRequest | certificates.k8s.io/v1beta1 |
ClusterRoleBinding | rbac.authorization.k8s.io/v1 |