User Tools

Site Tools


k8s:core:apiversion

apiVersion

apiVersion defines which version of the Kubernetes API you are using.

Why it matters

Kubernetes evolves over time:

  • Features change
  • APIs are updated
  • Some versions are deprecated

So you must specify the correct version.

Examples

  • Pods → v1
  • Services → v1
  • Deployments → apps/v1
  • Ingress → networking.k8s.io/v1

Example usage

apiVersion: apps/v1

Key idea

apiVersion = “which Kubernetes API understands this object”

k8s/core/apiversion.txt · Last modified: by phong2018