Kubernetes 1.16 API changes for common resources
By Shahid Iqbal on 16 September 2019
If you are getting errors trying to create common resources such as Deployment, ReplicaSet etc. and are using an older manifest file ensure you are using the correct API version. Various beta APIs for some common resources have been removed in Kubernetes 1.16 - see table below for details.
Note: These API have been marked as deprecated for several releases now and the alternative APIs have been available for several Kubernetes releases.
Kubernetes follows a 3-month release cadence and with this release cadence you can imagine there is a degree of flux within the APIs requiring older APIs to be deprecated and eventually removed.
With the release notes for each version there is notification of upcoming deprecations and removals of the APIs.
In Kubernetes 1.16 there are a handful of beta API removals which are likely to impact many more people than usual as they affect common resources such as Deployments, ReplicaSets and StatefulSets (amongst others).
You’ll need to ensure your manifest files are updated to use the latest API versions otherwise you may get failures when creating these resources in Kubernetes 1.16.
Note: Some of the updated APIs have been available for several Kubernetes versions (e.g. apps/v1 GA’ed in Kubernetes 1.9) and therefore you shouldn’t need to maintain multiple versions of your manifests files unless you’re stuck supporting very old versions of Kubernetes.
Summary of the changes
To keep this post brief and rather than repeating the content from the Kubernetes release notes, I’ll summarise the changes that are likely to impact most people.
To summarise the main resource API changes in 1.16 are
You can see details of all the upcoming deprecations/removals here:
You should consider using a tool like Kubeval to help you find these types of issues.
There are other planned changes (e.g. Ingress in Kubernetes 1.19), keep and eye on the release notes for each Kubernetes version.
You’ll always get plenty of notice of deprecation before an API is removed.
As always if you have any questions of spot an issue please reach out to me on the links in the left hand side bar.