{"id":41455,"date":"2026-11-26T22:04:44","date_gmt":"2026-11-26T22:04:44","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=41455"},"modified":"2026-11-26T22:04:44","modified_gmt":"2026-11-26T22:04:44","slug":"istio-commands-reference","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/istio-commands-reference\/","title":{"rendered":"Istio Commands Reference"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/2e402a60d9aa0b640ed4fc0c8fad9301.js\"><\/script>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What the commands above do<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The gist above uses plain <code>kubectl<\/code> with text processing (<code>grep<\/code>, <code>awk<\/code>), so it works on clusters where <code>istioctl<\/code> is not installed. That approach is fragile, because the output of <code>kubectl api-resources<\/code> and image tags are not designed to be parsed. The table summarises each snippet and its limitation.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Snippet<\/th><th>Intent<\/th><th>Problem<\/th><\/tr><\/thead><tbody><tr><td><code>kubectl api-resources | grep -i istio | awk &#039;{print $4}&#039;<\/code> loop<\/td><td>List every Istio object in every namespace<\/td><td>Column 4 is <code>NAMESPACED<\/code> (true\/false) for resources that have a short name such as <code>vs<\/code> or <code>dr<\/code>, and <code>KIND<\/code> for those that don&#039;t. The loop then runs <code>kubectl get true<\/code> and fails<\/td><\/tr><tr><td><code>kubectl api-resources | grep -i istio<\/code><\/td><td>List Istio resource types<\/td><td>Works, but <code>-i istio<\/code> also matches any unrelated line containing the word<\/td><\/tr><tr><td>istiod image tag via <code>awk -F &#039;:&#039;<\/code><\/td><td>Get the Istio version<\/td><td>Fails if the registry has a port (<code>registry:5000\/...<\/code>) or the image is pinned by digest. Assumes a deployment called <code>istiod<\/code>, which doesn&#039;t exist with revision-based installs (<code>istiod-&lt;revision&gt;<\/code>)<\/td><\/tr><tr><td>Ingress gateway image tag<\/td><td>Get the Envoy version<\/td><td>The <code>proxyv2<\/code> image tag is the <strong>Istio<\/strong> version, not the Envoy version. Also fails when no <code>istio-ingressgateway<\/code> is installed<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Corrected versions of the original commands<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>-o name<\/code> so kubectl returns clean resource names such as <code>virtualservices.networking.istio.io<\/code>. You don&#039;t need any column parsing or case conversion.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># List all Istio resource types (CRDs in *.istio.io API groups)<\/span>\nkubectl api-resources -o name | grep <span class=\"hljs-string\">'istio\\.io'<\/span>\n\n<span class=\"hljs-comment\"># List every Istio object in every namespace<\/span>\n<span class=\"hljs-keyword\">for<\/span> r in $(kubectl api-resources -o name --verbs=<span class=\"hljs-keyword\">list<\/span> | grep <span class=\"hljs-string\">'istio\\.io'<\/span>); <span class=\"hljs-keyword\">do<\/span>\n  <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"=== $r ===\"<\/span>\n  kubectl get <span class=\"hljs-string\">\"$r\"<\/span> --all-namespaces <span class=\"hljs-number\">2<\/span>&gt;\/dev\/<span class=\"hljs-keyword\">null<\/span>\ndone\n\n<span class=\"hljs-comment\"># Alternative: list the Istio CRDs themselves<\/span>\nkubectl get crd | grep <span class=\"hljs-string\">'istio\\.io'<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">For the Istio version, <code>istioctl version<\/code> 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&#039;t break parsing.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Preferred<\/span>\nistioctl version\n\n<span class=\"hljs-comment\"># Without istioctl: works for istiod and istiod-&lt;revision&gt;<\/span>\nkubectl get deploy -n istio-system -l app=istiod \\\n  -o jsonpath=<span class=\"hljs-string\">'{range .items&#91;*]}{.metadata.name}{\"\\t\"}{.spec.template.spec.containers&#91;0].image}{\"\\n\"}{end}'<\/span>\n\n<span class=\"hljs-comment\"># If you only want the tag, take the LAST colon-separated field<\/span>\n<span class=\"hljs-comment\"># ... | awk -F: '{print $NF}'<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">To get the actual Envoy version, ask the proxy itself. <code>pilot-agent<\/code> 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 <code>curl<\/code>.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Envoy build\/version string from the ingress gateway<\/span>\nkubectl exec -n istio-system deploy\/istio-ingressgateway -c istio-proxy -- \\\n  pilot-agent request GET server_info | grep <span class=\"hljs-string\">'\"version\"'<\/span>\n\n<span class=\"hljs-comment\"># Same check for any sidecar-injected application pod<\/span>\nkubectl exec -n &lt;<span class=\"hljs-keyword\">namespace<\/span>&gt; &lt;<span class=\"hljs-title\">pod<\/span>&gt; -<span class=\"hljs-title\">c<\/span> <span class=\"hljs-title\">istio<\/span>-<span class=\"hljs-title\">proxy<\/span> -- <span class=\"hljs-title\">envoy<\/span> --<span class=\"hljs-title\">version<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Install, verify and uninstall<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Most lifecycle tasks go through <code>istioctl<\/code>. Use an istioctl version that matches the control plane version you&#039;re installing or managing.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">istioctl version                      <span class=\"hljs-comment\"># client, control plane and data plane versions<\/span>\nistioctl profile <span class=\"hljs-keyword\">list<\/span>                 <span class=\"hljs-comment\"># available installation profiles<\/span>\nistioctl install --set profile=<span class=\"hljs-keyword\">default<\/span> -y\nistioctl verify-install               <span class=\"hljs-comment\"># check that installed resources match the manifest<\/span>\nistioctl manifest generate --set profile=<span class=\"hljs-keyword\">default<\/span> &gt; istio.yaml   <span class=\"hljs-comment\"># render YAML for review\/GitOps<\/span>\n\nkubectl get pods -n istio-system      <span class=\"hljs-comment\"># istiod and gateways should be Running<\/span>\n\n<span class=\"hljs-comment\"># Remove Istio completely<\/span>\nistioctl uninstall --purge -y\nkubectl delete <span class=\"hljs-keyword\">namespace<\/span> <span class=\"hljs-title\">istio<\/span>-<span class=\"hljs-title\">system<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><code>istioctl version<\/code> prints something like <code>client version: X.Y.Z<\/code>, <code>control plane version: X.Y.Z<\/code> and <code>data plane version: X.Y.Z (N proxies)<\/code>. If the data plane reports more than one version, some pods are still running old sidecars and need a restart.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sidecar injection commands<\/h2>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"># Enable automatic injection for a namespace (default revision)\nkubectl label namespace demo istio-injection=enabled --overwrite\n\n# Or bind the namespace to a specific revision\/tag (do not combine with istio-injection)\nkubectl label namespace demo istio.io\/rev=<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">revision<\/span>&gt;<\/span> --overwrite\n\n# Show injection status of all namespaces\nkubectl get namespace -L istio-injection -L istio.io\/rev\n\n# Existing pods are only injected when recreated\nkubectl rollout restart deployment -n demo\n\n# Manual injection without a namespace label\nistioctl kube-inject -f app.yaml | kubectl apply -f -<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> A pod showing <code>READY 1\/1<\/code> instead of <code>2\/2<\/code> in a labeled namespace was almost always created before the label was applied. Restart the workload. Also check that the pod doesn&#039;t carry the <code>sidecar.istio.io\/inject: &quot;false&quot;<\/code> label.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Inspect and debug the mesh<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These are the commands to reach for when traffic doesn&#039;t behave as configured. Start with <code>analyze<\/code>, then confirm that proxies are in sync, then look at the Envoy configuration of the affected pod.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Detect misconfiguration (missing hosts, conflicting rules, injection problems)<\/span>\nistioctl analyze --all-namespaces\nistioctl analyze -n demo\nistioctl analyze my-virtualservice.yaml      <span class=\"hljs-comment\"># validate a file before applying<\/span>\n\n<span class=\"hljs-comment\"># Is every proxy in sync with istiod?<\/span>\nistioctl proxy-status\n\n<span class=\"hljs-comment\"># Explain which Istio config applies to a pod<\/span>\nistioctl experimental describe pod &lt;pod&gt; -n demo\n\n<span class=\"hljs-comment\"># Dump the Envoy config pushed to a pod<\/span>\nistioctl proxy-config cluster  &lt;pod&gt;.demo\nistioctl proxy-config listener &lt;pod&gt;.demo\nistioctl proxy-config route    &lt;pod&gt;.demo\nistioctl proxy-config endpoint &lt;pod&gt;.demo --cluster <span class=\"hljs-string\">\"outbound|80||reviews.demo.svc.cluster.local\"<\/span>\nistioctl proxy-config secret   &lt;pod&gt;.demo    <span class=\"hljs-comment\"># mTLS certificates and their validity<\/span>\n\n<span class=\"hljs-comment\"># Raise Envoy log level temporarily, then read the sidecar logs<\/span>\nistioctl proxy-config log &lt;pod&gt;.demo --level debug\nkubectl logs &lt;pod&gt; -n demo -c istio-proxy\n\n<span class=\"hljs-comment\"># Control plane logs<\/span>\nkubectl logs -n istio-system deploy\/istiod\n\n<span class=\"hljs-comment\"># Collect everything for a support ticket<\/span>\nistioctl bug-report<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>proxy-status value<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td><code>SYNCED<\/code><\/td><td>The proxy acknowledged the latest config from istiod<\/td><\/tr><tr><td><code>NOT SENT<\/code><\/td><td>istiod has sent nothing of this type. Often normal, for example when no config of that type applies<\/td><\/tr><tr><td><code>STALE<\/code><\/td><td>istiod sent config but the proxy has not acknowledged it. Check istiod and proxy logs<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Open observability UIs (addons must be installed first)<\/span>\nistioctl dashboard kiali\nistioctl dashboard grafana\nistioctl dashboard envoy &lt;pod&gt;.demo     <span class=\"hljs-comment\"># Envoy admin UI for one pod<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Common errors and fixes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Symptom<\/th><th>Cause<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td><code>error: the server doesn&#039;t have a resource type &quot;true&quot;<\/code><\/td><td>The original loop printed the <code>NAMESPACED<\/code> column<\/td><td>Use <code>kubectl api-resources -o name<\/code> as shown above<\/td><\/tr><tr><td><code>istioctl version<\/code> reports no control plane<\/td><td>Istio is installed in a namespace other than <code>istio-system<\/code><\/td><td>Pass <code>--istioNamespace &lt;ns&gt;<\/code> (short form <code>-i<\/code>)<\/td><\/tr><tr><td>istioctl warns about version mismatch<\/td><td>Client and control plane versions differ<\/td><td>Download the istioctl release that matches istiod<\/td><\/tr><tr><td>Pods show <code>1\/1<\/code> in a mesh namespace<\/td><td>Namespace not labeled, or pods predate the label<\/td><td>Label the namespace and run <code>kubectl rollout restart<\/code><\/td><\/tr><tr><td><code>proxy-config<\/code> returns nothing for a pod<\/td><td>Pod has no sidecar, or wrong <code>&lt;pod&gt;.&lt;namespace&gt;<\/code> format<\/td><td>Confirm the <code>istio-proxy<\/code> container exists with <code>kubectl get pod &lt;pod&gt; -o jsonpath=&#039;{.spec.containers[*].name}&#039;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Good practice<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run <code>istioctl analyze<\/code> in CI against your manifests so configuration errors are caught before they reach the cluster.<\/li>\n\n\n<li>Prefer <code>istioctl<\/code> over parsing image tags. It handles revisions, custom registries and multiple control planes correctly.<\/li>\n\n\n<li>Use revision labels (<code>istio.io\/rev<\/code>) for canary upgrades rather than upgrading the only control plane in place.<\/li>\n\n\n<li>Set the Envoy log level back to <code>warning<\/code> after debugging. Debug logging is verbose and can increase resource usage.<\/li>\n\n\n<li>Treat <code>istioctl bug-report<\/code> output as sensitive, because it can contain cluster configuration details.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For background on the mesh itself, see <a href=\"https:\/\/www.devopsschool.com\/blog\/what-is-istio-and-use-cases-of-istio\/\">What is Istio and use cases of Istio?<\/a> and <a href=\"https:\/\/www.devopsschool.com\/blog\/what-is-envoy-and-use-cases-of-envoy\/\">What is Envoy and use cases of Envoy?<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">How do I check which Istio version is installed?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>istioctl version<\/code>, which reports the client, control plane and data plane versions. Without istioctl, read the image of the deployment labeled <code>app=istiod<\/code> in <code>istio-system<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I find the Envoy version used by Istio?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>pilot-agent request GET server_info<\/code> or <code>envoy --version<\/code> inside the <code>istio-proxy<\/code> container with <code>kubectl exec<\/code>. The <code>proxyv2<\/code> image tag shows the Istio version, not the Envoy version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I list all Istio resources in a cluster?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>kubectl api-resources -o name | grep &#039;istio\\.io&#039;<\/code> to get the resource types. Then loop over them with <code>kubectl get &lt;type&gt; --all-namespaces<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why is my pod not getting an Istio sidecar?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The namespace usually lacks the <code>istio-injection=enabled<\/code> or <code>istio.io\/rev<\/code> label, or the pod was created before the label was added. Label the namespace, restart the deployment, and run <code>istioctl analyze<\/code> to check for injection warnings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What does istioctl proxy-status show?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related tutorials<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/what-is-istio-and-use-cases-of-istio\/\">What is Istio and use cases of Istio?<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/what-is-envoy-and-use-cases-of-envoy\/\">What is Envoy and use cases of Envoy?<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/top-10-service-mesh-platforms-features-pros-cons-comparison\/\">Top 10 Service Mesh Platforms: Features, Pros, Cons &amp; Comparison<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/category\/containers-kubernetes\/\">More Containers &amp; Kubernetes tutorials<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[26146],"tags":[7020,7021],"class_list":["post-41455","post","type-post","status-publish","format-standard","hentry","category-containers-kubernetes","tag-istio","tag-service-mesh"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/41455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=41455"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/41455\/revisions"}],"predecessor-version":[{"id":80295,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/41455\/revisions\/80295"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=41455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=41455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=41455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}