Chapter 13. API Deprecations

The Kubernetes project periodically releases new versions. Every release adds new features and bug fixes but may also introduce deprecations to existing APIs. An API is the interface that application developers interact with when defining Kubernetes objects.

Deprecations may come into effect if the Kubernetes team plans to change, replace, or completely remove support for an API. You need to understand how to handle API deprecations to avoid issues before updating nodes to a newer Kubernetes version.

Understanding the Deprecation Policy

The Kubernetes project releases three versions per calendar year. Optimally, the administrator of a Kubernetes cluster upgrades to the latest version as early as possible to incorporate enhancements and security fixes. However, upgrading a cluster doesn’t come without potential cost and risk. You need to ensure that existing objects running in the cluster will still be compatible with the version you are upgrading to.

A Kubernetes release can deprecate an API, which means that it is scheduled for removal or replacement. The rules for introducing a deprecation follow the deprecation policy explained in the Kubernetes documentation.

The value you assign to the version attribute in a manifest specifies the API version. The use of a deprecated API renders a warning message when creating or updating ...

Get Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.