API Deprecations
apiVersion in manifest selects API version- Deprecated → warning, object still created
- Removed → error, object not created
- Fix: update
apiVersion per Deprecated API Migration Guide
API maturity
| Stage | Stability |
|---|
| Alpha | May break anytime |
| Beta | Likely stable, may change |
GA (v1) | Stable |
kubectl
kubectl api-versions
kubectl api-resources
kubectl apply -f obj.yaml
Common migrations (know pattern)
| Old | New |
|---|
autoscaling/v2beta2 HPA | autoscaling/v2 |
rbac.authorization.k8s.io/v1beta1 | v1 |
networking.k8s.io/v1beta1 Ingress | networking.k8s.io/v1 |
batch/v1beta1 CronJob | batch/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