This page collects the kubectl and istioctl commands used most often to inspect, install and debug an Istio service mesh: listing Istio resources, finding the control plane and Envoy versions, checking sidecar injection and reading proxy configuration. The snippets above are a starting point. The sections below fix the ones that give wrong results and add the istioctl commands you need for daily mesh operations.
What the commands above do
The gist above uses plain kubectl with text processing (grep, awk), so it works on clusters where istioctl is not installed. That approach is fragile, because the output of kubectl api-resources and image tags are not designed to be parsed. The table summarises each snippet and its limitation.
| Snippet | Intent | Problem |
|---|---|---|
kubectl api-resources | grep -i istio | awk '{print $4}' loop | List every Istio object in every namespace | Column 4 is NAMESPACED (true/false) for resources that have a short name such as vs or dr, and KIND for those that don't. The loop then runs kubectl get true and fails |
kubectl api-resources | grep -i istio | List Istio resource types | Works, but -i istio also matches any unrelated line containing the word |
istiod image tag via awk -F ':' | Get the Istio version | Fails if the registry has a port (registry:5000/...) or the image is pinned by digest. Assumes a deployment called istiod, which doesn't exist with revision-based installs (istiod-<revision>) |
| Ingress gateway image tag | Get the Envoy version | The proxyv2 image tag is the Istio version, not the Envoy version. Also fails when no istio-ingressgateway is installed |
Corrected versions of the original commands
Use -o name so kubectl returns clean resource names such as virtualservices.networking.istio.io. You don't need any column parsing or case conversion.
# List all Istio resource types (CRDs in *.istio.io API groups)
kubectl api-resources -o name | grep 'istio\.io'
# List every Istio object in every namespace
for r in $(kubectl api-resources -o name --verbs=list | grep 'istio\.io'); do
echo "=== $r ==="
kubectl get "$r" --all-namespaces 2>/dev/null
done
# Alternative: list the Istio CRDs themselves
kubectl get crd | grep 'istio\.io'Code language: PHP (php)
For the Istio version, istioctl version is the reliable option. Without istioctl, select istiod by label rather than by name so revisioned installs are also found, and print the full image so a registry port or digest can't break parsing.
# Preferred
istioctl version
# Without istioctl: works for istiod and istiod-<revision>
kubectl get deploy -n istio-system -l app=istiod \
-o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.template.spec.containers[0].image}{"\n"}{end}'
# If you only want the tag, take the LAST colon-separated field
# ... | awk -F: '{print $NF}'Code language: PHP (php)
To get the actual Envoy version, ask the proxy itself. pilot-agent runs inside every Istio proxy container and can query the Envoy admin API. You need it because the proxy images are minimal and may not include curl.
# Envoy build/version string from the ingress gateway
kubectl exec -n istio-system deploy/istio-ingressgateway -c istio-proxy -- \
pilot-agent request GET server_info | grep '"version"'
# Same check for any sidecar-injected application pod
kubectl exec -n <namespace> <pod> -c istio-proxy -- envoy --versionCode language: PHP (php)
Install, verify and uninstall
Most lifecycle tasks go through istioctl. Use an istioctl version that matches the control plane version you're installing or managing.
istioctl version # client, control plane and data plane versions
istioctl profile list # available installation profiles
istioctl install --set profile=default -y
istioctl verify-install # check that installed resources match the manifest
istioctl manifest generate --set profile=default > istio.yaml # render YAML for review/GitOps
kubectl get pods -n istio-system # istiod and gateways should be Running
# Remove Istio completely
istioctl uninstall --purge -y
kubectl delete namespace istio-systemCode language: PHP (php)
istioctl version prints something like client version: X.Y.Z, control plane version: X.Y.Z and data plane version: X.Y.Z (N proxies). If the data plane reports more than one version, some pods are still running old sidecars and need a restart.
Sidecar injection commands
# Enable automatic injection for a namespace (default revision)
kubectl label namespace demo istio-injection=enabled --overwrite
# Or bind the namespace to a specific revision/tag (do not combine with istio-injection)
kubectl label namespace demo istio.io/rev=<revision> --overwrite
# Show injection status of all namespaces
kubectl get namespace -L istio-injection -L istio.io/rev
# Existing pods are only injected when recreated
kubectl rollout restart deployment -n demo
# Manual injection without a namespace label
istioctl kube-inject -f app.yaml | kubectl apply -f -Code language: HTML, XML (xml)
Note: A pod showing READY 1/1 instead of 2/2 in a labeled namespace was almost always created before the label was applied. Restart the workload. Also check that the pod doesn't carry the sidecar.istio.io/inject: "false" label.
Inspect and debug the mesh
These are the commands to reach for when traffic doesn't behave as configured. Start with analyze, then confirm that proxies are in sync, then look at the Envoy configuration of the affected pod.
# Detect misconfiguration (missing hosts, conflicting rules, injection problems)
istioctl analyze --all-namespaces
istioctl analyze -n demo
istioctl analyze my-virtualservice.yaml # validate a file before applying
# Is every proxy in sync with istiod?
istioctl proxy-status
# Explain which Istio config applies to a pod
istioctl experimental describe pod <pod> -n demo
# Dump the Envoy config pushed to a pod
istioctl proxy-config cluster <pod>.demo
istioctl proxy-config listener <pod>.demo
istioctl proxy-config route <pod>.demo
istioctl proxy-config endpoint <pod>.demo --cluster "outbound|80||reviews.demo.svc.cluster.local"
istioctl proxy-config secret <pod>.demo # mTLS certificates and their validity
# Raise Envoy log level temporarily, then read the sidecar logs
istioctl proxy-config log <pod>.demo --level debug
kubectl logs <pod> -n demo -c istio-proxy
# Control plane logs
kubectl logs -n istio-system deploy/istiod
# Collect everything for a support ticket
istioctl bug-reportCode language: PHP (php)
| proxy-status value | Meaning |
|---|---|
SYNCED | The proxy acknowledged the latest config from istiod |
NOT SENT | istiod has sent nothing of this type. Often normal, for example when no config of that type applies |
STALE | istiod sent config but the proxy has not acknowledged it. Check istiod and proxy logs |
# Open observability UIs (addons must be installed first)
istioctl dashboard kiali
istioctl dashboard grafana
istioctl dashboard envoy <pod>.demo # Envoy admin UI for one podCode language: PHP (php)
Common errors and fixes
| Symptom | Cause | Fix |
|---|---|---|
error: the server doesn't have a resource type "true" | The original loop printed the NAMESPACED column | Use kubectl api-resources -o name as shown above |
istioctl version reports no control plane | Istio is installed in a namespace other than istio-system | Pass --istioNamespace <ns> (short form -i) |
| istioctl warns about version mismatch | Client and control plane versions differ | Download the istioctl release that matches istiod |
Pods show 1/1 in a mesh namespace | Namespace not labeled, or pods predate the label | Label the namespace and run kubectl rollout restart |
proxy-config returns nothing for a pod | Pod has no sidecar, or wrong <pod>.<namespace> format | Confirm the istio-proxy container exists with kubectl get pod <pod> -o jsonpath='{.spec.containers[*].name}' |
Good practice
- Run
istioctl analyzein CI against your manifests so configuration errors are caught before they reach the cluster. - Prefer
istioctlover parsing image tags. It handles revisions, custom registries and multiple control planes correctly. - Use revision labels (
istio.io/rev) for canary upgrades rather than upgrading the only control plane in place. - Set the Envoy log level back to
warningafter debugging. Debug logging is verbose and can increase resource usage. - Treat
istioctl bug-reportoutput as sensitive, because it can contain cluster configuration details.
For background on the mesh itself, see What is Istio and use cases of Istio? and What is Envoy and use cases of Envoy?.
Frequently asked questions
How do I check which Istio version is installed?
Run istioctl version, which reports the client, control plane and data plane versions. Without istioctl, read the image of the deployment labeled app=istiod in istio-system.
How do I find the Envoy version used by Istio?
Run pilot-agent request GET server_info or envoy --version inside the istio-proxy container with kubectl exec. The proxyv2 image tag shows the Istio version, not the Envoy version.
How do I list all Istio resources in a cluster?
Use kubectl api-resources -o name | grep 'istio\.io' to get the resource types. Then loop over them with kubectl get <type> --all-namespaces.
Why is my pod not getting an Istio sidecar?
The namespace usually lacks the istio-injection=enabled or istio.io/rev label, or the pod was created before the label was added. Label the namespace, restart the deployment, and run istioctl analyze to check for injection warnings.
What does istioctl proxy-status show?
It lists every Envoy proxy connected to istiod and whether each config type (CDS, LDS, EDS, RDS) is SYNCED, NOT SENT or STALE. STALE means the proxy has not acknowledged the latest config.
Related tutorials
- What is Istio and use cases of Istio?
- What is Envoy and use cases of Envoy?
- Top 10 Service Mesh Platforms: Features, Pros, Cons & Comparison
- More Containers & Kubernetes tutorials
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services โ all in one place.
Explore Hospitals