Kubernetes APIs evolve: some versions are deprecated, then removed during upgrades. If your manifests use a removed API, your deployments will fail after the cluster upgrade. This guide explains the lifecycle of APIs, how to detect obsolete versions, and how to migrate your resources before it is too late.
What you will learn
- Understand the lifecycle of Kubernetes APIs (alpha → beta → stable)
- Tell apart a deprecated API (warning) from a removed API (error)
- Detect obsolete APIs in your YAML files, Helm charts and cluster
- Migrate your resources with
kubectl convertand the right tools - Automate the detection in your CI/CD pipeline
Prerequisites: know how to write Kubernetes manifests and understand semantic versioning.
Why do APIs change?
Kubernetes evolves its APIs through a process announced in advance, which leaves time to react. Each feature goes through successive maturity phases before it is stabilized or abandoned, and the version name is enough to tell where it stands.
The lifecycle of an API
A Kubernetes API never disappears overnight: it goes through five states, and the version name (v1alpha1, v1beta1, v1) is enough to tell where it stands.
The classic trap is to believe a beta API is safe because your cluster serves it. It can be removed 9 months or 3 releases (whichever is longer) after its deprecation. A stable API, on the other hand, is never removed within major version 1.x, according to the Kubernetes deprecation policy. The "Typical duration" column of the table therefore tells you how long you have to migrate once the warning has appeared.
The diagram follows these states. Look at where the arrows lead: only the beta branch, then deprecated, leads to an announced removal; a stable API never disappears within 1.x, and an alpha API can disappear without notice.
| Phase | Characteristics | Typical duration |
|---|---|---|
Alpha (v1alpha1) | Disabled by default, may change or disappear without notice | Variable |
Beta (v1beta1) | Disabled by default for a new API since 1.24, tested but may still change | 9+ months minimum |
Stable (v1) | Guaranteed compatible, no breaking changes | Indefinite |
| Deprecated | Still working but marked obsolete, warnings in the logs | 9 months or 3 releases minimum (beta) |
| Removed | Gone, manifests fail | - |
What it means for your deployments
The difference between deprecation and removal shows at runtime. A deprecated API applies the resource and writes a warning that nobody reads in the CI logs. A removed API returns a blocking error, and the message below is misleading: it talks about CRDs while the real problem is an apiVersion that the cluster no longer serves.
When an API is removed:
kubectl apply --dry-run=server -f /tmp/old.yamlThe file /tmp/old.yaml describes a CronJob in batch/v1beta1, an API removed in 1.25. On a 1.37.2 cluster, the --dry-run=server option asks the API server whether it would accept the manifest, without creating anything:
error: resource mapping not found for name: "old" namespace: "" from "/tmp/old.yaml": no matches for kind "CronJob" in version "batch/v1beta1"ensure CRDs are installed firstYour manifest becomes unusable. The cluster no longer recognizes this apiVersion + kind combination.
Historical examples of major removals
These removals broke thousands of deployments. Learn from history so as not to repeat it.
Kubernetes 1.16: the great cleanup
The extensions/v1beta1 and apps/v1beta1 APIs were removed after years of deprecation. The migration was mechanical, a simple change of apiVersion in four lines of YAML, but one detail caught many teams out: apps/v1 makes the spec.selector field mandatory and immutable, whereas extensions/v1beta1 inferred it from the labels of the template. A kubectl apply of the migrated manifest therefore failed when it had no spec.selector, even after the apiVersion was fixed.
| Resource | Old API (removed) | New API |
|---|---|---|
| Deployment | extensions/v1beta1 | apps/v1 |
| DaemonSet | extensions/v1beta1 | apps/v1 |
| ReplicaSet | extensions/v1beta1 | apps/v1 |
| StatefulSet | apps/v1beta1 | apps/v1 |
| NetworkPolicy | extensions/v1beta1 | networking.k8s.io/v1 |
NetworkPolicy also leaves extensions/v1beta1 in 1.16, but for a different API group, networking.k8s.io/v1. Its fields do not change.
Kubernetes 1.22: Ingress and others
The 1.22 wave was more painful than the 1.16 one because it was not limited to a change of apiVersion. The Ingress in networking.k8s.io/v1 requires a different structure for the backend and a mandatory pathType field, which breaks Helm charts whose templates were not adapted. Note the double row in the table: manifests written before 1.14 pointed to extensions/v1beta1, those written afterwards to networking.k8s.io/v1beta1, and both fell in the same version.
| Resource | Old API (removed) | New API |
|---|---|---|
| Ingress | extensions/v1beta1 | networking.k8s.io/v1 |
| Ingress | networking.k8s.io/v1beta1 | networking.k8s.io/v1 |
| CertificateSigningRequest | certificates.k8s.io/v1beta1 | certificates.k8s.io/v1 |
| ValidatingWebhookConfiguration | admissionregistration.k8s.io/v1beta1 | admissionregistration.k8s.io/v1 |
| Role, RoleBinding, ClusterRole, ClusterRoleBinding | rbac.authorization.k8s.io/v1beta1 | rbac.authorization.k8s.io/v1 |
| PriorityClass | scheduling.k8s.io/v1beta1 | scheduling.k8s.io/v1 |
The RBAC objects and the PriorityClass are migrated by changing only the apiVersion: their fields stay the same.
Kubernetes 1.25: PodSecurityPolicy
Most rows of the table below are migrated by replacing the apiVersion. Three also require rereading fields:
PodDisruptionBudget: an emptyselector({}) selected no Pod inpolicy/v1beta1, and selects every Pod of the namespace inpolicy/v1.EndpointSlice: thetopologyfield ofv1beta1becomesdeprecatedTopologyinv1, read-only. On each endpoint, copykubernetes.io/hostnameintonodeNameandtopology.kubernetes.io/zoneintozone.HorizontalPodAutoscaler:targetAverageUtilizationbecomestarget.averageUtilization, together withtarget.type: Utilization.
PodSecurityPolicy has no equivalent: it is the only case on this page where automatic tooling cannot help you, because the security model changes completely. An organization that had built a dozen PSPs carefully split by team had to choose between the three standard profiles of the Pod Security Standards and writing policies in a third-party admission engine.
The last two rows of the table are the most common in old repositories: CronJob in batch/v1beta1 and HorizontalPodAutoscaler in autoscaling/v2beta1 also disappear in 1.25. The autoscaling/v2beta2 HPA lasted one more release, until 1.26, and is also migrated to autoscaling/v2.
| Resource | Old API (removed) | Replacement |
|---|---|---|
| PodSecurityPolicy | policy/v1beta1 | Pod Security Standards (PSS) |
| PodDisruptionBudget | policy/v1beta1 | policy/v1 |
| EndpointSlice | discovery.k8s.io/v1beta1 | discovery.k8s.io/v1 |
| CronJob | batch/v1beta1 | batch/v1 |
| HorizontalPodAutoscaler | autoscaling/v2beta1 | autoscaling/v2 |
Kubernetes 1.37: two removals that tools cannot see
The three previous examples are removed APIs, which you can spot by reading the apiVersion of your manifests: this is what Pluto and kubent do, covered further down. Version 1.37 brings two changes of a different nature, which these tools do not report, because no apiVersion changes.
| Change | What breaks |
|---|---|
| Static Pods can no longer reference API resources | a Static Pod that mounts a Secret or a ConfigMap is rejected when the file is loaded, and no mirror Pod appears |
kubectl run --filename / -f is deprecated | nothing breaks: the flag is ignored, with a warning |
The first change deserves a closer look, because it is hard to diagnose. The kubelet does not start the Pod and then fail: it refuses the configuration file itself. As a direct consequence, kubectl get pods shows nothing, not even a Pod in error, and the only place where the refusal is written is the kubelet journal:
journalctl -u kubelet | grep -i "static pod"E0914 14:10:16.293719 219 file.go:107] "Unable to process watch event"err="can't process config file \"/etc/kubernetes/manifests/lab-staticpod.yaml\":static pods may not reference secrets"The second one is harmless, and the nuance matters so that you do not hunt for a failure that does not exist. The --filename flag does nothing, but kubectl now says so out loud:
Flag --filename has been deprecated, it is ignored by kubectl runand will be removed in a future releaseKeep the general rule from this: an upgrade can break something other than an apiVersion. A change in kubelet behavior or a flag that stops being tolerated leaves no trace in your YAML, and no manifest analyzer will see them.
Detect obsolete APIs
The four methods below do not look in the same place, and that is what decides which one you need.
| Method | What it reads | Contacts the cluster? |
|---|---|---|
1. kubectl | a manifest, which the API server accepts or refuses | yes |
| 2. Cluster API | the list of APIs the cluster serves | yes |
| 3. Pluto | your files (and the Helm releases of the cluster) | no, for files |
| 4. kubent | the objects already created in the cluster | yes |
None replaces the others, because what breaks when an API is removed is the client that calls it: a manifest, a Helm chart, an operator or a script. The API server serves an already stored object in every version it exposes, so it keeps serving it in the replacement version. In practice, you combine a file analysis in continuous integration, a sweep of the cluster before each version upgrade, and a search for the clients that still call a deprecated API.
Method 1: kubectl with warnings
Since Kubernetes 1.19, kubectl shows warnings for deprecated APIs:
kubectl apply -f old-ingress.yamlWarning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+;use networking.k8s.io/v1 Ingressingress.extensions/my-ingress createdThis method has a limit: you only see the warning at the moment of the apply, which hardly helps to audit a whole repository. For an API that is already removed, there is a workaround that creates nothing: kubectl apply --dry-run=server -f <file> asks the API server whether it accepts the manifest. On an API it no longer serves, it answers with the no matches for kind ... in version ... error seen above, with exit code 1. A for f in manifests/*.yaml loop that runs this command and prints the names of the rejected files therefore gives you, with no tool to install, the list of manifests to migrate to an API that your cluster has already removed.
Method 2: cluster API resources
List the API versions supported by your cluster:
# All available APIskubectl api-versions
# Check whether an API existskubectl api-versions | grep networking.k8s.ioTo see which version is preferred for a resource:
kubectl api-resources | grep -i ingressMethod 3: audit with Pluto
Pluto is a CLI tool dedicated to detecting obsolete APIs. It works on files first, so you can run it before any contact with a cluster, that is in a pull request. It embeds its own database of Kubernetes versions and can also read the Helm releases stored in the cluster. The Pluto guide (in French) details its options; below is the essential for this lesson.
-
Install Pluto
The project publishes a
checksums.txtfile next to each archive. Verify the digest before extracting the binary: this check is what separates a reproducible installation from a blind download.Terminal window brew install FairwindsOps/tap/plutoTerminal window PLUTO_VERSION=5.24.3BASE="https://github.com/FairwindsOps/pluto/releases/download/v${PLUTO_VERSION}"curl -sSLO "${BASE}/pluto_${PLUTO_VERSION}_linux_amd64.tar.gz"curl -sSLO "${BASE}/checksums.txt"grep "pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" checksums.txt | sha256sum --check -tar xzf "pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" plutosudo install -m 0755 pluto /usr/local/bin/plutoThe verification must print
pluto_5.24.3_linux_amd64.tar.gz: OK. Any other output means the archive is corrupted or tampered with: do not extract it. -
Scan a directory of manifests
Terminal window pluto detect-files -d ./manifests/Output:
NAME KIND VERSION REPLACEMENT REMOVED DEPRECATED REPL AVAILmy-ingress Ingress extensions/v1beta1 networking.k8s.io/v1 true true truerestricted PodSecurityPolicy policy/v1beta1 true true falseThe
REPL AVAILcolumn decides your workload: attrue, a replacement exists and the migration boils down to changing theapiVersion, unless fields change too, as for the Ingress or the EndpointSlice seen above. Atfalse, as for the PodSecurityPolicy above, there is no equivalent resource: you have to rethink the configuration. -
Scan the deployed Helm releases
Charts that are already installed escape file scans: the rendered YAML exists nowhere on disk. Pluto reads it from the Helm release Secrets.
Terminal window pluto detect-helm -owide -
Target a specific Kubernetes version
By default, Pluto compares against the versions in its internal database. By setting the target version, you get the exact list of what will break in the planned upgrade, without noise on the APIs that are still valid.
Terminal window pluto detect-files -d ./manifests/ --target-versions k8s=v1.37.0
Method 4: kubent (Kube No Trouble)
kubent attacks the problem from the other end: instead of reading your files, it queries the cluster. Its kubectl collector reads the kubectl.kubernetes.io/last-applied-configuration annotation, which kubectl apply sets on the object and which keeps the original apiVersion, and its Helm v3 collector reads the releases stored in Secrets or ConfigMaps. It thus finds the objects created by kubectl apply or by Helm whose YAML is no longer in any Git repository. An object created without this annotation, for example by an operator or by kubectl create, escapes it.
The project does not publish a checksum file for its archives, but it provides a container image. Pinning it by digest guarantees that you run exactly the verified binary:
# kubent 0.7.3, image pinned by digestdocker run --rm \ -v "$HOME/.kube/config:/.kube/config:ro" \ ghcr.io/doitintl/kube-no-trouble@sha256:33016a690ca145963a0689cbe00a8499e1ba4d33c43629f9140d52e1ba698a2b \ --kubeconfig /.kube/configOn a workstation where kubent is already installed, the command boils down to kubent. The output groups the objects by the Kubernetes version that will remove them:
>>> Deprecated APIs removed in 1.25 <<<-----------------------------------------KIND NAMESPACE NAME API_VERSIONPodSecurityPolicy <cluster> restricted policy/v1beta1Spot the clients that call a deprecated API
When the object comes from an operator or a script whose author you do not know, the previous tools do not always see it. Since Kubernetes 1.19, the API server counts the requests made to a deprecated API: the apiserver_requested_deprecated_apis metric is 1 for each deprecated API requested since the queried instance started, with the labels group, version, resource, subresource and removed_release, the version that will stop serving it. You read it with kubectl get --raw /metrics | grep apiserver_requested_deprecated_apis.
The metric says which API is called, not by whom. To identify the client, enable API server auditing: the audit events for requests to a deprecated API carry the "k8s.io/deprecated":"true" annotation, and their content names the user and the object concerned. The official documentation points to these two sources in the "Locate use of deprecated APIs" section of the migration guide.
Migrate to the new APIs
Migration falls into two categories, and knowing which one you are in saves time. When only the apiVersion changes, tooling does the work. When the structure of the fields changes, like the backend of an Ingress going from two flat keys to a nested object, kubectl convert renames the fields, but choosing the values that the new version makes mandatory, like pathType, remains up to you.
The REPL AVAIL column of Pluto, seen above, answers precisely this question before you start.
Method 1: kubectl convert
The kubectl convert plugin transforms manifests to a new API. It is not a native kubectl subcommand: it is a separate binary that the Kubernetes documentation distributes on its own and that kubectl discovers thanks to its name kubectl-convert. The project publishes a SHA-256 digest next to each binary; the check below takes ten seconds and avoids running a file altered in transit.
-
Install the plugin
Terminal window K8S_VERSION="v1.37.2"BASE="https://dl.k8s.io/release/${K8S_VERSION}/bin/linux/amd64"curl -sSLO "${BASE}/kubectl-convert"curl -sSLO "${BASE}/kubectl-convert.sha256"echo "$(cat kubectl-convert.sha256) kubectl-convert" | sha256sum --check -sudo install -m 0755 kubectl-convert /usr/local/bin/kubectl-convertThe
K8S_VERSIONvariable follows the version of your cluster: replacev1.37.2with the version thatkubectl versionshows for the server. The verification command must printkubectl-convert: OK. Then check thatkubectlrecognizes the plugin withkubectl convert --help. -
Convert a manifest
Terminal window kubectl convert -f old-ingress.yaml --output-version networking.k8s.io/v1 > new-ingress.yaml -
Check the result
For an Ingress,
kubectl convertrenamesserviceNameandservicePorttoservice.nameandservice.port, and fills in thepathTypefield, which v1 requires, withImplementationSpecific, the default value of v1beta1. It does not choose a more precise value for you, so the converted file may need a manual adjustment:# Before (v1beta1) - no pathType- path: /api# After (v1) - pathType mandatory- path: /apipathType: ImplementationSpecific # value added by the conversion; Prefix or Exact if you want a precise match
Method 2: manual migration
When kubectl convert is not available, or when you want to control every value, for example the pathType of an Ingress, the migration is done by hand. The process below adds two safeguards that kubectl convert does not offer: a backup of the live object before modification, and a reading of the official migration guide, which documents the fields with no equivalent.
-
Back up the current resource
Terminal window kubectl get ingress my-ingress -o yaml > backup-ingress.yaml -
Consult the migration documentation
The Deprecated API Migration Guide lists, version by version, the removed APIs and their replacement. On the cluster,
kubectl api-resourcestells you under which API a type is served today, andkubectl explain ingress.spec.rules.http.paths.backenddescribes the fields the current version expects. -
Adapt the manifest
A migration changes the API, not what the object describes: the Service name, the port, the host and the path stay exactly the same, only their shape changes. Example for Ingress v1beta1 → v1:
# BeforeapiVersion: networking.k8s.io/v1beta1kind: Ingressmetadata:name: my-ingressspec:rules:- host: example.comhttp:paths:- path: /apibackend:serviceName: api-serviceservicePort: 80# AfterapiVersion: networking.k8s.io/v1kind: Ingressmetadata:name: my-ingressspec:rules:- host: example.comhttp:paths:- path: /apipathType: ImplementationSpecific # NEW: mandatory, value of v1beta1 without pathTypebackend:service: # NEW: nested structurename: api-serviceport:number: 80 -
Apply and validate
Terminal window kubectl apply -f new-ingress.yamlkubectl describe ingress my-ingressCompare the output of
describewithbackup-ingress.yaml: the host, the path, the Service and the port must be the same as before.
Automate detection in CI/CD
A scan run by hand only finds a regression the day someone remembers to run it again. Automating it moves the check to the moment when the debt is introduced, in the pull request that adds the manifest, instead of the moment when it costs a lot, during the version upgrade.
The two examples that follow share three deliberate choices: the Pluto version is pinned and verified by digest, so that an upstream update does not change the verdict without warning; --target-versions names the version you aim for, not the one you run; and the job fails on a removed API, without which the report is just a file nobody opens.
GitHub Actions with Pluto
The pull_request trigger filtered on manifests/** and charts/** avoids running the scan on every documentation commit. The workflow installs Pluto with the same digest verification as above, then scans the manifests and the Helm charts.
name: Check Kubernetes API deprecations
on: pull_request: paths: - 'manifests/**' - 'charts/**'
permissions: {}
jobs: pluto: runs-on: ubuntu-24.04 permissions: contents: read
env: PLUTO_VERSION: "5.24.3"
steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false
- name: Install Pluto run: | base="https://github.com/FairwindsOps/pluto/releases/download/v${PLUTO_VERSION}" curl -sSLO "${base}/pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" curl -sSLO "${base}/checksums.txt" grep "pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" checksums.txt | sha256sum --check - tar xzf "pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" pluto sudo install -m 0755 pluto /usr/local/bin/pluto
- name: Check manifests run: pluto detect-files -d ./manifests/ --target-versions k8s=v1.37.0
- name: Check Helm charts run: | for chart in ./charts/*/; do helm template test "$chart" | pluto detect - donePluto exit codes
Pluto does not just print a report, it translates severity into its exit code. This is what lets you block a pull request without parsing the text output. A fourth code exists in addition to the three in the table: 4 means that a removed API has no replacement available, the case of PodSecurityPolicy. The --ignore-deprecations, --ignore-removals and --ignore-unavailable-replacements options each neutralize the matching code.
| Code | Meaning | CI/CD action |
|---|---|---|
| 0 | No obsolete API | Continue |
| 2 | Deprecated APIs found | Warn (optional) |
| 3 | Removed APIs found | Block the merge |
| 4 | Removed API with no replacement | Block, and plan a rewrite |
The distinction between codes 2 and 3 depends not on the manifest but on the target version, and that is what makes --target-versions structural. The same Ingress in extensions/v1beta1 analyzed against two different targets gives:
pluto detect-files -d ./manifests/ # code 3pluto detect-files -d ./manifests/ --target-versions k8s=v1.21.0 # code 2In the second case, the REMOVED column becomes false: on a 1.21 cluster, this API still exists. The manifest has not changed, your deadline has.
The trap, in a GitHub Actions step, is that the shell runs with set -e: if Pluto exits with 3, the step stops before reaching the line that reads $?. You therefore have to capture the code in the same command.
- name: Check and fail on removed APIs run: | exit_code=0 pluto detect-files -d ./manifests/ --target-versions k8s=v1.37.0 || exit_code=$? if [ "$exit_code" -ge 3 ]; then echo "::error::Removed APIs detected, migration required." exit 1 fi if [ "$exit_code" -eq 2 ]; then echo "::warning::Deprecated APIs detected." fiGitLab CI
The logic is the same on the GitLab side, with one useful difference: the markdown output format produces a readable report that you keep as an artifact. The when: always is essential: without it the artifact disappears precisely in the case you care about, the one where the job fails because removed APIs were found.
api-deprecation-check: stage: validate image: alpine:3.22@sha256:5291449c3df73caf6ed85e649dec1b9e818b39a5d8c871e97afc13e9cd5e8fa8 variables: PLUTO_VERSION: "5.24.3" before_script: - apk add --no-cache curl tar - base="https://github.com/FairwindsOps/pluto/releases/download/v${PLUTO_VERSION}" - curl -sSLO "${base}/pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" - curl -sSLO "${base}/checksums.txt" - grep "pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" checksums.txt | sha256sum -c - - tar xzf "pluto_${PLUTO_VERSION}_linux_amd64.tar.gz" pluto - install -m 0755 pluto /usr/local/bin/pluto script: - pluto detect-files -d ./manifests/ --target-versions k8s=v1.37.0 -o markdown > deprecation-report.md artifacts: paths: - deprecation-report.md when: always allow_failure: falseBest practices
Two rhythms coexist, and they must not be confused. The first is one-off, tied to a specific version upgrade, and what matters is the order of operations. The second is continuous, and what matters is preventing the debt from building up again between two upgrades.
Before a cluster upgrade
The order of these five steps is not up for debate, and the most common mistake is to reverse it: you upgrade the cluster, then you discover the broken manifests. Migration comes before the version upgrade, because a manifest written in the new apiVersion works already on the old cluster, whereas the reverse is false.
- Scan all manifests with Pluto or kubent.
- Aim at the target version:
--target-versions k8s=v1.X.0. - Migrate, then test in a staging environment.
- Update the Helm charts if you use any.
- Upgrade the cluster only after the migration.
Continuous maintenance
Scanning only at upgrade time turns the version upgrade into a project. The rhythm below spreads the effort: the check in the pull request prevents new debt from arriving, and the monthly scan targeting the current version plus two gives you the lead time to migrate without urgency, since Kubernetes publishes about three minor versions a year.
| Frequency | Action |
|---|---|
| On every PR | Scan the modified manifests |
| Monthly | Scan the whole repo with the current K8s version + 2 |
| Before an upgrade | Full report on the target version |
Compatibility reference
Tools embed a version database frozen at the time they are built: on a recent version of Kubernetes, they may miss a deprecation announced after their last release. The Pluto database lists no removal later than Kubernetes 1.36: a k8s=v1.37.0 target therefore gives the same verdict as a 1.36 target. The three pages below are authoritative. The first explains the rules of the game, the second gives the exhaustive table API by API, and the third specifies the version skew tolerated between kubectl, the control plane and the kubelets.
Put it into practice
The lab gives you a repository of six legacy manifests, four of which use an API removed from Kubernetes. You spot which ones with one of the detection methods of the lesson, migrate them to the current API without changing anything they describe, then apply them in the migration namespace. A manifest is migrated, not deleted: the six files stay in the repository. The validation checks that your rapport.txt lists exactly the manifests that used a removed API, that the API server accepts every manifest of the repository, that the four migrated objects exist in the migration namespace, and that they describe exactly what the original manifests described.
The module challenge, done alone and without hints, has its own page: Migrate removed APIs.
Key takeaways
- Kubernetes APIs follow a lifecycle: alpha → beta → stable → deprecated → removed
- A deprecated API still works (with warnings), a removed API breaks your deployments
- A stable API is never removed within major version 1.x; a deprecated beta API stays served for 9 months or 3 releases at least
- Use Pluto or kubent to detect obsolete APIs in your manifests and your cluster;
kubectl apply --dry-run=serverspots, without creating anything, a manifest that the cluster refuses - A change of
apiVersionis not always enough: in 1.25,PodDisruptionBudget,EndpointSliceandHorizontalPodAutoscaleralso require rereading fields - kubectl convert migrates a manifest to another API version, including a field renaming like the backend of an Ingress, but it does not replace a resource with no equivalent like PodSecurityPolicy
- A migration changes the API, not what the object describes: re-read values and targets afterwards
- What breaks when an API is removed is the client that calls it (manifest, chart, operator, script): the
apiserver_requested_deprecated_apismetric and API server auditing help to find it - Automate the detection in your CI/CD to block PRs with removed APIs
- Scan before every cluster upgrade with the target version
Knowledge check
Seven questions to check that you tell a deprecated API from a removed API, that you know which tool to reach for depending on whether the resource lives in a file or in the cluster, that you read a Pluto exit code correctly and that you know which fields to reread when migrating.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Migrate removed APIs
A new full quiz with random questions
Work again only on the questions you missed