Easily check your clusters for use of deprecated APIs
Kubernetes 1.16 is slowly starting to roll out, not only across various managed Kubernetes offerings, and with that come a lot of API deprecations1.
Kube No Trouble (kubent
) is a simple tool to check whether you're using
any of these API versions in your cluster and therefore should upgrade your
workloads first, before upgrading your Kubernetes cluster.
This tool will be able to detect deprecated APIs depending on how you deploy your resources, as we need the original manifest to be stored somewhere. In particular following tools are supported:
- file - local manifests in YAML or JSON
- kubectl - uses the
kubectl.kubernetes.io/last-applied-configuration
annotation - Helm v3 - uses Helm manifests stored as Secrets or ConfigMaps directly in individual namespaces
Additional resources:
- Blog post on K8s deprecated APIs and introduction of kubent: Kubernetes: Deprecated APIs aka Introducing Kube-No-Trouble
Run the following command in your terminal to install kubent
using a shell script:
sh -c "$(curl -sSL https://git.io/install-kubent)"
(The script will download latest version and unpack to /usr/local/bin
).
You can download the latest release for your platform and unpack manually.
Please note that third-party installation methods are maintained by the community.
The packages may not always be up-to-date with the latest releases of kubent
.
kubent
is available as a formula
on Homebrew. If you're using macOS or Linux, you can run
the following command to install kubent
:
brew install kubent
Configure Kubectl's current context to point to your cluster, kubent
will
look for the kube .config
file in standard locations (you can point it to custom
location using the -k
switch).
kubent
will collect resources from your cluster and report on found issues.
Please note that you need to have sufficient permissions to read Secrets in the
cluster in order to use Helm*
collectors.