mirror of https://github.com/istio/istio.io.git
136 lines
77 KiB
HTML
136 lines
77 KiB
HTML
<!doctype html><html lang=zh itemscope itemtype=https://schema.org/WebPage><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=theme-color content=#466BB0><meta name=title content=istioctl><meta name=description content="Istio 控制界面。"><meta name=keywords content=microservices,services,mesh><meta property=og:title content=istioctl><meta property=og:type content=website><meta property=og:description content="Istio 控制界面。"><meta property=og:url content=/v1.1/zh/docs/reference/commands/istioctl/><meta property=og:image content=/v1.1/img/istio-whitelogo-bluebackground-framed.svg><meta property=og:image:alt content="Istio Logo"><meta property=og:image:width content=112><meta property=og:image:height content=150><meta property=og:site_name content=Istio><meta name=twitter:card content=summary><meta name=twitter:site content=@IstioMesh><title>Istioldie 1.1 / istioctl</title><script async src="https://www.googletagmanager.com/gtag/js?id=UA-98480406-2"></script><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}
|
||
gtag('js',new Date());gtag('config','UA-98480406-2');</script><link rel=alternate type=application/rss+xml title="Istio Blog" href=/v1.1/feed.xml><link rel="shortcut icon" href=/v1.1/favicons/favicon.ico><link rel=apple-touch-icon href=/v1.1/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/v1.1/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/v1.1/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/v1.1/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/v1.1/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/v1.1/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/v1.1/favicons/android-96x96.png sizes=96xW96><link rel=icon type=image/png href=/v1.1/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/v1.1/favicons/android-192x192.png sizes=192x192><link rel=manifest href=/v1.1/manifest.json><meta name=apple-mobile-web-app-title content=Istio><meta name=application-name content=Istio><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Work+Sans:400|Chivo:400|Work+Sans:500,300,600,300italic,400italic,500italic,600italic|Chivo:500,300,600,300italic,400italic,500italic,600italic"><link rel=stylesheet href=/v1.1/css/all.css></head><body class="language-unknown archive-site"><script src=/v1.1/js/themes_init.min.js></script><script>const branchName="release-1.1";const docTitle="istioctl";const iconFile="\/v1.1/img/icons.svg";const buttonCopy='复制到剪切板';const buttonPrint='打印';const buttonDownload='下载';</script><script src="https://www.google.com/cse/brand?form=search-form" defer></script><script src=/v1.1/js/all.min.js data-manual defer></script><header><nav><a id=brand href=/v1.1/zh/><span class=logo><svg viewBox="0 0 300 300"><circle cx="150" cy="150" r="146" stroke-width="2" /><path d="M65 240H225L125 270z"/><path d="M65 230l60-10V110z"/><path d="M135 220l90 10L135 30z"/></svg></span><span class=name>Istioldie 1.1</span></a><div id=hamburger><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#hamburger"/></svg></div><div id=header-links><span title="了解如何部署、使用和运维 Istio。">文档</span>
|
||
<a title="关于使用 Istio 的博客文章。" href=/v1.1/zh/blog/2019/root-transition/>博客</a>
|
||
<a title="一堆帮助您部署、配置和使用 Istio 的资源。" href=/v1.1/zh/help/>帮助</a>
|
||
<a title=关于Istio的说明。 href=/v1.1/zh/about/>关于</a><div class=menu><button id=gearDropdownButton class=menu-trigger title=选项和设置 aria-label="Options and Settings" aria-controls=gearDropdownContent><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#gear"/></svg></button><div id=gearDropdownContent class=menu-content aria-labelledby=gearDropdownButton role=menu><a tabindex=-1 role=menuitem lang=en id=switch-lang-en>English</a>
|
||
<a tabindex=-1 role=menuitem lang=zh id=switch-lang-zh class=active>中文</a><div role=separator></div><a tabindex=-1 role=menuitem class=active id=light-theme-item>亮主题</a>
|
||
<a tabindex=-1 role=menuitem id=dark-theme-item>暗主题</a><div role=separator></div><a tabindex=-1 role=menuitem id=syntax-coloring-item>代码高亮</a><div role=separator></div><h6>本站的其它版本</h6><a tabindex=-1 role=menuitem onclick="navigateToUrlOrRoot('https://istio.io/docs\/reference\/commands\/istioctl\/');return false;">当前版本</a>
|
||
<a tabindex=-1 role=menuitem onclick="navigateToUrlOrRoot('https://preliminary.istio.io/docs\/reference\/commands\/istioctl\/');return false;">下个版本</a>
|
||
<a tabindex=-1 role=menuitem href=https://archive.istio.io>旧版本</a></div></div><button id=search-show title=搜索istio.io aria-label=Search><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#magnifier"/></svg></button></div><form id=search-form name=cse role=search><input type=hidden name=cx value=013699703217164175118:iwwf17ikgf4>
|
||
<input type=hidden name=ie value=utf-8>
|
||
<input type=hidden name=hl value=en>
|
||
<input type=hidden id=search-page-url value=/v1.1/search.html>
|
||
<input id=search-textbox class=form-control name=q type=search aria-label=搜索istio.io>
|
||
<button id=search-close title="Cancel search" type=reset aria-label="Cancel search"><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#cancel-x"/></svg></button></form></nav></header><main class=primary><div id=sidebar-container class="sidebar-container sidebar-offcanvas"><nav id=sidebar aria-label="Section Navigation"><div class=directory><div class=card><button class="header dynamic" id=card28 title="一些概念,理解它们有助于您更好地了解 Istio 系统的不同部分及其使用的抽象。" aria-controls=card28-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#concepts"/></svg>概念</button><div class=body aria-labelledby=card28 role=region id=card28-body><ul role=tree aria-expanded=true class=leaf-section aria-labelledby=card28><li role=none><a role=treeitem title="介绍 Istio 及其要解决的问题、顶层架构和设计目标。" href=/v1.1/zh/docs/concepts/what-is-istio/>Istio 是什么?</a></li><li role=none><a role=treeitem title="介绍 Istio 中关于流量路由与控制的各项功能。" href=/v1.1/zh/docs/concepts/traffic-management/>流量管理</a></li><li role=none><a role=treeitem title="描述 Istio 的授权与鉴权功能。" href=/v1.1/zh/docs/concepts/security/>安全</a></li><li role=none><a role=treeitem title=描述策略实施和遥测机制。 href=/v1.1/zh/docs/concepts/policies-and-telemetry/>策略与遥测</a></li><li role=none><a role=treeitem title="介绍 Istio 组件的性能与可伸缩性。" href=/v1.1/zh/docs/concepts/performance-and-scalability/>性能与可伸缩性</a></li><li role=none><a role=treeitem title=描述如何配置服务网格以包含来自多个集群的服务。 href=/v1.1/zh/docs/concepts/multicluster-deployments/>多集群部署</a></li></ul></div></div><div class=card><button class="header dynamic" id=card41 title="在不同的环境下(例如 Kubernetes、Consul 等)如何部署和升级 Istio。" aria-controls=card41-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#setup"/></svg>安装</button><div class=body aria-labelledby=card41 role=region id=card41-body><ul role=tree aria-expanded=true aria-labelledby=card41><li role=treeitem aria-label=Kubernetes><button aria-hidden=true></button><a title="关于如何在 Kubernetes 集群中安装 Istio 控制平面和添加虚拟机到 mesh 中的说明。" href=/v1.1/zh/docs/setup/kubernetes/>Kubernetes</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title="关于 Istio 发布包下载过程的说明。" href=/v1.1/zh/docs/setup/kubernetes/download/>下载 Istio 发布包</a></li><li role=treeitem aria-label=准备><button aria-hidden=true></button><a title="为 Istio 做准备。" href=/v1.1/zh/docs/setup/kubernetes/prepare/>准备</a><ul role=group aria-expanded=false><li role=treeitem aria-label=平台搭建><button aria-hidden=true></button><a title="在安装 Istio 前,如何准备各种 Kubernetes 平台。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/>平台搭建</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="为 Istio 设置阿里云 Kubernetes 集群的说明。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/alicloud/>阿里云</a></li><li role=none><a role=treeitem title="对 Azure 集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/azure/>Azure</a></li><li role=none><a role=treeitem title="使用桌面版 Docker 安装 Istio 的说明。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/docker/>桌面版 Docker</a></li><li role=none><a role=treeitem title="对 Google Kubernetes Engine(GKE)集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/gke/>Google Kubernetes Engine</a></li><li role=none><a role=treeitem title="为 IBM Cloud 集群设置 Istio 的说明。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/ibm/>IBM Cloud</a></li><li role=none><a role=treeitem title="对 Minikube 集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/minikube/>Minikube</a></li><li role=none><a role=treeitem title="对 OpenShift 集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/openshift/>OpenShift</a></li><li role=none><a role=treeitem title="为 Istio 对 OKE 集群环境进行配置。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/oci/>Oracle Cloud Infrastructure</a></li></ul></li></ul></li><li role=treeitem aria-label=安装方案><button aria-hidden=true></button><a title=选择最适合您需求和平台的方案。 href=/v1.1/zh/docs/setup/kubernetes/install/>安装方案</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title="在 Kubernetes 集群中快速安装 Istio 服务网格的说明。" href=/v1.1/zh/docs/setup/kubernetes/install/kubernetes/>在 Kubernetes 中快速开始</a></li><li role=none><a role=treeitem title="使用内含的 Helm chart 安装 Istio。" href=/v1.1/zh/docs/setup/kubernetes/install/helm/>使用 Helm 进行安装</a></li><li role=treeitem aria-label=多集群安装><button aria-hidden=true></button><a title="配置跨越多个 Kubernetes 集群的 Istio 服务网格。" href=/v1.1/zh/docs/setup/kubernetes/install/multicluster/>多集群安装</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="使用 Istio Gateway 跨越多个 Kubernetes 集群安装 Istio 网格以访问远程 pod。" href=/v1.1/zh/docs/setup/kubernetes/install/multicluster/gateways/>Gateway 连接</a></li><li role=none><a role=treeitem title="通过直连远程 pods 实现多 Kubernetes 集群安装 Istio 网格。" href=/v1.1/zh/docs/setup/kubernetes/install/multicluster/vpn/>VPN 连接</a></li></ul></li><li role=treeitem aria-label=特定平台安装说明><button aria-hidden=true></button><a title="支持的 Kubernetes 平台的额外安装流程。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/>特定平台安装说明</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="如何使用阿里云 Kubernetes 容器服务快速安装 Istio。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/alicloud/>阿里云</a></li><li role=none><a role=treeitem title="在 Google Kubernetes Engine (GKE) 上快速搭建 Istio 服务。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/gke/>Google Kubernetes Engine</a></li><li role=none><a role=treeitem title="如何使用 IBM 公有云或 IBM 私有云快速安装 Istio。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/ibm/>IBM Cloud</a></li></ul></li></ul></li><li role=treeitem aria-label=升级><button aria-hidden=true></button><a title="升级 Istio 的相关信息。" href=/v1.1/zh/docs/setup/kubernetes/upgrade/>升级</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="在升级到 Istio 1.1 之前,运维人员必须了解的重要更改。" href=/v1.1/zh/docs/setup/kubernetes/upgrade/notice/>1.1 升级通知</a></li><li role=none><a role=treeitem title="演示如何独立升级 Istio 控制平面和数据平面。" href=/v1.1/zh/docs/setup/kubernetes/upgrade/steps/>升级步骤</a></li></ul></li><li role=treeitem aria-label=更多指南><button aria-hidden=true></button><a title=有关其他设置任务的更多信息。 href=/v1.1/zh/docs/setup/kubernetes/additional-setup/>更多指南</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Istio 内置的安装配置文件介绍。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/config-profiles/>安装配置</a></li><li role=none><a role=treeitem title="介绍两种将 Istio sidecar 注入应用 Pod 的方法:使用 Sidecar 注入 Webhook 自动完成,或使用 istioctl 客户端工具手工完成。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/sidecar-injection/>注入 Istio sidecar</a></li><li role=none><a role=treeitem title="这里讲述了 Istio 对 Kubernetes 中 Pod 和服务的要求。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/requirements/>Istio 对 Pod 和服务的要求</a></li><li role=none><a role=treeitem title="Istio CNI 插件的安装和使用 Istio,该插件让运维人员可以用较低的权限来完成网格服务的部署工作。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/cni/>Istio CNI 插件的安装和使用 Istio</a></li><li role=none><a role=treeitem title="部署在 Kubernetes 之中的 Istio 服务网格,将虚拟机和物理机集成进入到服务网格的方法。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/mesh-expansion/>网格扩展</a></li></ul></li></ul></li><li role=treeitem aria-label="Nomad & Consul"><button aria-hidden=true></button><a title="基于 Consul 和 Nomad 安装 Istio 控制平面。" href=/v1.1/zh/docs/setup/consul/>Nomad & Consul</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="通过 Docker Compose 快速安装 Istio service mesh。" href=/v1.1/zh/docs/setup/consul/quick-start/>通过 Docker 快速安装</a></li><li role=none><a role=treeitem title="基于 Consul 和 Nomad 安装 Istio 控制平面。" href=/v1.1/zh/docs/setup/consul/install/>安装</a></li></ul></li></ul></div></div><div class=card><button class="header dynamic" id=card49 title="如何用 Istio 系统实现特定目标的行为。" aria-controls=card49-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#tasks"/></svg>任务</button><div class=body aria-labelledby=card49 role=region id=card49-body><ul role=tree aria-expanded=true aria-labelledby=card49><li role=treeitem aria-label=流量管理><button aria-hidden=true></button><a title="演示 Istio 流量路由功能的任务。" href=/v1.1/zh/docs/tasks/traffic-management/>流量管理</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title=此任务将说明如何将请求动态路由到多个版本的微服务。 href=/v1.1/zh/docs/tasks/traffic-management/request-routing/>配置请求路由</a></li><li role=none><a role=treeitem title=此任务说明如何注入延迟并测试应用程序的弹性。 href=/v1.1/zh/docs/tasks/traffic-management/fault-injection/>故障注入</a></li><li role=none><a role=treeitem title=向您展示如何将流量从旧版本迁移到新版本的服务。 href=/v1.1/zh/docs/tasks/traffic-management/traffic-shifting/>流量转移</a></li><li role=none><a role=treeitem title="展示如何将一个 TCP 服务的流量从老版本迁移到新版本。" href=/v1.1/zh/docs/tasks/traffic-management/tcp-traffic-shifting/>TCP 流量转移</a></li><li role=none><a role=treeitem title="本任务用于示范如何使用 Istio 在 Envoy 中设置请求超时。" href=/v1.1/zh/docs/tasks/traffic-management/request-timeouts/>设置请求超时</a></li><li role=none><a role=treeitem title="介绍在服务网格 Istio 中如何配置外部公开服务。" href=/v1.1/zh/docs/tasks/traffic-management/ingress/>控制 Ingress 流量</a></li><li role=treeitem aria-label="加密 Ingress Gateway"><button aria-hidden=true></button><a title="使用多种方法为 Gateway 控制器提供加密支持。" href=/v1.1/zh/docs/tasks/traffic-management/secure-ingress/>加密 Ingress Gateway</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="如何配置 Istio,借助 SDS(Secret 发现服务),使用 TLS 或双向 TLS 将服务开放到网格之外。" href=/v1.1/zh/docs/tasks/traffic-management/secure-ingress/sds/>使用 SDS 为 Gateway 提供 HTTPS 加密支持</a></li></ul></li><li role=none><a role=treeitem title="在 Istio 中配置从网格内访问外部服务的流量路由。" href=/v1.1/zh/docs/tasks/traffic-management/egress/>控制 Egress 流量</a></li><li role=none><a role=treeitem title=用连接、请求以及外部检测来进行熔断配置的过程。 href=/v1.1/zh/docs/tasks/traffic-management/circuit-breaking/>熔断</a></li><li role=none><a role=treeitem title="此任务演示了 Istio 的流量镜像功能。" href=/v1.1/zh/docs/tasks/traffic-management/mirroring/>镜像</a></li></ul></li><li role=treeitem aria-label=安全><button aria-hidden=true></button><a title=演示对服务网格进行安全加固的方法。 href=/v1.1/zh/docs/tasks/security/>安全</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="展示为 HTTP 服务设置基于角色的访问控制方法。" href=/v1.1/zh/docs/tasks/security/authz-http/>HTTP 服务的访问控制</a></li><li role=none><a role=treeitem title="整合 Vault CA 到 Istio 中为双向 TLS 提供 支持。" href=/v1.1/zh/docs/tasks/security/vault-ca/>Istio Vault CA 集成</a></li><li role=none><a role=treeitem title="有关如何在 Istio 中配置基于组的授权和配置列表类型声明的授权的教程。" href=/v1.1/zh/docs/tasks/security/rbac-groups/>基于组和列表类型声明的授权</a></li><li role=none><a role=treeitem title="介绍如何使用 Istio 认证策略设置双向 TLS 和基本的终端用户认证。" href=/v1.1/zh/docs/tasks/security/authn-policy/>基础认证策略</a></li><li role=none><a role=treeitem title="对 Istio 的自动双向 TLS 认证功能进行体验和测试。" href=/v1.1/zh/docs/tasks/security/mutual-tls/>深入了解双向 TLS</a></li><li role=none><a role=treeitem title=展示宽容模式的的鉴权过程。 href=/v1.1/zh/docs/tasks/security/authz-permissive/>鉴权过程中的宽容模式</a></li><li role=none><a role=treeitem title="展示如何为 TCP 服务设置基于角色的访问控制。" href=/v1.1/zh/docs/tasks/security/authz-tcp/>TCP 服务的访问控制</a></li><li role=none><a role=treeitem title=展示如何在服务网格中进行基于角色的访问控制。 href=/v1.1/zh/docs/tasks/security/role-based-access-control/>基于角色的访问控制</a></li><li role=none><a role=treeitem title="运维人员如何使用现有根证书配置 Citadel 进行证书以及密钥的签发。" href=/v1.1/zh/docs/tasks/security/plugin-ca-cert/>插入外部 CA 密钥和证书</a></li><li role=none><a role=treeitem title="如何在 Kubernetes 中启用 Citadel 的健康检查。" href=/v1.1/zh/docs/tasks/security/health-check/>Citadel 的健康检查</a></li><li role=none><a role=treeitem title="展示启用 SDS 来为 Istio 提供身份服务的过程。" href=/v1.1/zh/docs/tasks/security/auth-sds/>通过 SDS 提供身份服务</a></li><li role=none><a role=treeitem title="如何渐进式的为现有 Istio 服务添加双向 TLS 支持。" href=/v1.1/zh/docs/tasks/security/mtls-migration/>双向 TLS 的迁移</a></li><li role=none><a role=treeitem title="展示如何在 HTTPS 服务上启用双向 TLS。" href=/v1.1/zh/docs/tasks/security/https-overlay/>通过 HTTPS 进行双向 TLS</a></li></ul></li><li role=treeitem aria-label=策略><button aria-hidden=true></button><a title=演示策略实施功能。 href=/v1.1/zh/docs/tasks/policy-enforcement/>策略</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="本任务讲解如何启用 Istio 策略检查功能。" href=/v1.1/zh/docs/tasks/policy-enforcement/enabling-policy/>启用策略检查</a></li><li role=none><a role=treeitem title="这一任务展示了如何使用 Istio 动态的对服务通信进行速率限制。" href=/v1.1/zh/docs/tasks/policy-enforcement/rate-limiting/>启用速率限制</a></li><li role=none><a role=treeitem title="展示使用简单的 Denier 适配器或黑白名单对服务进行访问控制的方法。" href=/v1.1/zh/docs/tasks/policy-enforcement/denial-and-list/>Denier 适配器以及黑白名单</a></li><li role=none><a role=treeitem title="显示如何使用策略适配器修改请求 header 和路由。" href=/v1.1/zh/docs/tasks/policy-enforcement/control-headers/>控制 header 和路由</a></li></ul></li><li role=treeitem aria-label=遥测><button aria-hidden=true></button><a title=演示从服务网格收集遥测信息的方法。 href=/v1.1/zh/docs/tasks/telemetry/>遥测</a><ul role=group aria-expanded=false><li role=treeitem aria-label=指标度量><button aria-hidden=true></button><a title="演示 Istio 网格指标度量的配置、收集和处理。" href=/v1.1/zh/docs/tasks/telemetry/metrics/>指标度量</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="这一任务讲述如何配置 Istio,进行指标和日志的收集工作。" href=/v1.1/zh/docs/tasks/telemetry/metrics/collecting-metrics/>收集指标和日志</a></li><li role=none><a role=treeitem title="本任务展示了如何配置 Istio 进行 TCP 服务的指标收集。" href=/v1.1/zh/docs/tasks/telemetry/metrics/tcp-metrics/>获取 TCP 服务指标</a></li><li role=none><a role=treeitem title="此任务说明如何使用 Prometheus 查询 Istio 指标。" href=/v1.1/zh/docs/tasks/telemetry/metrics/querying-metrics/>查询 Prometheus 的指标</a></li><li role=none><a role=treeitem title="这个任务向您展示了如何设置和使用 Istio 仪表盘来监视网格流量。" href=/v1.1/zh/docs/tasks/telemetry/metrics/using-istio-dashboard/>使用 Grafana 可视化指标度量</a></li></ul></li><li role=treeitem aria-label=日志><button aria-hidden=true></button><a title="演示 Istio 网格日志的配置、收集和处理。" href=/v1.1/zh/docs/tasks/telemetry/logs/>日志</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="这一任务讲述如何配置 Istio,进行日志的收集工作。" href=/v1.1/zh/docs/tasks/telemetry/logs/collecting-logs/>收集日志</a></li><li role=none><a role=treeitem title="此任务向您展示如何配置 Envoy 代理将访问日志打印到其标准输出。" href=/v1.1/zh/docs/tasks/telemetry/logs/access-log/>获取 Envoy 访问日志</a></li><li role=none><a role=treeitem title="此任务说明如何配置 Istio 以将日志输出到 Fluentd 守护程序。" href=/v1.1/zh/docs/tasks/telemetry/logs/fluentd/>使用 Fluentd 记录日志</a></li></ul></li><li role=treeitem aria-label=分布式追踪><button aria-hidden=true></button><a title="该任务展示了如何为启用了 Istio 支持的应用进行追踪。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/>分布式追踪</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Istio 分布式追踪概述。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/overview/>概述</a></li><li role=none><a role=treeitem title="了解如何配置代理以向 Jaeger 发送追踪请求。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/jaeger/>Jaeger</a></li><li role=none><a role=treeitem title="了解如何配置代理以向 Zipkin 发送追踪请求。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/zipkin/>Zipkin</a></li><li role=none><a role=treeitem title="如何配置代理以发送请求至 LightStep [𝑥]PM." href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/lightstep/>使用 LightStep [𝑥]PM 进行分布式追踪</a></li></ul></li><li role=none><a role=treeitem title="本任务展示了在 Istio 网格中对服务进行可视化的过程。" href=/v1.1/zh/docs/tasks/telemetry/kiali/>网格可视化</a></li><li role=none><a role=treeitem title="本任务展示了为 Istio 遥测插件配置外部访问的过程。" href=/v1.1/zh/docs/tasks/telemetry/gateways/>遥测插件的远程访问</a></li></ul></li></ul></div></div><div class=card><button class="header dynamic" id=card84 title="这里包括多个可供 Istio 使用的可完整工作的示例,你可以用来亲自部署和体验这些示例。" aria-controls=card84-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#examples"/></svg>示例</button><div class=body aria-labelledby=card84 role=region id=card84-body><ul role=tree aria-expanded=true aria-labelledby=card84><li role=none><a role=treeitem title="部署一个用于演示多种 Istio 特性的应用,由四个单独的微服务构成。" href=/v1.1/zh/docs/examples/bookinfo/>Bookinfo 应用</a></li><li role=none><a role=treeitem title="如何在 Istio 服务网格中使用多种流量管理功能。" href=/v1.1/zh/docs/examples/intelligent-routing/>智能路由</a></li><li role=none><a role=treeitem title="演示如何使用 Istio Mixer 和 Istio sidecar 获取指标和日志,并在不同的服务间进行追踪。" href=/v1.1/zh/docs/examples/telemetry/>深入遥测</a></li><li role=none><a role=treeitem title="说明如何在谷歌云 Endpoints 服务中手动整合 Istio。" href=/v1.1/zh/docs/examples/endpoints/>在谷歌云 Endpoints 服务中安装 Istio</a></li><li role=none><a role=treeitem title="在单一服务网格中,如何使用 Istio 对 Kubernetes 集群以及虚拟机进行控制。" href=/v1.1/zh/docs/examples/integrating-vms/>虚拟机集成</a></li><li role=treeitem aria-label=边缘流量控制><button aria-hidden=true></button><a title="用于管理 Istio 服务网格的边缘流量(即 Ingress 和 Egress 流量)的各种高级示例。" href=/v1.1/zh/docs/examples/advanced-gateways/>边缘流量控制</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="介绍如何为入口网关配置 SNI 直通。" href=/v1.1/zh/docs/examples/advanced-gateways/ingress-sni-passthrough/>没有 TLS 的 Ingress gateway</a></li><li role=none><a role=treeitem title="描述如何通过专用网关服务将流量定向到外部服务来配置 Istio。" href=/v1.1/zh/docs/examples/advanced-gateways/egress-gateway/>配置 Egress gateway</a></li><li role=none><a role=treeitem title="描述了配置 Egress 网关来发起对外部服务进行 TLS 通信的过程。" href=/v1.1/zh/docs/examples/advanced-gateways/egress-gateway-tls-origination/>Egress 网关的 TLS 发起过程</a></li><li role=none><a role=treeitem title="此任务描述 Istio 如何配置出口流量的 TLS。" href=/v1.1/zh/docs/examples/advanced-gateways/egress-tls-origination/>出口流量的 TLS</a></li><li role=none><a role=treeitem title="介绍如何为公共域中的一组主机启用 Egress 流量,而不是单独配置每个主机。" href=/v1.1/zh/docs/examples/advanced-gateways/wildcard-egress-hosts/>使用通配符主机配置 Egress 流量</a></li><li role=none><a role=treeitem title="如何为 Egress TLS 流量配置 SNI 监控并应用策略。" href=/v1.1/zh/docs/examples/advanced-gateways/egress_sni_monitoring_and_policies/>Egress TLS 流量中的 SNI 监控及策略</a></li><li role=none><a role=treeitem title="描述如何配置 Istio 以允许应用程序使用外部 HTTPS 代理。" href=/v1.1/zh/docs/examples/advanced-gateways/http-proxy/>连接到外部 HTTPS 代理</a></li><li role=none><a role=treeitem title="展示使用 cert-Manager 为 Kubernetes Ingress 获取 Let's Encrypt TLS 证书的过程。" href=/v1.1/zh/docs/examples/advanced-gateways/ingress-certmgr/>使用 cert-manager 加密 Kubernetes Ingress</a></li></ul></li><li role=treeitem aria-label=单一三层网络的多集群网格><button aria-hidden=true></button><a title="您可以尝试各种基于 VPN 的 Istio 多集群示例。" href=/v1.1/zh/docs/examples/multicluster/>单一三层网络的多集群网格</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title=在一个使用网关进行连接的多集群网格中配置远程服务。 href=/v1.1/zh/docs/examples/multicluster/gateways/>通过网关进行连接的多集群</a></li><li role=none><a role=treeitem title="基于 GKE 的 Istio 多集群安装。" href=/v1.1/zh/docs/examples/multicluster/gke/>Google Kubernetes Engine</a></li><li role=none><a role=treeitem title="多 IBM Cloud Private 集群安装 Istio 示例。" href=/v1.1/zh/docs/examples/multicluster/icp/>IBM Cloud Private</a></li><li role=none><a role=treeitem title="IBM Cloud Kubernetes Service 和 IBM Cloud Private 之间的多集群示例。" href=/v1.1/zh/docs/examples/multicluster/iks-icp/>IBM Cloud Kubernetes Service & IBM Cloud Private</a></li><li role=none><a role=treeitem title="利用 Istio 的水平分割 EDS 来创建多集群网格。" href=/v1.1/zh/docs/examples/multicluster/split-horizon-eds/>集群感知的服务路由</a></li></ul></li></ul></div></div><div class=card><button class="header dynamic" id=card114 title="参考部分包含详细的权威参考资料,如命令行选项、配置选项和 API 调用参数。" aria-controls=card114-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#reference"/></svg>参考</button><div class="body default" aria-labelledby=card114 role=region id=card114-body><ul role=tree aria-expanded=true aria-labelledby=card114><li role=treeitem aria-label=配置><button aria-hidden=true></button><a title=关于配置选项的详细信息。 href=/v1.1/zh/docs/reference/config/>配置</a><ul role=group aria-expanded=false><li role=treeitem aria-label=流量管理><button aria-hidden=true></button><a title="描述如何配置 HTTP/TCP 路由功能。" href=/v1.1/zh/docs/reference/config/networking/>流量管理</a><ul role=group aria-expanded=false class=leaf-section></ul></li><li role=none><a role=treeitem title="描述了使用 Helm chart 安装 Istio 时可以使用的选项。" href=/v1.1/zh/docs/reference/config/installation-options/>安装选项</a></li><li role=none><a role=treeitem title="详细描述 release-1.0 和 release-1.1 之间 Helm chart 安装选项的差异。" href=/v1.1/zh/docs/reference/config/installation-options-changes/>安装选项的变更</a></li><li role=treeitem aria-label=授权><button aria-hidden=true></button><a title=关于如何配置Istio授权特性的描述。 href=/v1.1/zh/docs/reference/config/authorization/>授权</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title=描述所支持的约束和属性。 href=/v1.1/zh/docs/reference/config/authorization/constraints-and-properties/>约束和属性</a></li><li role=none><a role=treeitem title=配置基于角色的访问控制。 href=/v1.1/zh/docs/reference/config/authorization/istio.rbac.v1alpha1/>RBAC</a></li></ul></li><li role=treeitem aria-label=策略和遥测><button aria-hidden=true></button><a title="描述如何配置 Istio 的策略和遥测功能。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/>策略和遥测</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title=介绍策略和控制中会用到的一些基础属性词汇。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/attribute-vocabulary/>属性词汇</a></li><li role=none><a role=treeitem title="Mixer 的配置表达式语言参考。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/expression-language/>表达式语言</a></li><li role=treeitem aria-label=适配器><button aria-hidden=true></button><a title="Mixer 适配器能够让 Istio 连接各种基础设施后端以完成类似指标和日志这样的功能。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/>适配器</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Apigee 的分布式策略检查以及分析适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/apigee/>Apigee</a></li><li role=none><a role=treeitem title="适用于 circonus.com 的监控解决方案。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/circonus/>Circonus</a></li><li role=none><a role=treeitem title="CloudMonitor 适配器使 Istio 可以向 AliCloud CloudMonitor 提供指标。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/cloudmonitor/>CloudMonitor</a></li><li role=none><a role=treeitem title=始终返回按前提条件拒绝的适配器。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/denier/>Denier</a></li><li role=none><a role=treeitem title="用于将日志发送给 Fluentd 守护进程的适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/fluentd/>Fluentd</a></li><li role=none><a role=treeitem title="将指标发送到 SignalFx 的适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/signalfx/>SignalFx</a></li><li role=none><a role=treeitem title="从 Kubernetes 环境中获取集群信息。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/kubernetesenv/>Kubernetes Env</a></li><li role=none><a role=treeitem title=用于执行黑名单或白名单检测的适配器。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/list/>List</a></li><li role=none><a role=treeitem title=简单内存配额管理系统适配器。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/memquota/>Memory quota</a></li><li role=none><a role=treeitem title="基于 Redis 的配额管理系统。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/redisquota/>Redis Quota</a></li><li role=none><a role=treeitem title="用于向 Google Service Control 发送日志和指标的适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/servicecontrol/>Service Control</a></li><li role=none><a role=treeitem title="该适配器用于向 statsd 后端发送指标数据。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/statsd/>statsd</a></li><li role=none><a role=treeitem title=该适配器可以在本地输出日志和指标。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/stdio/>Stdio</a></li></ul></li><li role=treeitem aria-label=模板><button aria-hidden=true></button><a title="Mixer 模板用于将数据发送到各个适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/>模板</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="该模板用于表达一个 API Key。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/apikey/>API Key</a></li><li role=none><a role=treeitem title="Analytics 模板用于向 Apigee 发送运行时遥测数据。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/analytics/>Analytics</a></li><li role=none><a role=treeitem title=该模版用于访问控制查询。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/authorization/>Authorization</a></li><li role=none><a role=treeitem title=该模板不包含任何数据,用于测试。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/checknothing/>Check Nothing</a></li><li role=none><a role=treeitem title="用于生成 Kubernetes 的特定属性。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/kubernetes/>Kubernetes</a></li><li role=none><a role=treeitem title=该模板用于执行列表检查操作。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/listentry/>List Entry</a></li><li role=none><a role=treeitem title=该模板用于表达一条运行时日志项。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/logentry/>Log Entry</a></li><li role=none><a role=treeitem title=该模板用于表达一个运行时产生的监控指标数据。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/metric/>Metric</a></li><li role=none><a role=treeitem title=该模板用于表达占用配额的请求。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/quota/>Quota</a></li><li role=none><a role=treeitem title=该模板不包含数据,用于测试。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/reportnothing/>Report Nothing</a></li><li role=none><a role=treeitem title="用于 Google Service Control 适配器的模板。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/servicecontrolreport/>Service Control Report</a></li><li role=none><a role=treeitem title="该模板用于表达分布式追踪数据中的一个 Span。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/tracespan/>Trace Span</a></li></ul></li><li role=none><a role=treeitem title="通过 Mixer 从 Istio 导出的默认监控指标。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/metrics/>默认监控指标</a></li></ul></li><li role=none><a role=treeitem title=流量路由配置。 href=/v1.1/zh/docs/reference/config/istio.networking.v1alpha3/>通信路由</a></li></ul></li><li role=treeitem aria-label=命令><button class=show aria-hidden=true></button><a title="描述 Istio 命令和工具的用法及选项。" href=/v1.1/zh/docs/reference/commands/>命令</a><ul role=group aria-expanded=true class=leaf-section><li role=none><a role=treeitem title="Galley 为 Istio 提供配置管理服务。" href=/v1.1/zh/docs/reference/commands/galley/>galley</a></li><li role=none><a role=treeitem title="自动注入 Istio sidecar 的 Kubernetes webhook。" href=/v1.1/zh/docs/reference/commands/sidecar-injector/>sidecar-injector</a></li><li role=none><span role=treeitem class=current title="Istio 控制界面。">istioctl</span></li><li role=none><a role=treeitem title="Istio 证书颁发(CA)。" href=/v1.1/zh/docs/reference/commands/istio_ca/>istio_ca</a></li><li role=none><a role=treeitem title="用于触发直接调用 Mixer API 的实用程序。" href=/v1.1/zh/docs/reference/commands/mixc/>mixc</a></li><li role=none><a role=treeitem title="Mixer 是 Istio 在后端基础设施之上的抽象。" href=/v1.1/zh/docs/reference/commands/mixs/>mixs</a></li><li role=none><a role=treeitem title="节点一级的 Istio 安全代理。" href=/v1.1/zh/docs/reference/commands/node_agent/>node_agent</a></li><li role=none><a role=treeitem title="Istio Pilot。" href=/v1.1/zh/docs/reference/commands/pilot-discovery/>pilot-discovery</a></li></ul></li></ul></div></div></div></nav></div><div class=article-container><button tabindex=-1 id=sidebar-toggler title=折叠导航栏><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#pull"/></svg></button><nav aria-label=Breadcrumb><ol><li><a href=/v1.1/zh/>Istio</a></li><li><a href=/v1.1/zh/docs/ title="了解如何部署、使用和运维 Istio。">文档</a></li><li><a href=/v1.1/zh/docs/reference/ title="参考部分包含详细的权威参考资料,如命令行选项、配置选项和 API 调用参数。">参考</a></li><li><a href=/v1.1/zh/docs/reference/commands/ title="描述 Istio 命令和工具的用法及选项。">命令</a></li><li>istioctl</li></ol></nav><article aria-labelledby=title><div class=title-area><div><h1 id=title>istioctl</h1><p class=byline><span title="1252 字"><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#clock"/></svg><span> </span>阅读大约需要 6 分钟</span></p></div></div><nav class=toc-inlined aria-label="Table of Contents"><div><hr><ol><li role=none aria-label=简介><a href=#%e7%ae%80%e4%bb%8b>简介</a><li role=none aria-label=全局选项><a href=#%e5%85%a8%e5%b1%80%e9%80%89%e9%a1%b9>全局选项</a><li role=none aria-label="istioctl authn"><a href=#istioctl-authn><code>istioctl authn</code></a><li role=none aria-label="istioctl authn tls-check"><a href=#istioctl-authn-tls-check><code>istioctl authn tls-check</code></a><li role=none aria-label="istioctl context-create"><a href=#istioctl-context-create><code>istioctl context-create</code></a><li role=none aria-label="istioctl create"><a href=#istioctl-create><code>istioctl create</code></a><li role=none aria-label="istioctl delete"><a href=#istioctl-delete><code>istioctl delete</code></a><li role=none aria-label="istioctl deregister"><a href=#istioctl-deregister><code>istioctl deregister</code></a><li role=none aria-label="istioctl experimental"><a href=#istioctl-experimental><code>istioctl experimental</code></a><li role=none aria-label="istioctl experimental convert-ingress"><a href=#istioctl-experimental-convert-ingress><code>istioctl experimental convert-ingress</code></a><li role=none aria-label="istioctl experimental metrics"><a href=#istioctl-experimental-metrics><code>istioctl experimental metrics</code></a><li role=none aria-label="istioctl experimental rbac"><a href=#istioctl-experimental-rbac><code>istioctl experimental rbac</code></a><li role=none aria-label="istioctl experimental rbac can"><a href=#istioctl-experimental-rbac-can><code>istioctl experimental rbac can</code></a><li role=none aria-label="istioctl gen-deploy"><a href=#istioctl-gen-deploy><code>istioctl gen-deploy</code></a><li role=none aria-label="istioctl get"><a href=#istioctl-get><code>istioctl get</code></a><li role=none aria-label="istioctl kube-inject"><a href=#istioctl-kube-inject><code>istioctl kube-inject</code></a><li role=none aria-label="istioctl proxy-config"><a href=#istioctl-proxy-config><code>istioctl proxy-config</code></a><li role=none aria-label="istioctl proxy-config bootstrap"><a href=#istioctl-proxy-config-bootstrap><code>istioctl proxy-config bootstrap</code></a><li role=none aria-label="istioctl proxy-config cluster"><a href=#istioctl-proxy-config-cluster><code>istioctl proxy-config cluster</code></a><li role=none aria-label="istioctl proxy-config endpoint"><a href=#istioctl-proxy-config-endpoint><code>istioctl proxy-config endpoint</code></a><li role=none aria-label="istioctl proxy-config listener"><a href=#istioctl-proxy-config-listener><code>istioctl proxy-config listener</code></a><li role=none aria-label="istioctl proxy-config route"><a href=#istioctl-proxy-config-route><code>istioctl proxy-config route</code></a><li role=none aria-label="istioctl proxy-config status"><a href=#istioctl-proxy-config-status><code>istioctl proxy-config status</code></a><li role=none aria-label="istioctl register"><a href=#istioctl-register><code>istioctl register</code></a><li role=none aria-label="istioctl replace"><a href=#istioctl-replace><code>istioctl replace</code></a><li role=none aria-label="istioctl version"><a href=#istioctl-version><code>istioctl version</code></a></ol><hr></div></nav><h2 id=简介>简介</h2><p>Istio 的命令行配置工具。为运维人员提供对服务网格的调试和检测能力。</p><h2 id=全局选项>全局选项</h2><p>下表为全局参数,在每个子命令中都可以使用表格中的选项。</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--context <string></code></td><td></td><td>Istio 使用的 kubeconfig 上下文名称(缺省值 <code>''</code>)</td></tr><tr><td><code>--istioNamespace <string></code></td><td><code>-i</code></td><td>Istio 所在的命名空间(缺省值 <code>istio-system</code>)</td></tr><tr><td><code>--kubeconfig <string></code></td><td><code>-c</code></td><td>Kubernetes 配置文件(缺省值 <code>''</code>)</td></tr><tr><td><code>--log_as_json</code></td><td></td><td>是否将输出格式化为 JSON,缺省情况下会以控制台友好的纯文本格式进行输出</td></tr><tr><td><code>--log_caller <string></code></td><td></td><td>以逗号作为分隔符的列表,用于指定日志中包含的调用者信息的范围,范围可以从这一列表中选择:<code>[ads, default, mcp, mcp-creds, model, rbac]</code> (缺省值 <code>''</code>)</td></tr><tr><td><code>--log_output_level <string></code></td><td></td><td>以逗号作为分隔符的列表,指定每个范围的日志级别,格式为 <code><scope>:<level>,<scope>:<level>...</code>,<code>scope</code> 是 <code>[ads, default, mcp, mcp-creds, model, rbac]</code> 中的一个,日志级别可以选择 <code>[debug, info, warn, error, fatal, none]</code>(缺省值 <code>default:info</code>)</td></tr><tr><td><code>--log_rotate <string></code></td><td></td><td>可选的日志轮转文件的路径(缺省值 <code>''</code>)</td></tr><tr><td><code>--log_rotate_max_age <int></code></td><td></td><td>日志文件的最大寿命,以天为单位,超出之后会进行轮转(<code>0</code> 代表无限制,缺省值 <code>30</code>)</td></tr><tr><td><code>--log_rotate_max_backups <int></code></td><td></td><td>日志文件备份的最大数量,超出这一数量之后就会删除比较陈旧的文件。(<code>0</code> 代表无限制,缺省值 <code>1000</code>)</td></tr><tr><td><code>--log_rotate_max_size <int></code></td><td></td><td>日志文件的最大尺寸,以 M 为单位,超出限制之后会进行轮转(缺省值 <code>104857600</code>)</td></tr><tr><td><code>--log_stacktrace_level <string></code></td><td></td><td>以逗号作为分隔符的列表,用于指定 Stack trace 时每个范围的最小日志级别,大致是 <code><scope>:<level>,<scope:level>...</code> 的形式,<code>scope</code> 是 <code>[ads, default, model, rbac]</code> 中的一个,日志级别可以选择 <code>[debug, info, warn, error, none]</code>,(缺省值 <code>default:none</code>)</td></tr><tr><td><code>--log_target <stringArray></code></td><td></td><td>一组用于输出日志的路径。可以是任何路径,也可以是 <code>stdout</code> 和 <code>stderr</code> 之类的特殊值。(缺省值 <code>[stdout]</code>)</td></tr><tr><td><code>--namespace <string></code></td><td><code>-n</code></td><td>配置所在命名空间 (缺省值 ``)</td></tr><tr><td><code>--platform <string></code></td><td><code>-p</code></td><td>Istio 主机平台(缺省值 <code>kube</code>)</td></tr></tbody></table><h2 id=istioctl-authn><code>istioctl authn</code></h2><p>这一组命令用于同 Istio 认证策略进行交互。</p><p>该命令支持的子命令列表如下:</p><ul><li><code>tls-check</code></li></ul><p>典型用例:</p><p>检查认证策略和目标规则之间的 TLS 设置是否匹配:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl authn tls-check
|
||
</code></pre><h2 id=istioctl-authn-tls-check><code>istioctl authn tls-check</code></h2><p>要求 Pilot 进行检查,服务注册表中的每个服务都在使用什么认证策略以及目标规则,以及 TLS 设置是否匹配。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl [<服务>] [选项]
|
||
</code></pre><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 检查服务注册表中所有已知服务的设置。
|
||
istioclt authn tls-check
|
||
|
||
# 检查特定的某个服务。
|
||
istioclt authn tls-check foo.bar.svc.cluster.local
|
||
</code></pre><h2 id=istioctl-context-create><code>istioctl context-create</code></h2><p>在非 Kubernetes 环境中为 <code>istioctl</code> 创建一个 kubeconfig 文件。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl context-create --api-server http://<ip 地址>:<端口> [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--api-server <string></code></td><td></td><td>Istio api-server 的 URL(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 为 API Server 创建一个配置文件。
|
||
istioctl context-create --api-server http://127.0.0.1:8080
|
||
</code></pre><h2 id=istioctl-create><code>istioctl create</code></h2><p>创建策略或规则。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl create [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--file <string></code></td><td>-f</td><td>用包含配置对象内容的文件作为命令输入(如果没有设置,命令会从标准输入中进行读取,缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl create -f example-routing.yaml
|
||
</code></pre><h2 id=istioctl-delete><code>istioctl delete</code></h2><p>删除策略或规则。</p><pre><code class=language-shell data-expandlinks=true>istioctl delete <类型> <名称> [<名称2> ... <名称 N>] [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--file <string></code></td><td>-f</td><td>用包含配置对象内容的文件作为命令输入(如果没有设置,命令会从标准输入中进行读取,缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 删除在文件 example-routing.yaml 中定义的规则。
|
||
istioctl delete -f example-routing.yaml
|
||
|
||
# 删除 bookinfo 虚拟服务。
|
||
istioctl delete virtualservice bookinfo
|
||
</code></pre><h2 id=istioctl-deregister><code>istioctl deregister</code></h2><p>解除服务实例的注册。</p><pre><code class=language-bash data-expandlinks=true>$ istioctl deregister <服务名称> <ip 地址> [选项]
|
||
</code></pre><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 从服务 my-svc 中解除端点 172.17.0.2 的注册。
|
||
istioctl deregister my-svc 172.17.0.2
|
||
</code></pre><h2 id=istioctl-experimental><code>istioctl experimental</code></h2><p>实验性命令,未来可能会修改或者弃用。</p><p>该命令支持的子命令列表如下:</p><ul><li><code>convert-ingress</code></li><li><code>metrics</code></li><li><code>rbac</code></li></ul><h2 id=istioctl-experimental-convert-ingress><code>istioctl experimental convert-ingress</code></h2><p>将 Ingress 转化为 <code>VirtualService</code> 配置。其输出内容可以作为 Istio 配置的起点,可能需要进行一些小修改。如果指定配置无法完美的完成转化,就会出现警告信息。输入内容必须是 Kubernetes Ingress。对 v1alpha1 的 Istio 规则的转换支持现在已经移除。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl experimental convert-ingress [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--filenames <stringSlice></code></td><td><code>-f</code></td><td>输入文件名称(缺省值 <code>[]</code>)</td></tr></tbody></table><p>典型用例:</p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/bookinfo/platform/kube/bookinfo-ingress.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true>$ istioctl experimental convert-ingress -f @samples/bookinfo/platform/kube/bookinfo-ingress.yaml@
|
||
</code></pre></div><h2 id=istioctl-experimental-metrics><code>istioctl experimental metrics</code></h2><p>在 Kubernetes 中可以使用这一命令打印指定服务的指标数据。</p><p>该命令会查找 Istio 系统命名空间中运行的 Prometheus Pod;接下来会为每个工作负载执行一系列的查询,得出以下指标:每秒总请求数、错误率以及请求延迟的 <code>p50</code>、<code>p90</code> 和 <code>p99</code> 分布。查询结果会输出到控制台,用工作负载名称进行分组。</p><p>返回的所有指标都是来自于服务端的报告的。这意味着延迟和错误率数据是来自于服务自身,而不是客户端(也不是客户端的聚合)。错误率和延迟的计算周期为一分钟。</p><pre><code class=language-bash data-expandlinks=true>$ istioctl experimental metrics <工作负载名称>...
|
||
</code></pre><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 获取工作负载 productpage-v1 的指标数据。
|
||
istioctl experimental metrics productpage-v1
|
||
# 获取多个不同命名空间中不同服务的指标数据。
|
||
istioctl experimental metrics productpage-v1.foo reviews-v1.bar ratings-v1.baz
|
||
</code></pre><h2 id=istioctl-experimental-rbac><code>istioctl experimental rbac</code></h2><p>这一组命令用来操作 Istio RBAC 策略。例如查询特定请求在当前 Istio RBAC 策略中是否会被拒绝。</p><p>该命令支持的子命令列表如下:</p><ul><li>can</li></ul><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 查询是否允许用户 test 对服务 rating 进行 GET /v1/health 操作。
|
||
istioctl experimental rbac can -u test GET rating /v1/health
|
||
</code></pre><h2 id=istioctl-experimental-rbac-can><code>istioctl experimental rbac can</code></h2><p>这一命令可以用来查询特定请求在当前 Istio RBAC 策略之中,是否会被拒绝。其原理是根据命令行中提供的主体和动作,构建一个请求,用来检查当前 Istio RBAC 策略是否会按照设计进行工作。需要注意的是,这个请求只会在本地用来评估 Istio RBAC 策略的实际效果,并不会产生真正的请求。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl experimental rbac can <方法> <服务> <路径> [选项]
|
||
</code></pre><ul><li><strong>方法</strong>:指 HTTP 方法,例如 <code>GET</code> 和 <code>POST</code> 等。</li><li><strong>服务</strong>:服务名称。</li><li><strong>路径</strong>:服务中的 HTTP 路径。</li></ul><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--action-properties <stringArray></code></td><td><code>-a</code></td><td>动作的附加数据。用 <code>name1=value1,name2=value2,...</code> 的方式赋值(缺省值为 <code>[]</code>)</td></tr><tr><td><code>--groups <string></code></td><td><code>-g</code></td><td>主体的组名称或者 ID(缺省值 <code>''</code>)</td></tr><tr><td><code>--subject-properties <stringArray></code></td><td><code>-s</code></td><td>主体的附加数据。用 <code>name1=value1,name2=value2,...</code> 的方式赋值(缺省值为 <code>[]</code>)</td></tr><tr><td><code>--user <string></code></td><td><code>-u</code></td><td>主体的用户名称或者 ID(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 查询是否允许用户 test 对服务 rating 进行 GET /v1/health 操作。
|
||
istioctl experimental rbac can -u test GET rating /v1/health
|
||
|
||
# 查询是否允许 product-page 服务对 ratings 服务的 /data 路径发起 POST 请求,其中的 ratings 服务需带有标签:version=dev。
|
||
istioctl experimental rbac can -s service=product-page POST rating /data -a version=dev
|
||
</code></pre><h2 id=istioctl-gen-deploy><code>istioctl gen-deploy</code></h2><p>用于生成 Istio 的部署文件。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl gen-deploy [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>描述</th></tr></thead><tbody><tr><td><code>--debug</code></td><td>如果为 True,会使用 Debug 镜像代替普通镜像</td></tr><tr><td><code>--helm-chart-dir <string></code></td><td>在这一目录中查找 Helm chart 用来渲染生成 Istio 部署。<code>-o yaml</code> 会用这个参数在本地进行 Helm chart 的渲染。(缺省值 <code>.</code>)</td></tr><tr><td><code>--hyperkube-hub <string></code></td><td>用于拉取 Hyperkube 镜像的容器仓库(缺省值 <code>quay.io/coreos/hyperkube</code>)</td></tr><tr><td><code>--hyperkube-tag <Hyperkube></code></td><td>Hyperkube 镜像的 Tag(缺省值 <code>v1.7.6_coreos.0</code>)</td></tr><tr><td><code>--ingress-node-port <uint16></code></td><td>如果指定了这一选项,Istio ingress 会以 <code>NodePort</code> 的形式运行,并映射到这一选项指定的端口。注意,如果 <code>ingress</code> 选项没有打开,这一选项会被忽略(缺省值 <code>0</code>)</td></tr><tr><td><code>--values <string></code></td><td><code>values.yaml</code> 文件的路径,在使用 <code>--out=yaml</code> 时,会用来在本地渲染 YAML。如果直接使用这一文件,会忽略上面的选项值(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl gen-deploy --values myvalues.yaml
|
||
</code></pre><h2 id=istioctl-get><code>istioctl get</code></h2><p>获取规则和策略。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl get <类型> [<名称>] [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--all-namespaces</code></td><td></td><td>如果使用这一参数,会列出所有命名空间中的对象。当前 context 以及 <code>--namespace</code> 指定的命名空间都会被忽略</td></tr><tr><td><code>--namespace <string></code></td><td><code>-n</code></td><td>目标命名空间(缺省值 <code>''</code>)</td></tr><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>输出格式,可选内容包括 <code>yaml</code> 以及 <code>short</code>(缺省值 <code>short</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-script data-expandlinks=true># 列出所有虚拟服务。
|
||
istioctl get virtualservices
|
||
|
||
# 列出所有目标规则。
|
||
istioctl get destinationrules
|
||
|
||
# 获取名为 bookinfo 的虚拟服务。
|
||
istioctl get virtualservice bookinfo
|
||
</code></pre><h2 id=istioctl-kube-inject><code>istioctl kube-inject</code></h2><p><code>kube-inject</code> 子命令用来将 Envoy sidecar 注入到 Kubernetes 负载之中。执行过程中如果遇到无法支持的资源,会保持原样不进行修改,因此对于复杂应用中包含多种资源的输入文件来说,该命令也是安全的。资源初创时就是该操作的最佳执行时机。</p><p>目前 <code>Job</code>、<code>DaemonSet</code>、<code>ReplicaSet</code>、<code>Pod</code> 以及 <code>Deployment</code> 对象的 YAML 文档,都可以使用这一命令进行处理,修改其中的 <a href=https://k8s.io/docs/concepts/workloads/pods/pod-overview/#pod-templates>Pod Template</a>,如果有必要的话,可以加入更多对基于 Pod 的资源类型的支持。</p><p>Istio 项目是一个持续进化的项目,所以 Istio sidecar 的配置可能在不经公示的情况下发生变更。在怀疑配置过期的时候,可以重新运行注入命令来更新注入代码。</p><p><code>istioctl</code> 中内置了缺省的 Sidecar 注入模板,还可以使用参数 <code>--injectConfigFile</code> 或者 <code>--injectConfigMapName</code> 进行覆盖。这两个参数会覆盖其他的模板配置参数,例如 <code>--hub</code> 和 <code>--tag</code>。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl kube-inject [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--filename <string></code></td><td><code>-f</code></td><td>Kubernetes 资源文件名(缺省值 <code>''</code>)</td></tr><tr><td><code>--injectConfigFile <string></code></td><td></td><td>注入配置文件名,不能和 <code>--injectConfigMapName</code> 同时使用(缺省值 <code>''</code>)</td></tr><tr><td><code>--injectConfigMapName <string></code></td><td></td><td>Istio sidecar 注入配置的 ConfigMap 名称,Key 名称是 <code>config</code>。这个选项会覆盖任何其他的 Sidecar 注入配置选项,例如 <code>--hub</code>(缺省值 <code>istio-sidecar-injector</code>)</td></tr><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>注入后输出的资源文件名(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 在 Apply 之前进行对资源文件进行更新。
|
||
kubectl apply -f <(istioctl kube-inject -f <resource.yaml>)
|
||
|
||
# 对资源文件执行 Envoy sidecar 注入之后,保存为文件。
|
||
istioctl kube-inject -f deployment.yaml -o deployment-injected.yaml
|
||
|
||
# 在线修改一个正在运行的 Deployment。
|
||
kubectl get deployment -o yaml | istioctl kube-inject -f - | kubectl apply -f -
|
||
|
||
# 使用 Configmap `istio-inject` 进行 Envoy sidecar 的注入,并生成持久化文件。
|
||
istioctl kube-inject -f deployment.yaml -o deployment-injected.yaml --injectConfigMapName istio-inject
|
||
</code></pre><h2 id=istioctl-proxy-config><code>istioctl proxy-config</code></h2><p>这一组命令用来从 Envoy 中获取配置信息。</p><p>该命令支持的子命令列表如下:</p><ul><li>bootstrap</li><li>cluster</li><li>endpoint</li><li>listener</li><li>route</li></ul><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>输出格式,可选 <code>json</code> 或者 <code>short</code>(缺省值 <code>short</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 从 Envoy 实例中获取代理配置方面的信息。
|
||
istioctl proxy-config <clusters|listeners|routes|endpoints|bootstrap> <pod-name>
|
||
</code></pre><h2 id=istioctl-proxy-config-bootstrap><code>istioctl proxy-config bootstrap</code></h2><p>在指定 Pod 中获取 Envoy 实例的启动信息。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl proxy-config bootstrap <pod-name> [flags]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>输出格式,可选 <code>json</code> 或者 <code>short</code>(缺省值 <code>short</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 在指定 Pod 的 Envoy 中获取完整的 Bootstrap 信息。
|
||
istioctl proxy-config bootstrap <pod-name>
|
||
</code></pre><h2 id=istioctl-proxy-config-cluster><code>istioctl proxy-config cluster</code></h2><p>从指定 Pod 中的 Envoy 实例里读取集群配置信息。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl proxy-config cluster <pod-name> [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--direction <string></code></td><td></td><td>使用 <code>direction</code> 字段对集群进行过滤(缺省值 <code>''</code>)</td></tr><tr><td><code>--fqdn <string></code></td><td></td><td>使用服务 <code>fqdn</code> 字段对集群进行过滤(缺省值 <code>''</code>)</td></tr><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>输出格式,可选 <code>json</code> 或者 <code>short</code>(缺省值 <code>short</code>)</td></tr><tr><td><code>--port <int></code></td><td></td><td>使用 <code>port</code> 字段对集群进行过滤 (缺省值 <code>0</code>)</td></tr><tr><td><code>--subset <string></code></td><td></td><td>使用 <code>subset</code> 字段对集群进行过滤 (缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 从选定 Pod 的 Envoy 中获取集群配置的概要信息。
|
||
istioctl proxy-config clusters <pod-name>
|
||
|
||
# 使用 9080 端口获取集群概要信息。
|
||
istioctl proxy-config clusters <pod-name> --port 9080
|
||
|
||
# 获取 FQDN 为 details.default.svc.cluster.local 的完整的集群信息。
|
||
istioctl proxy-config clusters <pod-name> --fqdn details.default.svc.cluster.local --direction inbound -o json
|
||
</code></pre><h2 id=istioctl-proxy-config-endpoint><code>istioctl proxy-config endpoint</code></h2><p>从选定 Pod 的 Envoy 实例中获取端点配置信息。</p><p>基本用法:</p><pre><code class=language-shell data-expandlinks=true>istioctl proxy-config endpoint <pod-name> [flags]
|
||
</code></pre><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--address <string></code></td><td></td><td>使用 <code>address</code> 字段对端点进行过滤(缺省值 <code>''</code>)</td></tr><tr><td><code>--cluster <string></code></td><td></td><td>使用集群名称字段对端点进行过滤(缺省值 <code>''</code>)</td></tr><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>输出格式,可选 <code>json</code> 或者 <code>short</code>(缺省值 <code>short</code>)</td></tr><tr><td><code>--port <int></code></td><td></td><td>使用 <code>port</code> 字段对端点进行过滤 (缺省值 <code>0</code>)</td></tr><tr><td><code>--status <string></code></td><td></td><td>使用 <code>status</code> 字段对端点进行过滤(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 从指定 Pod 的 Envoy 中获取完整的端点配置。
|
||
istioctl proxy-config endpoint <pod-name>
|
||
|
||
# 获取端口 9080 上的端点概要信息。
|
||
istioctl proxy-config endpoint <pod-name> --port 9080
|
||
|
||
# 获取地址 172.17.0.2 的所有端点。
|
||
istioctl proxy-config endpoint <pod-name> --address 172.17.0.2 -o json
|
||
|
||
# 用集群名称 (outbound|9411||zipkin.istio-system.svc.cluster.local) 获取所有端点。
|
||
istioctl proxy-config endpoint <pod-name> --cluster "outbound|9411||zipkin.istio-system.svc.cluster.local" -o json
|
||
# 获取状态为 healthy 的所有端点。
|
||
istioctl proxy-config endpoint <pod-name> --status healthy -ojson
|
||
</code></pre><h2 id=istioctl-proxy-config-listener><code>istioctl proxy-config listener</code></h2><p>从选定 Pod 的 Envoy 中获取监听器信息。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl proxy-config listener <pod-name> [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--address <string></code></td><td></td><td>使用 <code>address</code> 对监听器进行过滤(缺省值 <code>''</code>)</td></tr><tr><td><code>--output <string></code></td><td><code>-o</code></td><td>输出格式,可选 <code>json</code> 或者 <code>short</code>(缺省值 <code>short</code>)</td></tr><tr><td><code>--port <int></code></td><td></td><td>使用 <code>port</code> 对监听器进行过滤(缺省值 <code>0</code>)</td></tr><tr><td><code>--type <string></code></td><td></td><td>使用 <code>type</code> 对监听器进行过滤(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 从指定 Pod 的 Envoy 中获取监听器配置概要信息。
|
||
istioctl proxy-config listeners <pod-name>
|
||
|
||
# 获取 9080 端口的监听器概要信息。
|
||
istioctl proxy-config listeners <pod-name> --port 9080
|
||
|
||
# 使用通配符地址(0.0.0.0)获取完整的 HTTP 监听器信息。
|
||
istioctl proxy-config listeners <pod-name> --type HTTP --address 0.0.0.0 -o json
|
||
</code></pre><h2 id=istioctl-proxy-config-route><code>istioctl proxy-config route</code></h2><p>从指定 Pod 的 Envoy 中获取路由配置。</p><p>基本用法:</p><pre><code class=language-shell data-expandlinks=true>istioctl proxy-config route <pod-name> [flags]
|
||
</code></pre><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--name <string></code></td><td></td><td>使用路由名称对监听器进行过滤(缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 从指定 Pod 的 Envoy 中获取路由配置概要。
|
||
istioctl proxy-config routes <pod-name>
|
||
|
||
# 获取路由 9080 的配置概要信息。
|
||
istioctl proxy-config route <pod-name> --name 9080
|
||
|
||
# 获取路由 9080 的完整配置信息。
|
||
istioctl proxy-config route <pod-name> --name 9080 -o json
|
||
</code></pre><h2 id=istioctl-proxy-config-status><code>istioctl proxy-config status</code></h2><p>获取最后发送和最后确认的从 Pilot 到网格中每个 Envoy 的 xDS 同步信息。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl proxy-status [<proxy-name>] [参数]
|
||
</code></pre><p>典型用例:</p><pre><code class=language-shell data-expandlinks=true># 获取网格中每个 Envoy 的同步状态。
|
||
istioctl proxy-status
|
||
|
||
# 获取单一 Envoy 的同步信息。
|
||
istioctl proxy-status istio-egressgateway-59585c5b9c-ndc59.istio-system
|
||
</code></pre><h2 id=istioctl-register><code>istioctl register</code></h2><p>把一个服务实例(例如虚拟机)注册到网格之中。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl register <svcname> <ip> [name1:]port1 [name2:]port2 ... [flags]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--annotations <stringSlice></code></td><td><code>-a</code></td><td>一个字符串列表,用于给注册服务或者端点提供注解,例如 <code>-a foo=bar,test,x=y</code> (缺省值 <code>[]</code>)</td></tr><tr><td><code>--serviceaccount <string></code></td><td><code>-s</code></td><td>绑定到该服务的 Service account(缺省值 <code>default</code>)</td></tr></tbody></table><h2 id=istioctl-replace><code>istioctl replace</code></h2><p>替换现存的策略和规则。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl replace [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--file <string></code></td><td><code>-f</code></td><td>用包含配置对象内容的文件作为命令输入(如果没有设置,命令会从标准输入中进行读取,缺省值 <code>''</code>)</td></tr></tbody></table><p>典型用例:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl replace -f example-routing.yaml
|
||
</code></pre><h2 id=istioctl-version><code>istioctl version</code></h2><p>输出版本信息。</p><p>基本用法:</p><pre><code class=language-bash data-expandlinks=true>$ istioctl version [选项]
|
||
</code></pre><p>可用参数列表如下:</p><table><thead><tr><th>选项</th><th>缩写</th><th>描述</th></tr></thead><tbody><tr><td><code>--short</code></td><td><code>-s</code></td><td>显示摘要信息</td></tr></tbody></table></article><nav class=pagenav><div class=left><a title="自动注入 Istio sidecar 的 Kubernetes webhook。" href=/v1.1/zh/docs/reference/commands/sidecar-injector/><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#left-arrow"/></svg>sidecar-injector</a></div><div class=right><a title="Istio 证书颁发(CA)。" href=/v1.1/zh/docs/reference/commands/istio_ca/>istio_ca<svg class="icon"><use xlink:href="/v1.1/img/icons.svg#right-arrow"/></svg></a></div></nav><div id=endnotes-container aria-hidden=true><h2>链接</h2><ol id=endnotes></ol></div></div><div class=toc-container><nav class=toc aria-label="Table of Contents"><div id=toc><ol><li role=none aria-label=简介><a href=#%e7%ae%80%e4%bb%8b>简介</a><li role=none aria-label=全局选项><a href=#%e5%85%a8%e5%b1%80%e9%80%89%e9%a1%b9>全局选项</a><li role=none aria-label="istioctl authn"><a href=#istioctl-authn><code>istioctl authn</code></a><li role=none aria-label="istioctl authn tls-check"><a href=#istioctl-authn-tls-check><code>istioctl authn tls-check</code></a><li role=none aria-label="istioctl context-create"><a href=#istioctl-context-create><code>istioctl context-create</code></a><li role=none aria-label="istioctl create"><a href=#istioctl-create><code>istioctl create</code></a><li role=none aria-label="istioctl delete"><a href=#istioctl-delete><code>istioctl delete</code></a><li role=none aria-label="istioctl deregister"><a href=#istioctl-deregister><code>istioctl deregister</code></a><li role=none aria-label="istioctl experimental"><a href=#istioctl-experimental><code>istioctl experimental</code></a><li role=none aria-label="istioctl experimental convert-ingress"><a href=#istioctl-experimental-convert-ingress><code>istioctl experimental convert-ingress</code></a><li role=none aria-label="istioctl experimental metrics"><a href=#istioctl-experimental-metrics><code>istioctl experimental metrics</code></a><li role=none aria-label="istioctl experimental rbac"><a href=#istioctl-experimental-rbac><code>istioctl experimental rbac</code></a><li role=none aria-label="istioctl experimental rbac can"><a href=#istioctl-experimental-rbac-can><code>istioctl experimental rbac can</code></a><li role=none aria-label="istioctl gen-deploy"><a href=#istioctl-gen-deploy><code>istioctl gen-deploy</code></a><li role=none aria-label="istioctl get"><a href=#istioctl-get><code>istioctl get</code></a><li role=none aria-label="istioctl kube-inject"><a href=#istioctl-kube-inject><code>istioctl kube-inject</code></a><li role=none aria-label="istioctl proxy-config"><a href=#istioctl-proxy-config><code>istioctl proxy-config</code></a><li role=none aria-label="istioctl proxy-config bootstrap"><a href=#istioctl-proxy-config-bootstrap><code>istioctl proxy-config bootstrap</code></a><li role=none aria-label="istioctl proxy-config cluster"><a href=#istioctl-proxy-config-cluster><code>istioctl proxy-config cluster</code></a><li role=none aria-label="istioctl proxy-config endpoint"><a href=#istioctl-proxy-config-endpoint><code>istioctl proxy-config endpoint</code></a><li role=none aria-label="istioctl proxy-config listener"><a href=#istioctl-proxy-config-listener><code>istioctl proxy-config listener</code></a><li role=none aria-label="istioctl proxy-config route"><a href=#istioctl-proxy-config-route><code>istioctl proxy-config route</code></a><li role=none aria-label="istioctl proxy-config status"><a href=#istioctl-proxy-config-status><code>istioctl proxy-config status</code></a><li role=none aria-label="istioctl register"><a href=#istioctl-register><code>istioctl register</code></a><li role=none aria-label="istioctl replace"><a href=#istioctl-replace><code>istioctl replace</code></a><li role=none aria-label="istioctl version"><a href=#istioctl-version><code>istioctl version</code></a></ol></div></nav></div></main><footer><div class=user-links><a class=channel title="Go download Istio 1.1.9 now" href=https://github.com/istio/istio/releases/tag/1.1.9 aria-label="Download Istio"><span>download</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#download"/></svg>
|
||
</a><a class=channel title="加入 Istio discussion board 参与讨论获取帮助" href=https://discuss.istio.io aria-label="Istio discussion board"><span>discuss</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#discourse"/></svg></a>
|
||
<a class=channel title="Stack Overflow 中列举了针对实际问题以及部署、配置和使用 Istio 的各项回答" href=https://stackoverflow.com/questions/tagged/istio aria-label="Stack Overflow"><span>stack overflow</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#stackoverflow"/></svg></a>
|
||
<a class=channel title="关注我们的 Twitter 来获取最新信息" href=https://twitter.com/IstioMesh aria-label=Twitter><span>twitter</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#twitter"/></svg></a><div class=tag>对于用户</div></div><div class=info><p class=copyright>中文内容由 ServiceMesher 社区维护,部分文档可能稍微滞后于英文版本,同步工作持续进行中<br>Istio 归档
|
||
1.1.9<br>© 2019 Istio Authors, <a href=https://policies.google.com/privacy>隐私政策</a><br>归档于 2019年6月18日</p></div><div class=dev-links><a class=channel title="Istio 的代码在 GitHub 上开发" href=https://github.com/istio/community aria-label=GitHub><span>github</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#github"/></svg></a>
|
||
<a class=channel title="在 Slack 上与 Istio 社区交互讨论开发问题(仅限邀请)" href=https://istio.slack.com aria-label=slack><span>slack</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#slack"/></svg></a>
|
||
<a class=channel title="如果您想深入了解 Istio 的技术细节,请查看我们日益完善的设计文档" href=https://groups.google.com/forum/#!forum/istio-team-drive-access aria-label="team drive"><span>drive</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#drive"/></svg></a>
|
||
<a class=channel title="如果您想为 Istio 项目做出贡献,请考虑加入我们的工作组" href=https://github.com/istio/community/blob/master/WORKING-GROUPS.md aria-label="working groups"><span>working groups</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#working-groups"/></svg></a><div class=tag>对于开发者</div></div></footer><div id=scroll-to-top-container aria-hidden=true><button id=scroll-to-top title=回到顶部><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#top"/></svg></button></div></body></html> |