Check deprecated Kubernetes APIs with kubent before you upgrade
kubent (kube-no-trouble), by DoiT. Checked against the upstream README (opens in new tab), release 0.7.3 (opens in new tab) (kubent --help and a file scan), kubepug v1.7.1 (kubepug --help and a file scan), the kubepug database file, and the cloud docs linked below.
kubent reports Kubernetes objects whose stored manifest still uses an API version its rules mark as deprecated or removed. Run it before you upgrade EKS, AKS, or GKE. It does not upgrade the cluster and it does not edit manifests.
Maintenance
doitintl/kube-no-trouble (opens in new tab) is not archived. The latest release is still 0.7.3 (opens in new tab), published Aug 30, 2024. The last commit on master is Jan 11, 2025, and it only updates CI. No ruleset after Kubernetes 1.32 has been added.
In December 2025 the maintainer who had been adding those rules said they could no longer maintain the DoiT repository (issue 732 (opens in new tab)) and pointed at a personal fork, dark0dave/kube-no-trouble (opens in new tab). That fork has no GitHub release, the same rules through 1.32, and no commits after Dec 13, 2025. A stale-bot closed issue 732 on Sep 6, 2026. That close is not a new release.
Use 0.7.3 for the versions it knows. A clean run aimed at 1.33 or later is not evidence those versions are clear. Use Pluto (opens in new tab) and the provider check. kubepug (opens in new tab) is stale too: its published database was last modified Jan 15, 2025 and records introductions only through 1.32. Then read the Kubernetes deprecated API migration guide (opens in new tab).
What 0.7.3 detects
The binary embeds rego rules and loads all of them on every run. kubent --version on the 0.7.3 linux-amd64 release prints version 0.7.3 to stderr. A file scan with that binary loads:
deprecated-1-16.regodeprecated-1-22.regodeprecated-1-25.regodeprecated-1-26.regodeprecated-1-27.regodeprecated-1-29.regodeprecated-1-32.rego—flowcontrol.apiserver.k8s.io/v1beta3FlowSchema and PriorityLevelConfiguration, replacementflowcontrol.apiserver.k8s.io/v1deprecated-future.rego— VolumeSnapshot, VolumeSnapshotClass, and VolumeSnapshotContentsnapshot.storage.k8s.io/v1beta1
There is no deprecated-1-33 (or later) file. The 1.32 ruleset is the newest removal set in the release. PodSecurityPolicy in the 1.25 rules has replacement <removed>, not another apiVersion.
Three collectors feed those rules. The README names them:
- Cluster (on by default). Lists live objects, then keeps a resource only when it has the
kubectl.kubernetes.io/last-applied-configurationannotation, or an annotation you add with--additional-annotation. The apiVersion in that annotation is what gets judged. The API server's converted object is not. - Helm v3 (on by default,
--helm3). Reads Helm manifests stored as Secrets or ConfigMaps. Reading Secrets requires permission to get them. Turn the collector off with--helm3=false. - File (
-f/--filename, or-for stdin). Local YAML or JSON. This is how unapplied manifests get into the report. They are invisible otherwise.
Install
0.7.3 is the latest release. Pin it. The linux-amd64 archive contains one file, named kubent. The same release publishes linux-arm64, darwin-amd64, darwin-arm64, and windows-amd64 archives, using the name kubent-0.7.3-<os>-<arch>.tar.gz.
curl -fsSL -o kubent.tar.gz https://github.com/doitintl/kube-no-trouble/releases/download/0.7.3/kubent-0.7.3-linux-amd64.tar.gz
tar -xzf kubent.tar.gz
sudo install -m 0755 kubent /usr/local/bin/kubent
kubent --version The README's install script downloads the latest release into /usr/local/bin unless you change that. Read scripts/install.sh (opens in new tab) before you run it. On Nov 15, 2026 the short link below redirected to that script:
sh -c "$(curl -sSL https://git.io/install-kubent)" Homebrew and Scoop are community packages. The README says they may lag the latest release:
brew install kubent
scoop install kubent The README also documents a container image, ghcr.io/doitintl/kube-no-trouble, tagged latest and per release. This page did not verify the registry listing. The command the README shows, against your kubeconfig:
docker run -it --rm \
-v "$HOME/.kube/config:/.kubeconfig" \
ghcr.io/doitintl/kube-no-trouble:latest \
-k /.kubeconfig Run it against a cluster
Point kubectl at the cluster first. kubent reads the current context of the kubeconfig at ~/.kube/config, or the KUBECONFIG path list. -k / --kubeconfig overrides KUBECONFIG. -x / --context picks a context other than current-context.
kubent --context prod
kubent --kubeconfig ~/.kube/prod-config --context prod Stderr gets the logs: version, collectors, how many resources each returned, which rulesets loaded, and the target version when one was detected or set. Stdout gets the table, and nothing else. Empty stdout means no finding survived the filter.
Flags from kubent --help on 0.7.3, which matches the README. Defaults in parentheses:
| Flag | What it does |
|---|---|
-x, --context | Kubeconfig context. Default is the file's current context. |
-k, --kubeconfig | Kubeconfig path. Overrides KUBECONFIG. |
-t, --target-version | Version to judge against, major.minor or major.minor.patch. Autodetected from the cluster when omitted. |
-e, --exit-error | Exit 200 when the report is non-empty. Default is to exit 0 even when it found issues. |
-o, --output | text (default), json, or csv. |
-O, --output-file | Where to write the report. - is stdout, the default. |
-f, --filename | Manifest file, repeatable. - reads stdin. |
-c, --cluster | Cluster collector (true). |
--helm3 | Helm v3 collector (true). --helm3=false turns it off. |
-A, --additional-annotation | Extra annotation to treat as a last-applied manifest. Repeatable. |
-a, --additional-kind | Extra kind to flag, as Kind.version.group.com. The README's example is -a ManagedCertificate.v1.networking.gke.io. |
-l, --log-level | trace through disabled. Default info. |
-v, --version | Print the version and exit. |
Read the output
Text output is grouped by ruleset. 0.7.3's columns are KIND, NAMESPACE, NAME, API_VERSION, REPLACE_WITH, and SINCE. A Deployment still stored as apps/v1beta1 looks like this:
>>> Deprecated APIs removed in 1.16 <<<
KIND NAMESPACE NAME API_VERSION REPLACE_WITH (SINCE)
Deployment default nginx-old apps/v1beta1 apps/v1 (1.9.0) The heading is the ruleset name (Deprecated APIs removed in 1.16). SINCE is when that API was deprecated (1.9.0 here), not the release that removes it. REPLACE_WITH is the apiVersion to put in the manifest. <removed> means there is no successor API; PodSecurityPolicy is that case in the 1.25 rules.
-o json emits an array of those fields (Name, Namespace, Kind, ApiVersion, RuleSet, ReplaceWith, Since). No findings is [] on stdout and exit 0.
Check a specific upgrade target
With a reachable cluster, kubent sets the target from the server version and drops findings whose SINCE is newer than that version. Pass the version you are about to upgrade to. 1.32 and 1.32.1 are both accepted; the log normalizes them (Target K8s version is 1.32.0 for 1.32).
kubent --context prod --target-version 1.32 The filter compares SINCE to the target. It does not select a ruleset by the version in the filename. --target-version 1.35 on 0.7.3 still loads only the rules listed above, logs Target K8s version is 1.35.0, and still reports an apps/v1beta1 Deployment because its SINCE (1.9.0) is older than 1.35. It will not tell you about an API that Kubernetes removed after 1.32.
A version string that is not major.minor or major.minor.patch is rejected before the scan. 0.7.3 exits 2 for that, which is not the "issues found" code.
File-only runs do not autodetect a version. The README calls that out for CI. Set --target-version yourself, and disable the collectors you are not using:
kubent -f deploy.yaml --helm3=false -c=false --target-version 1.32 Fail CI with the exit code
By default, success is exit 0 even when the table is non-empty. A runtime failure is some other non-zero code. --exit-error / -e changes the "found issues" case to exit 200. 0.7.3 does that when the filtered result list is non-empty, and still exits 0 when stdout is empty.
The job needs a kubeconfig that can see the cluster, and KUBE_CONTEXT set to the context inside it. GitHub Actions runs bash with set -e, so capture the code before the shell aborts on 200. Exit 200 means findings. Any other non-zero means kubent did not finish; the reason is on stderr.
name: kubent
on:
pull_request:
jobs:
deprecated-apis:
runs-on: ubuntu-latest
steps:
- name: Install kubent 0.7.3
run: |
curl -fsSL -o kubent.tar.gz https://github.com/doitintl/kube-no-trouble/releases/download/0.7.3/kubent-0.7.3-linux-amd64.tar.gz
tar -xzf kubent.tar.gz
sudo install -m 0755 kubent /usr/local/bin/kubent
- name: Scan the cluster
run: |
set +e
kubent --context "$KUBE_CONTEXT" --target-version 1.32 --exit-error
code=$?
set -e
if [ "$code" -eq 200 ]; then
echo "kubent found deprecated or removed APIs"
exit 1
fi
exit "$code" The README also shows two checks that do not use --exit-error: a failing command is a runtime error, and non-empty stdout is a finding. kubent -o json | jq -e 'length == 0' is the third option in the README. jq -e exits non-zero when the array is not empty.
To scan a directory of manifests in CI with no cluster, the README's form is kubent -f once per file, with --helm3=false -c=false. That still only sees files you pass. Charts you have not rendered are a Pluto job.
What it does not see
- Unapplied manifests. Git, a Helm chart that has not been installed, and kustomize output that has not been applied are invisible unless you pass them with
-for stdin. - Live objects with no last-applied annotation. The cluster collector skips them.
kubectl create, many controllers, and anything that never went throughkubectl applyleave nokubectl.kubernetes.io/last-applied-configuration.--additional-annotationonly helps when some other tool stored the original manifest in an annotation you name. - The apiVersion the API server returns. That is the current version, after conversion. kubent judges the manifest in the annotation or in the Helm release, because that is the document the next apply or upgrade will send.
- API calls. kubent does not read audit logs. A client can call a removed API without a matching object in the report, and an old object can sit unused without anyone calling it.
- Removals after 1.32. They are not in 0.7.3's rules, at any
--target-version. - Helm releases, if it cannot read Secrets. The README says the Helm collectors need that permission. A context that can list Deployments and cannot get Secrets will under-report charts.
Pair it with Pluto for manifests and charts
Pluto (opens in new tab) (FairwindsOps) is the pre-deploy scan. Its README says it checks static manifests and Helm charts in a repo, and Helm releases already installed in a cluster. kubent's file collector can read YAML you hand it. Pluto is the tool that walks a directory and a rendered chart without a cluster.
Current release when this page was checked: v5.24.5 (opens in new tab), published Nov 3, 2026. Install the binary from the releases (opens in new tab), or brew install FairwindsOps/tap/pluto. Scoop's package is not maintained by Fairwinds. Install notes: pluto.docs.fairwinds.com/installation (opens in new tab).
Commands from the quickstart (opens in new tab):
pluto detect-files -d ./manifests
helm template ./chart | pluto detect - The README's GitHub Action installs Pluto, then runs pluto detect-files:
- name: Download Pluto
uses: FairwindsOps/pluto/github-action@master
- name: Scan manifests
run: pluto detect-files -d ./manifests @master is what the README pins. Pin a tag or commit in your own workflow if you don't want that branch to move.
Run both. kubent against the cluster that is about to move, Pluto against the repo that will be applied next. A fix in Git that was never upgraded in Helm, or a fix in the cluster that was never committed, shows up in only one of them.
What to do with findings
- Read REPLACE_WITH. That is the apiVersion to write.
<removed>means replace the feature (PodSecurityPolicy is the one in the 1.25 rules), not the version string. - Change the source: the manifest in Git, the Helm chart, or the annotation's owner. Then apply or
helm upgradeso the last-applied annotation and the Helm release match the new apiVersion. Editing the live object through the API stores the converted version and leaves the old manifest where kubent reads it. kubectl convertrewrites a file to another API version. It is a kubectl plugin, documented on the kubectl reference (opens in new tab) and installed from the kubectl install page (opens in new tab). A mechanical convert can still need a human pass for defaults the new version dropped.- Run kubent again on the same context and target. Empty stdout is the clear report. Run Pluto on the repo so the next deploy does not put the old apiVersion back.
- Open the provider check below. kubent will not see clients that only call the API, objects with no stored manifest, or removals after 1.32.
Pre-upgrade checklist
- Pick the next minor, not a jump. Kubernetes allows the control plane to move one minor at a time (version skew policy (opens in new tab)). Read every removal between the current version and the target in the deprecated API migration guide (opens in new tab).
- If the target is 1.33 or newer, a clean kubent run is not the end of the check. Run Pluto on the manifests and charts, then the provider check. kubepug is in the same position as kubent: its published database was last modified Jan 15, 2025 and records introductions only through 1.32.
kubent --context <context> --target-version <minor>against the cluster you will upgrade. Helm collector on, unless you know there are no Helm releases.pluto detect-fileson the manifest directory, andhelm template ./chart | pluto detect -on charts you deploy.- Provider check for this cluster:
- EKS upgrade insights (opens in new tab). On the cluster: Monitor cluster, then the Upgrade insights tab. Deprecated API usage is one of the checks. The EKS upgrade guide (opens in new tab) says upgrade insights read deprecated API usage over a rolling 30-day window, so a fix today can leave the insight in error until that window moves.
- AKS Kubernetes API deprecations (opens in new tab). Portal: Diagnose and solve problems, then Create, Upgrade, Delete, and Scale, then Kubernetes API deprecations. AKS can block a minor upgrade when it sees recent use. Detection is on for AKS Automatic and AKS Standard, for a minor upgrade to 1.26 or later, when the last seen use was within 12 hours. AKS records hourly and ignores Get, List, and Watch. The same doc says a platform-initiated upgrade does not stop for this.
- GKE deprecation insights and recommendations (opens in new tab). GKE pauses the automatic upgrade to the next minor while it detects use, and attaches a recommendation. The documented example insight describes API clients that called a deprecated API in the last 30 days. The page also says you still have to assess exposure yourself.
- Add-ons, CSI, CNI, ingress, and node images. The service pages list the provider's own notes: EKS, AKS, GKE.
- Re-run kubent and Pluto after the manifest changes. Then upgrade.
Sources
- kube-no-trouble README (opens in new tab) and install.sh (opens in new tab). Flag list checked against
kubent --helpfrom the 0.7.3 linux-amd64 archive. - Release 0.7.3 (opens in new tab) (Aug 30, 2024). Rulesets from
pkg/rules/regoat that tag. - Issue 732 (opens in new tab), opened Dec 6, 2025, closed by a stale-bot on Sep 6, 2026. Fork: dark0dave/kube-no-trouble (opens in new tab).
- Kubernetes deprecated API migration guide (opens in new tab) and version skew policy (opens in new tab).
- View cluster insights (opens in new tab) (EKS) and Update an EKS cluster (opens in new tab).
- Stop AKS upgrades on API breaking changes (opens in new tab).
- Viewing GKE deprecation insights and recommendations (opens in new tab).
- Pluto (opens in new tab), quickstart (opens in new tab), installation (opens in new tab), v5.24.5 (opens in new tab) (Nov 3, 2026).
- kubepug (opens in new tab) README and v1.7.1 (opens in new tab) (Oct 18, 2023). Flags checked with
kubepug --helpon the linux-amd64 archive. Generator: generator/README.md (opens in new tab). Database data.json (opens in new tab), Last-Modified Jan 15, 2025.
Dates for each EKS, AKS, and GKE version are on the service pages, from the provider's version policy. This page does not change those dates.