MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Istio Commands Reference

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.

SnippetIntentProblem
kubectl api-resources | grep -i istio | awk '{print $4}' loopList every Istio object in every namespaceColumn 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 istioList Istio resource typesWorks, but -i istio also matches any unrelated line containing the word
istiod image tag via awk -F ':'Get the Istio versionFails 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 tagGet the Envoy versionThe 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 valueMeaning
SYNCEDThe proxy acknowledged the latest config from istiod
NOT SENTistiod has sent nothing of this type. Often normal, for example when no config of that type applies
STALEistiod 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

SymptomCauseFix
error: the server doesn't have a resource type "true"The original loop printed the NAMESPACED columnUse kubectl api-resources -o name as shown above
istioctl version reports no control planeIstio is installed in a namespace other than istio-systemPass --istioNamespace <ns> (short form -i)
istioctl warns about version mismatchClient and control plane versions differDownload the istioctl release that matches istiod
Pods show 1/1 in a mesh namespaceNamespace not labeled, or pods predate the labelLabel the namespace and run kubectl rollout restart
proxy-config returns nothing for a podPod has no sidecar, or wrong <pod>.<namespace> formatConfirm the istio-proxy container exists with kubectl get pod <pod> -o jsonpath='{.spec.containers[*].name}'

Good practice

  • Run istioctl analyze in CI against your manifests so configuration errors are caught before they reach the cluster.
  • Prefer istioctl over 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 warning after debugging. Debug logging is verbose and can increase resource usage.
  • Treat istioctl bug-report output 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

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
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.

Related Posts

Top 10 Service Mesh Platforms: Features, Pros, Cons & Comparison

Introduction Service Mesh Platforms are specialized infrastructure layers designed to manage, secure, and observe communication between microservices in modern distributed systems. As organizations move from monolithic applications…

Read More

Kubernetes tutorials: Gateway Controllers vs. Service Mesh

๐Ÿšฉ Gateway Controllers vs. Service Mesh Criteria / Feature ๐ŸŒ Gateway Controllers ๐Ÿ•ธ๏ธ Service Mesh Primary Responsibility External (ingress/egress) routing Internal (service-to-service) and external communication Traffic Direction…

Read More

Choosing Between Istio, Envoy, and Traefik for gRPC in AWS EKS

๐Ÿ”น Choosing Between Istio, Envoy, and Traefik for gRPC in AWS EKS ๐Ÿš€ Choosing the right API gateway/service mesh depends on your gRPC needs, performance, security, and…

Read More

Istio Envoy Advance Demo Video

Istio and Envoy are open-source projects that are commonly used together to manage and secure microservices-based applications within Kubernetes or other containerized environments. Together, Envoy and Istio…

Read More

What is Envoy and use cases of Envoy?

What is Envoy? Envoy is an open-source, high-performance service proxy designed for cloud-native and microservices architectures. It acts as a sidecar proxy, running alongside your applications, and…

Read More

What is Istio and use cases of Istio?

What is Istio? Istio is an open-source service mesh technology that provides a powerful way to manage and control communication between microservices in a distributed environment. It…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x