Plugins
Reference for each plugin, with flags and examples.
Kubernetes plugins
These use only your kubeconfig and the Kubernetes API. All of them accept the standard kubectl flags (--context, --kubeconfig, -n).
| Plugin | Use it to | Example |
|---|---|---|
count | Count any resource type | kubectl count pods -A |
clone | Copy a resource with the same values | kubectl clone deploy web web-copy |
unhealthy | Find pods that are broken, and why | kubectl unhealthy -A |
pending | Explain why pods are unschedulable | kubectl pending -A |
restarts | Rank pods by restarts and last termination reason | kubectl restarts -A --min 5 |
images | List images in use and flag mutable tags | kubectl images -A --latest |
orphans | Find unused ConfigMaps, Secrets, PVCs and Services | kubectl orphans -A |
whoami | Show who the API server thinks you are | kubectl whoami |
ping | Ping an address or DNS name from inside a pod | kubectl ping web-7d4b9 8.8.8.8 |
AKS plugins
These call Azure’s management API. Read AKS targeting first for the shared flags and authentication.
| Plugin | Use it to | Example |
|---|---|---|
aks | List, describe, upgrade, start and stop clusters | kubectl aks describe |
nodepool (np) | Manage node pools | kubectl np scale userpool --count 5 |
aks-versions | See available Kubernetes versions | kubectl aks-versions --patches |
aks-maintenance | Manage maintenance windows | kubectl aks-maintenance list |
Common workflows
Why is my deployment not running?
kubectl pending -l app=web # stuck in the scheduler?
kubectl unhealthy -l app=web # scheduled but crashing or not Ready?
kubectl restarts -l app=web # how often, and why did it last die?
Can this pod reach the outside world?
kubectl ping web-7d4b9 8.8.8.8 # raw egress
kubectl ping web-7d4b9 my-svc.my-ns.svc.cluster.local # DNS and in-cluster routing
Wrong cluster, wrong user?
kubectl whoami --context prod # confirm identity and groups before changing anything
Cleaning up a namespace
kubectl orphans -n staging # unused ConfigMaps, Secrets, PVCs and dead Services
kubectl images -n staging --latest
Before an AKS upgrade
kubectl aks describe # current and available versions
kubectl aks-versions --patches # upgrade paths in this region
kubectl unhealthy -A # fix existing problems first
kubectl aks upgrade --kubernetes-version 1.30.4
- Kubernetes count Count resources of any type in a namespace or cluster.
- Guide AKS targeting Shared flags and cluster discovery for the AKS plugins.
- Kubernetes clone Create a copy of a resource with the same values.
- Guide Freelens / Lens extension Run the plugins from a page inside Freelens.
- AKS nodepool Manage AKS node pools (also available as kubectl np).
- AKS aks Inspect and operate an AKS cluster.
- AKS aks-versions List Kubernetes versions available in an Azure region.
- AKS aks-maintenance Manage AKS planned maintenance windows.
- Kubernetes unhealthy List pods that are not Ready, crash-looping, pending or failed, with the reason.
- Kubernetes restarts Rank pods by container restarts, with the last termination reason.
- Kubernetes images List container images in use and flag :latest or untagged ones.
- Kubernetes pending Explain why pods are unschedulable: taints, insufficient CPU or memory, affinity.
- Kubernetes settags Update image tags for named deployments across many namespaces.
- Kubernetes whoami Show the current user, groups and context.
- Kubernetes orphans Find unused ConfigMaps, Secrets, PVCs and Services with no endpoints.
- Kubernetes ping Ping an IPv4 address or DNS name from inside a pod.