Description
Before upgrading a cluster, check the kind and apiVersion used by your manifests and API clients. Once an endpoint is removed, requests to create or update resources through it fail.
Potential impact
Automated deployments can fail if required fields or defaults change. Objects already stored in the cluster survive removal of the old endpoint.
Remediation
Use the migration guide for the target version to update manifests and clients. Check required fields and defaults, then test deployment through the new API before upgrading.
Examples
Kubernetes stopped serving apps/v1beta1 Deployments in 1.16. With apps/v1, supply a selector and matching labels on the Pod template omitted from the example.
Before
yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
After
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx