Skip to content
Rahul Shishodiaon GitHub LinkedIn profile

API Deprecations

  • apiVersion in manifest selects API version
  • Deprecated → warning, object still created
  • Removederror, object not created
  • Fix: update apiVersion per Deprecated API Migration Guide

API maturity

StageStability
AlphaMay break anytime
BetaLikely stable, may change
GA (v1)Stable

kubectl

kubectl api-versions
kubectl api-resources
kubectl apply -f obj.yaml    # warning vs error tells you status

Common migrations (know pattern)

OldNew
autoscaling/v2beta2 HPAautoscaling/v2
rbac.authorization.k8s.io/v1beta1v1
networking.k8s.io/v1beta1 Ingressnetworking.k8s.io/v1
batch/v1beta1 CronJobbatch/v1
  • Prefer highest stable version when writing new manifests
  • kubectl api-versions does not show deprecation status

Exam tips

  • Warning on apply → still works but fix apiVersion before upgrade
  • Error on apply → API removed: must change version + sometimes field names
  • Keep migration guide open; use Ctrl+F by resource kind