istio.io/archive/v1.17/zh/docs/setup/install/external-controlplane/index.html

443 lines
126 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="使用外部控制平面安装 Istio"><meta name=description content="安装外部控制平面和远程集群。"><meta name=keywords content="microservices,services,mesh,external,control,istiod,remote"><meta property="og:title" content="使用外部控制平面安装 Istio"><meta property="og:type" content="website"><meta property="og:description" content="安装外部控制平面和远程集群。"><meta property="og:url" content="/v1.17/zh/docs/setup/install/external-controlplane/"><meta property="og:image" content="https://raw.githubusercontent.com/istio/istio.io/master/static/img/istio-social.svg"><meta property="og:image:alt" content="Istio Logo"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="600"><meta property="og:site_name" content="Istio"><meta name=twitter:card content="summary"><meta name=twitter:site content="@IstioMesh"><title>Istioldie 1.17 / 使用外部控制平面安装 Istio</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.17/blog/feed.xml><link rel=alternate type=application/rss+xml title="Istio News" href=/v1.17/news/feed.xml><link rel=alternate type=application/rss+xml title="Istio Blog and News" href=/v1.17/feed.xml><link rel="shortcut icon" href=/v1.17/favicons/favicon.ico><link rel=apple-touch-icon href=/v1.17/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/v1.17/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/v1.17/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/v1.17/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/v1.17/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/v1.17/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/v1.17/favicons/android-96x96.png sizes=96xW96><link rel=icon type=image/png href=/v1.17/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/v1.17/favicons/android-192x192.png sizes=192x192><link rel=icon type=image/svg+xml href=/v1.17/favicons/favicon.svg><link rel=icon type=image/png href=/v1.17/favicons/favicon.png><link rel=mask-icon href=/v1.17/favicons/safari-pinned-tab.svg color=#466bb0><link rel=manifest href=/v1.17/manifest.json><meta name=apple-mobile-web-app-title content="Istio"><meta name=application-name content="Istio"><meta name=msapplication-config content="/browserconfig.xml"><meta name=msapplication-TileColor content="#466BB0"><meta name=theme-color content="#466BB0"><link rel=stylesheet href=/v1.17/css/all.css><link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&display=swap"><script src=/v1.17/js/themes_init.min.js></script></head><body class="language-unknown archive-site"><script>const branchName="release-1.17",docTitle="使用外部控制平面安装 Istio",iconFile="/v1.17/img/icons.svg",buttonCopy="复制到剪切板",buttonPrint="打印",buttonDownload="下载"</script><script src="https://www.google.com/cse/brand?form=search-form" defer></script>
<script src=/v1.17/js/all.min.js data-manual defer></script><header class=main-navigation><nav class="main-navigation-wrapper container-l"><div class=main-navigation-header><a id=brand href=/v1.17/zh/ aria-label=logotype><span class=logo><svg xmlns="http://www.w3.org/2000/svg" width="128" height="60" viewBox="0 0 128 60"><path d="M58.434 48.823A.441.441.0 0158.3 48.497V22.583a.444.444.0 01.134-.326.446.446.0 01.327-.134h3.527a.447.447.0 01.325.134.447.447.0 01.134.326v25.914a.443.443.0 01-.134.326.444.444.0 01-.325.134h-3.527a.444.444.0 01-.327-.134z"/><path d="m70.969 48.477a6.556 6.556.0 01-2.818-1.955 4.338 4.338.0 01-1-2.78v-.345a.443.443.0 01.134-.326.444.444.0 01.326-.135h3.374a.444.444.0 01.326.135.445.445.0 01.134.326v.077a2.014 2.014.0 001.054 1.667 4.672 4.672.0 002.664.709 4.446 4.446.0 002.492-.633 1.862 1.862.0 00.958-1.591 1.426 1.426.0 00-.786-1.322 12.7 12.7.0 00-2.549-.939l-1.457-.46a21.526 21.526.0 01-3.3-1.227 6.57 6.57.0 01-2.262-1.783 4.435 4.435.0 01-.92-2.894 5.081 5.081.0 012.109-4.275 8.993 8.993.0 015.558-1.591 10.445 10.445.0 014.1.748 6.3 6.3.0 012.722 2.07 5 5 0 01.958 3.009.441.441.0 01-.134.326.441.441.0 01-.325.134h-3.258a.441.441.0 01-.326-.134.443.443.0 01-.134-.326 1.974 1.974.0 00-.978-1.667 4.647 4.647.0 00-2.665-.671 4.741 4.741.0 00-2.435.556 1.724 1.724.0 00-.938 1.553 1.512 1.512.0 00.9 1.4 15.875 15.875.0 003.01 1.055l.843.229a27.368 27.368.0 013.412 1.246 6.67 6.67.0 012.338 1.763 4.387 4.387.0 01.958 2.933 4.988 4.988.0 01-2.146 4.275 9.543 9.543.0 01-5.712 1.552 11.626 11.626.0 01-4.227-.709z"/><path d="m97.039 32.837a.443.443.0 01-.326.135h-3.911a.169.169.0 00-.191.192v9.239a2.951 2.951.0 00.632 2.108 2.7 2.7.0 002.013.652h1.15a.444.444.0 01.325.134.441.441.0 01.134.326v2.875a.471.471.0 01-.459.5l-1.994.039a8 8 0 01-4.524-1.035q-1.495-1.035-1.533-3.91V33.166A.17.17.0 0088.164 32.974H85.978A.441.441.0 0185.652 32.839.441.441.0 0185.518 32.513V29.83a.441.441.0 01.134-.326.444.444.0 01.326-.135h2.186a.169.169.0 00.191-.192v-4.485a.438.438.0 01.134-.326.44.44.0 01.325-.134h3.336a.443.443.0 01.325.134.442.442.0 01.135.326v4.485a.169.169.0 00.191.192h3.911a.446.446.0 01.326.135.446.446.0 01.134.326v2.683a.446.446.0 01-.133.324z"/><path d="m101.694 25.917a2.645 2.645.0 01-.767-1.955 2.65 2.65.0 01.767-1.955 2.65 2.65.0 011.955-.767 2.65 2.65.0 011.955.767 2.652 2.652.0 01.767 1.955 2.647 2.647.0 01-.767 1.955 2.646 2.646.0 01-1.955.767 2.645 2.645.0 01-1.955-.767zm-.211 22.906a.441.441.0 01-.134-.326V29.79a.444.444.0 01.134-.326.446.446.0 01.326-.134h3.527a.446.446.0 01.326.134.445.445.0 01.134.326v18.707a.443.443.0 01-.134.326.443.443.0 01-.326.134h-3.527a.443.443.0 01-.326-.134z"/><path d="m114.019 47.734a8.1 8.1.0 01-3.047-4.255 14.439 14.439.0 01-.652-4.37 14.3 14.3.0 01.614-4.371A7.869 7.869.0 01114 30.56a9.072 9.072.0 015.252-1.5 8.543 8.543.0 015.041 1.5 7.985 7.985.0 013.009 4.14 12.439 12.439.0 01.69 4.37 13.793 13.793.0 01-.651 4.37 8.255 8.255.0 01-3.028 4.275 8.475 8.475.0 01-5.1 1.553 8.754 8.754.0 01-5.194-1.534zm7.629-3.1a4.536 4.536.0 001.476-2.262 11.335 11.335.0 00.383-3.221 10.618 10.618.0 00-.383-3.22 4.169 4.169.0 00-1.457-2.243 4.066 4.066.0 00-2.531-.785 3.942 3.942.0 00-2.453.785 4.376 4.376.0 00-1.5 2.243 11.839 11.839.0 00-.383 3.22 11.84 11.84.0 00.383 3.221 4.222 4.222.0 001.476 2.262 4.075 4.075.0 002.549.8 3.8 3.8.0 002.44-.809z"/><path d="m15.105 32.057v15.565a.059.059.0 01-.049.059L.069 50.25A.06.06.0 01.005 50.167l14.987-33.47a.06.06.0 01.114.025z"/><path d="m17.631 23.087v24.6a.06.06.0 00.053.059l22.449 2.507a.06.06.0 00.061-.084L17.745.032a.06.06.0 00-.114.024z"/><path d="m39.961 52.548-24.833 7.45a.062.062.0 01-.043.0L.079 52.548a.059.059.0 01.026-.113h39.839a.06.06.0 01.017.113z"/></svg></span></a><button id=hamburger class=main-navigation-toggle aria-label="Open navigation"><svg class="icon menu-hamburger"><use xlink:href="/v1.17/img/icons.svg#menu-hamburger"/></svg></button>
<button id=menu-close class=main-navigation-toggle aria-label="Close navigation"><svg class="icon menu-close"><use xlink:href="/v1.17/img/icons.svg#menu-close"/></svg></button></div><div id=header-links class=main-navigation-links-wrapper><ul class=main-navigation-links><li class=main-navigation-links-item><a class="main-navigation-links-link has-dropdown"><span>关于</span><svg class="icon dropdown-arrow"><use xlink:href="/v1.17/img/icons.svg#dropdown-arrow"/></svg></a><ul class=main-navigation-links-dropdown><li class=main-navigation-links-dropdown-item><a href=/v1.17/zh/about/service-mesh class=main-navigation-links-link>服务网格</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.17/zh/about/solutions class=main-navigation-links-link>解决方案</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.17/zh/about/case-studies class=main-navigation-links-link>案例学习</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.17/zh/about/ecosystem class=main-navigation-links-link>生态系统</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.17/zh/about/deployment class=main-navigation-links-link>部署</a></li><li class=main-navigation-links-dropdown-item><a href=/v1.17/zh/about/faq class=main-navigation-links-link>FAQ</a></li></ul></li><li class=main-navigation-links-item><a href=/v1.17/zh/blog/ class=main-navigation-links-link><span>博客</span></a></li><li class=main-navigation-links-item><a href=/v1.17/zh/news/ class=main-navigation-links-link><span>新闻</span></a></li><li class=main-navigation-links-item><a href=/v1.17/zh/get-involved/ class=main-navigation-links-link><span>加入我们</span></a></li><li class=main-navigation-links-item><a href=/v1.17/zh/docs/ class=main-navigation-links-link><span>文档</span></a></li></ul><div class=main-navigation-footer><button id=search-show class=search-show title='搜索 istio.io' aria-label=搜索><svg class="icon magnifier"><use xlink:href="/v1.17/img/icons.svg#magnifier"/></svg></button>
<a href=/v1.17/zh/docs/setup/getting-started class="btn btn--primary" id=try-istio>试用 Istio</a></div></div><form id=search-form class=search name=cse role=search><input type=hidden name=cx value=002184991200833970123:iwwf17ikgf4>
<input type=hidden name=ie value=utf-8>
<input type=hidden name=hl value=zh>
<input type=hidden id=search-page-url value=/zh/search>
<input id=search-textbox class="search-textbox form-control" name=q type=search aria-label='搜索 istio.io' placeholder=搜索>
<button id=search-close title=取消搜索 type=reset aria-label=取消搜索><svg class="icon menu-close"><use xlink:href="/v1.17/img/icons.svg#menu-close"/></svg></button></form></nav></header><div class=banner-container></div><main class="primary container has-sidebar has-toc docs"><div id=sidebar-container class=sidebar-container><nav id=sidebar aria-label="Section Navigation"><button id=sidebar-close class="main-navigation-toggle sidebar-close" aria-label="Close sidebar"><svg class="icon menu-close"><use xlink:href="/v1.17/img/icons.svg#menu-close"/></svg></button><div class=sidebar-nav><div class=search><form id=search-docs-form name=cse role=search><input type=hidden name=ie value=utf-8>
<input type=hidden name=hl value=en>
<input type=hidden id=search-docs-url value=/v1.17/search>
<input id=search-docs-textbox class=form-control name=docs-search type=search aria-label='搜索 istio.io' placeholder=搜索>
<button id=search-show2 class=search-show title='搜索 istio.io' aria-label=搜索><svg class="icon magnifier"><use xlink:href="/v1.17/img/icons.svg#magnifier"/></svg></button></form></div><div class=card><div class="body default" aria-labelledby=header0><ul role=tree aria-expanded=true aria-labelledby=header0><li role=treeitem aria-label=概念><a class=main title="一些概念,理解它们有助于您更好地了解 Istio 系统的不同部分及其使用的抽象。" href=/v1.17/zh/docs/concepts/>概念</a><ul role=group aria-expanded=true class=leaf-section><li role=none><a role=treeitem title="描述 Istio 多样的流量路由和控制特性。" href=/v1.17/zh/docs/concepts/traffic-management/>流量管理</a></li><li role=none><a role=treeitem title="讲述 Istio 的 WebAssembly 插件系统。" href=/v1.17/zh/docs/concepts/wasm/>扩展性</a></li><li role=none><a role=treeitem title="描述 Istio 的授权与认证功能。" href=/v1.17/zh/docs/concepts/security/>安全</a></li><li role=none><a role=treeitem title="描述 Istio 提供的遥测和监控特性。" href=/v1.17/zh/docs/concepts/observability/>可观测性</a></li></ul></li><li role=treeitem aria-label=安装><a class=main title="关于如何在 Kubernetes 集群中安装 Istio 控制平面和添加虚拟机到 mesh 中的说明。" href=/v1.17/zh/docs/setup/>安装</a><ul role=group aria-expanded=true><li role=none><a role=treeitem title="快速、轻松地尝试 Istio 特性。" href=/v1.17/zh/docs/setup/getting-started/>入门</a></li><li role=treeitem aria-label=平台安装><button aria-hidden=true tabindex=-1></button><a title="在安装 Istio 之前如何准备各种 Kubernetes 平台。" href=/v1.17/zh/docs/setup/platform-setup/>平台安装</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="在各平台上安装 Istio 的前提条件。" href=/v1.17/zh/docs/setup/platform-setup/prerequisites/>平台前提条件</a></li><li role=none><a role=treeitem title="在阿里云 Kubernetes 集群进行配置以便安装运行 Istio。" href=/v1.17/zh/docs/setup/platform-setup/alicloud/>阿里云</a></li><li role=none><a role=treeitem title="为 Istio 设置一个 Azure 集群的操作说明。" href=/v1.17/zh/docs/setup/platform-setup/azure/>Azure</a></li><li role=none><a role=treeitem title="在 Docker Desktop 中运行 Istio 的设置说明。" href=/v1.17/zh/docs/setup/platform-setup/docker/>Docker Desktop</a></li><li role=none><a role=treeitem title="为 Istio 设置 kind 的说明。" href=/v1.17/zh/docs/setup/platform-setup/kind/>kind</a></li><li role=none><a role=treeitem title="在 Google Kubernetes Engine (GKE) 上快速搭建 Istio 服务。" href=/v1.17/zh/docs/setup/platform-setup/gke/>使用 Google Kubernetes Engine 快速开始</a></li><li role=none><a role=treeitem title="为 Istio 设置一个华为云 Kubernetes 集群的操作说明。" href=/v1.17/zh/docs/setup/platform-setup/huaweicloud/>华为云</a></li><li role=none><a role=treeitem title="在 IBM 公有云或私有云上快速搭建 Istio 服务。" href=/v1.17/zh/docs/setup/platform-setup/ibm/>IBM Cloud 快速开始</a></li><li role=none><a role=treeitem title="与Istio 一起使用的 Kops 设置说明。" href=/v1.17/zh/docs/setup/platform-setup/kops/>Kops</a></li><li role=none><a role=treeitem title="使用 Gardener 快速搭建 Istio 服务。" href=/v1.17/zh/docs/setup/platform-setup/gardener/>Kubernetes Gardener 快速开始</a></li><li role=none><a role=treeitem title="Istio 适配 KubeSphere 容器平台指南。" href=/v1.17/zh/docs/setup/platform-setup/kubesphere/>KubeSphere Container Platform</a></li><li role=none><a role=treeitem title="配置 MicroK8s 以便使用 Istio。" href=/v1.17/zh/docs/setup/platform-setup/microk8s/>MicroK8s</a></li><li role=none><a role=treeitem title="在 minikube 上配置 Istio。" href=/v1.17/zh/docs/setup/platform-setup/minikube/>minikube</a></li><li role=none><a role=treeitem title="在 OpenShift 集群上快速搭建 Istio 服务。" href=/v1.17/zh/docs/setup/platform-setup/openshift/>OpenShift</a></li><li role=none><a role=treeitem title="使用 Oracle Container 为 Istio 准备集群的说明。" href=/v1.17/zh/docs/setup/platform-setup/oci/>Oracle Cloud 基础架构</a></li><li role=none><a role=treeitem title="在腾讯云上快速创建 Istio 服务。" href=/v1.17/zh/docs/setup/platform-setup/tencent-cloud-mesh/>腾讯云</a></li></ul></li><li role=treeitem aria-label=安装><button class=show aria-hidden=true tabindex=-1></button><a title=选择最适合你需求和平台的安装指南。 href=/v1.17/zh/docs/setup/install/>安装</a><ul role=group aria-expanded=true><li role=none><a role=treeitem title="安装、定制 Istio 配置文件,用于深入评估及生产发布。" href=/v1.17/zh/docs/setup/install/istioctl/>使用 Istioctl 安装</a></li><li role=none><a role=treeitem title="安装、配置并深入评估 Istio。" href=/v1.17/zh/docs/setup/install/helm/>使用 Helm 安装</a></li><li role=treeitem aria-label=多集群安装><button aria-hidden=true tabindex=-1></button><a title="跨多 Kubernetes 集群,安装 Istio 服务网格。" href=/v1.17/zh/docs/setup/install/multicluster/>多集群安装</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="在多个集群上安装 Istio 之前的初始步骤。" href=/v1.17/zh/docs/setup/install/multicluster/before-you-begin/>准备工作</a></li><li role=none><a role=treeitem title="跨多个主集群,安装 Istio 网格。" href=/v1.17/zh/docs/setup/install/multicluster/multi-primary/>多主架构的安装</a></li><li role=none><a role=treeitem title="跨主-从集群,安装 Istio 网格。" href=/v1.17/zh/docs/setup/install/multicluster/primary-remote/>主-从架构的安装</a></li><li role=none><a role=treeitem title="跨网络、多主架构的 Istio 网格安装。" href=/v1.17/zh/docs/setup/install/multicluster/multi-primary_multi-network/>跨网络多主架构的安装</a></li><li role=none><a role=treeitem title="跨网络、主-从架构的 Istio 网格安装。" href=/v1.17/zh/docs/setup/install/multicluster/primary-remote_multi-network/>跨网络主-从架构的安装</a></li><li role=none><a role=treeitem title="验证 Istio 已成功安装到多集群环境中。" href=/v1.17/zh/docs/setup/install/multicluster/verify/>验证安装结果</a></li></ul></li><li role=none><a role=treeitem title="部署 Istio接入虚拟机中运行的工作负载。" href=/v1.17/zh/docs/setup/install/virtual-machine/>虚拟机安装</a></li><li role=none><a role=treeitem title="使用修订和 discoverySelectors 在单集群中安装多个 Istio 控制面。" href=/v1.17/zh/docs/setup/install/multiple-controlplanes/>在单集群中安装多个 Istio 控制面</a></li><li role=none><a role=treeitem title=安装外部控制平面和远程集群。 href=/v1.17/zh/docs/setup/install/external-controlplane/>使用外部控制平面安装 Istio</a></li><li role=none><a role=treeitem title="使用 Istio Operator 在 Kubernetes 集群中安装 Istio 的说明。 (Beta)" href=/v1.17/zh/docs/setup/install/operator/>使用 Istio Operator 安装 *</a></li></ul></li><li role=treeitem aria-label=升级><button aria-hidden=true tabindex=-1></button><a title="跨多个控制平面升级、降级和管理 Istio。" href=/v1.17/zh/docs/setup/upgrade/>升级</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="通过先运行一个金丝雀部署的新控制平面升级 Istio。" href=/v1.17/zh/docs/setup/upgrade/canary/>金丝雀升级</a></li><li role=none><a role=treeitem title=原地升级和回退。 href=/v1.17/zh/docs/setup/upgrade/in-place/>原地升级</a></li><li role=none><a role=treeitem title="深度评估升级和配置 Istio。" href=/v1.17/zh/docs/setup/upgrade/helm/>Upgrade with Helm</a></li></ul></li><li role=treeitem aria-label=更多指南><button aria-hidden=true tabindex=-1></button><a title=有关其他设置任务的更多信息。 href=/v1.17/zh/docs/setup/additional-setup/>更多指南</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="描述 Istio 内置的安装配置文件。" href=/v1.17/zh/docs/setup/additional-setup/config-profiles/>安装配置文件</a></li><li role=none><a role=treeitem title="在应用程序 Pod 中使用 Sidecar Injector Webhook 自动安装或使用 Istioctl CLI 手动安装 Istio Sidecar。" href=/v1.17/zh/docs/setup/additional-setup/sidecar-injection/>安装 Sidecar</a></li><li role=none><a role=treeitem title=描述如何定制安装配置选项。 href=/v1.17/zh/docs/setup/additional-setup/customize-installation/>定制安装配置</a></li><li role=none><a role=treeitem title="描述使用 helm 安装时如何自定义安装配置选项。" href=/v1.17/zh/docs/setup/additional-setup/customize-installation-helm/>高级 Helm chart 自定义</a></li><li role=none><a role=treeitem title="安装并使用 Istio CNI 插件,可以让运维人员用更低的权限来部署服务。" href=/v1.17/zh/docs/setup/additional-setup/cni/>安装 Istio CNI 插件</a></li></ul></li></ul></li><li role=treeitem aria-label=任务><a class=main title="如何用 Istio 实现单个特定的目标行为。" href=/v1.17/zh/docs/tasks/>任务</a><ul role=group aria-expanded=true><li role=treeitem aria-label=流量管理><button aria-hidden=true tabindex=-1></button><a title="演示 Istio 的流量路由功能的任务。" href=/v1.17/zh/docs/tasks/traffic-management/>流量管理</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title=如何将请求动态路由到微服务的多个版本。 href=/v1.17/zh/docs/tasks/traffic-management/request-routing/>配置请求路由</a></li><li role=none><a role=treeitem title=此任务说明如何注入故障并测试应用程序的弹性。 href=/v1.17/zh/docs/tasks/traffic-management/fault-injection/>故障注入</a></li><li role=none><a role=treeitem title=展示如何将流量从旧版本迁移到新版本的服务。 href=/v1.17/zh/docs/tasks/traffic-management/traffic-shifting/>流量转移</a></li><li role=none><a role=treeitem title="展示如何将一个服务的 TCP 流量从旧版本迁移到新版本。" href=/v1.17/zh/docs/tasks/traffic-management/tcp-traffic-shifting/>TCP 流量转移</a></li><li role=none><a role=treeitem title="本任务用于示范如何使用 Istio 在 Envoy 中设置请求超时。" href=/v1.17/zh/docs/tasks/traffic-management/request-timeouts/>设置请求超时</a></li><li role=none><a role=treeitem title=本任务展示如何为连接、请求以及异常检测配置熔断。 href=/v1.17/zh/docs/tasks/traffic-management/circuit-breaking/>熔断</a></li><li role=none><a role=treeitem title="此任务演示了 Istio 的流量镜像/影子功能。" href=/v1.17/zh/docs/tasks/traffic-management/mirroring/>镜像</a></li><li role=treeitem aria-label=地域负载均衡><button aria-hidden=true tabindex=-1></button><a title="本系列任务演示如何在 Istio 中配置地域负载均衡。" href=/v1.17/zh/docs/tasks/traffic-management/locality-load-balancing/>地域负载均衡</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title=配置地域负载均衡前的初始化步骤。 href=/v1.17/zh/docs/tasks/traffic-management/locality-load-balancing/before-you-begin/>开始之前</a></li><li role=none><a role=treeitem title=本任务演示如何为网格配置地域故障转移。 href=/v1.17/zh/docs/tasks/traffic-management/locality-load-balancing/failover/>地域故障转移</a></li><li role=none><a role=treeitem title=本指南演示如何配置地域权重分配。 href=/v1.17/zh/docs/tasks/traffic-management/locality-load-balancing/distribute/>地域权重分布</a></li><li role=none><a role=treeitem title=地域负载均衡的清理步骤。 href=/v1.17/zh/docs/tasks/traffic-management/locality-load-balancing/cleanup/>清理</a></li></ul></li><li role=treeitem aria-label=Ingress><button aria-hidden=true tabindex=-1></button><a title="控制 Istio 服务网格的入口流量。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/>Ingress</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="描述如何配置 Istio Gateway 对象,以将服务暴露至服务网格之外。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/ingress-control/>入口网关</a></li><li role=none><a role=treeitem title="通过 TLS 或 mTLS 将服务暴露到服务网格外。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/secure-ingress/>安全网关</a></li><li role=none><a role=treeitem title="描述了如何在不使用 Ingress Gateway 的情况下,在一个 Sidecar 上终止 TLS 流量。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/ingress-sidecar-tls-termination/>Ingress Sidecar TLS 终止</a></li><li role=none><a role=treeitem title="如何为一个 Ingress Gateway 配置 SNI 透传。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/ingress-sni-passthrough/>无 TLS 终止的 Ingress Gateway</a></li><li role=none><a role=treeitem title="展示如何配置 Kubernetes Ingress 对象,使得从服务网格外部可以访问网格内服务。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/kubernetes-ingress/>Kubernetes Ingress</a></li><li role=none><a role=treeitem title="描述在 Istio 中如何配置 Kubernetes Gateway API。" href=/v1.17/zh/docs/tasks/traffic-management/ingress/gateway-api/>Kubernetes Gateway API</a></li></ul></li><li role=treeitem aria-label=Egress><button aria-hidden=true tabindex=-1></button><a title="控制 Istio 服务网格的出口流量。" href=/v1.17/zh/docs/tasks/traffic-management/egress/>Egress</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="描述如何配置 Istio 以将流量从网格中的服务路由到外部服务。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress-control/>访问外部服务</a></li><li role=none><a role=treeitem title="描述如何配置 Istio 对来自外部服务的流量执行 TLS 发起。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress-tls-origination/>Egress TLS Origination</a></li><li role=none><a role=treeitem title="描述如何配置 Istio 通过专用网关服务将流量定向到外部服务。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress-gateway/>出口网关</a></li><li role=none><a role=treeitem title="描述了如何配置 Egress 网关,使用 Secret Discovery Service 执行 TLS 链接外部服务。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress-gateway-tls-origination-sds/>Egress 网关 TLS 连接 发起的过程 (SDS)</a></li><li role=none><a role=treeitem title="描述如何配置一个 Egress 网关,来向外部服务发起 TLS 连接。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress-gateway-tls-origination/>Egress 网关的 TLS 发起过程</a></li><li role=none><a role=treeitem title="描述如何开启通用域中一组主机的 egress无需单独配置每一台主机。" href=/v1.17/zh/docs/tasks/traffic-management/egress/wildcard-egress-hosts/>Wildcard 主机的 egress</a></li><li role=none><a role=treeitem title="描述如何在 TLS Egress 上配置 SNI 监控和策略。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress_sni_monitoring_and_policies/>TLS Egress 监控和策略配置</a></li><li role=none><a role=treeitem title="展示如何配置 Istio Kubernetes 外部服务。" href=/v1.17/zh/docs/tasks/traffic-management/egress/egress-kubernetes-services/>Kubernetes Egress 流量服务</a></li><li role=none><a role=treeitem title="描述如何配置 Istio 以允许应用程序使用外部 HTTPS 代理。" href=/v1.17/zh/docs/tasks/traffic-management/egress/http-proxy/>使用外部 HTTPS 代理</a></li></ul></li></ul></li><li role=treeitem aria-label=安全><button aria-hidden=true tabindex=-1></button><a title=演示如何保护网格。 href=/v1.17/zh/docs/tasks/security/>安全</a><ul role=group aria-expanded=false><li role=treeitem aria-label=认证><button aria-hidden=true tabindex=-1></button><a title="管控网格服务间的双向 TLS 和终端用户的身份认证。" href=/v1.17/zh/docs/tasks/security/authentication/>认证</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="演示如何使用基于 JWT 声明路由请求的 Istio 身份验证策略。 (Experimental)" href=/v1.17/zh/docs/tasks/security/authentication/jwt-route/>基于 JWT 声明的路由 *</a></li><li role=none><a role=treeitem title="向您展示如何通过使用 Istio 认证策略来设置双向 TLS 和基本的终端用户认证。" href=/v1.17/zh/docs/tasks/security/authentication/authn-policy/>认证策略</a></li><li role=none><a role=treeitem title="阐述如何将 Istio 服务逐步迁移至双向 TLS 通信模式。" href=/v1.17/zh/docs/tasks/security/authentication/mtls-migration/>双向 TLS 迁移</a></li></ul></li><li role=treeitem aria-label=证书管理><button aria-hidden=true tabindex=-1></button><a title="管理 Istio 的证书。" href=/v1.17/zh/docs/tasks/security/cert-management/>证书管理</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="系统管理员如何通过根证书、签名证书和密钥来配置 Istio 的 CA。" href=/v1.17/zh/docs/tasks/security/cert-management/plugin-ca-cert/>插入 CA 证书</a></li><li role=none><a role=treeitem title="如何在 Istiod 中配置和管理 DNS 证书。" href=/v1.17/zh/docs/tasks/security/cert-management/dns-cert/>Istio 的 DNS 证书管理</a></li><li role=none><a role=treeitem title="演示如何使用自定义证书颁发机构(与 Kubernetes CSR API 集成)来提供 Istio 工作负载证书。 (Experimental)" href=/v1.17/zh/docs/tasks/security/cert-management/custom-ca-k8s/>使用 Kubernetes CSR 自定义 CA 集成 *</a></li></ul></li><li role=treeitem aria-label=授权><button aria-hidden=true tabindex=-1></button><a title="展示如何控制到 Istio 服务的访问。" href=/v1.17/zh/docs/tasks/security/authorization/>授权</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="展示如何设置 HTTP 流量访问控制。" href=/v1.17/zh/docs/tasks/security/authorization/authz-http/>HTTP 流量</a></li><li role=none><a role=treeitem title="展示如何设置 TCP 流量的访问控制。" href=/v1.17/zh/docs/tasks/security/authorization/authz-tcp/>TCP 流量</a></li><li role=none><a role=treeitem title="演示如何为 JWT 令牌设置访问控制。" href=/v1.17/zh/docs/tasks/security/authorization/authz-jwt/>JWT 令牌</a></li><li role=none><a role=treeitem title=如何集成访问控制并将其委托给外部授权系统。 href=/v1.17/zh/docs/tasks/security/authorization/authz-custom/>外部授权</a></li><li role=none><a role=treeitem title=如何设置访问控制以明确地拒绝流量。 href=/v1.17/zh/docs/tasks/security/authorization/authz-deny/>明确拒绝</a></li><li role=none><a role=treeitem title=展示如何在入口网关上设置访问控制。 href=/v1.17/zh/docs/tasks/security/authorization/authz-ingress/>入口网关</a></li><li role=none><a role=treeitem title=阐述如何在不更改授权策略的前提下从一个信任域迁移到另一个。 href=/v1.17/zh/docs/tasks/security/authorization/authz-td-migration/>信任域迁移</a></li></ul></li><li role=treeitem aria-label="TLS 配置"><button aria-hidden=true tabindex=-1></button><a title="在 Istio 中配置 TLS。" href=/v1.17/zh/docs/tasks/security/tls-configuration/>TLS 配置</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="演示如何为 Istio 工作负载配置最低版本的 TLS。" href=/v1.17/zh/docs/tasks/security/tls-configuration/workload-min-tls-version/>Istio 工作负载的最低 TLS 版本配置</a></li></ul></li></ul></li><li role=treeitem aria-label=策略执行><button aria-hidden=true tabindex=-1></button><a title=演示策略执行特性。 href=/v1.17/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.17/zh/docs/tasks/policy-enforcement/rate-limit/>使用 Envoy 启用速率限制</a></li></ul></li><li role=treeitem aria-label=可观察性><button aria-hidden=true tabindex=-1></button><a title=演示如何从网格收集遥测信息。 href=/v1.17/zh/docs/tasks/observability/>可观察性</a><ul role=group aria-expanded=false><li role=treeitem aria-label=指标><button aria-hidden=true tabindex=-1></button><a title="演示 Istio 中指标的收集和查询。" href=/v1.17/zh/docs/tasks/observability/metrics/>指标</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="本任务展示了如何配置 Istio 进行 TCP 服务的指标收集。" href=/v1.17/zh/docs/tasks/observability/metrics/tcp-metrics/>收集 TCP 服务指标</a></li><li role=none><a role=treeitem title="此任务向您展示如何自定义 Istio 指标。" href=/v1.17/zh/docs/tasks/observability/metrics/customize-metrics/>自定义 Istio 指标</a></li><li role=none><a role=treeitem title=此任务向您展示如何通过按类型对请求和响应进行分组来改进遥测。 href=/v1.17/zh/docs/tasks/observability/metrics/classify-metrics/>根据请求或响应对指标进行分类</a></li><li role=none><a role=treeitem title="本任务介绍如何通过 Prometheus 查询 Istio 度量指标。" href=/v1.17/zh/docs/tasks/observability/metrics/querying-metrics/>通过 Prometheus 查询度量指标</a></li><li role=none><a role=treeitem title="此任务展示了如何设置和使用 Istio Dashboard 监控网格流量。" href=/v1.17/zh/docs/tasks/observability/metrics/using-istio-dashboard/>使用 Grafana 可视化指标</a></li></ul></li><li role=treeitem aria-label=日志><button aria-hidden=true tabindex=-1></button><a title="演示 Istio 网格日志的配置、收集和处理。" href=/v1.17/zh/docs/tasks/observability/logs/>日志</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="此任务向您展示如何配置 Envoy 代理将访问日志打印到其标准输出。" href=/v1.17/zh/docs/tasks/observability/logs/access-log/>获取 Envoy 访问日志</a></li></ul></li><li role=treeitem aria-label=分布式追踪><button aria-hidden=true tabindex=-1></button><a title="该任务展示了如何为启用了 Istio 支持的应用进行追踪。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/>分布式追踪</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Istio 分布式追踪的概述。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/overview/>概述</a></li><li role=none><a role=treeitem title="学习如何配置代理将跟踪请求发送到 Apache SkyWalking。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/skywalking/>Apache SkyWalking</a></li><li role=none><a role=treeitem title="了解如何配置代理以向 Jaeger 发送追踪请求。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/jaeger/>Jaeger</a></li><li role=none><a role=treeitem title="学习如何配置代理将 OpenCensus 格式化的 span 发送到 OpenTelemetry Collector。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/opencensusagent/>OpenCensus Agent</a></li><li role=none><a role=treeitem title="了解如何通过配置代理以向 Zipkin 发送追踪请求。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/zipkin/>Zipkin</a></li><li role=none><a role=treeitem title="怎样配置代理才能把追踪请求发送到 Lightstep。" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/lightstep/>Lightstep</a></li><li role=none><a role=treeitem title="如何使用 MeshConfig 和 Pod 注释配置跟踪选项。 (Beta/Experimental)" href=/v1.17/zh/docs/tasks/observability/distributed-tracing/mesh-and-proxy-config/>使用 MeshConfig 和 Pod 注释配置跟踪 *</a></li></ul></li><li role=none><a role=treeitem title="此任务向您展示如何在 Istio 网格中可视化服务。" href=/v1.17/zh/docs/tasks/observability/kiali/>网格可视化</a></li><li role=none><a role=treeitem title="此任务向您展示如何配置从外部访问 Istio 遥测插件。" href=/v1.17/zh/docs/tasks/observability/gateways/>远程访问遥测插件</a></li></ul></li><li role=treeitem aria-label=可扩展性><button aria-hidden=true tabindex=-1></button><a title=演示如何扩展网格行为。 href=/v1.17/zh/docs/tasks/extensibility/>可扩展性</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="描述如何在网格中使用远程 WebAssembly 模块。 (Alpha)" href=/v1.17/zh/docs/tasks/extensibility/wasm-module-distribution/>WebAssembly 模块分发 *</a></li></ul></li></ul></li><li role=treeitem aria-label=示例><a class=main title="这里包括多个可供 Istio 使用的可完整工作的示例,你可以用来亲自部署和体验这些示例。" href=/v1.17/zh/docs/examples/>示例</a><ul role=group aria-expanded=true><li role=none><a role=treeitem title="部署一个用于演示多种 Istio 特性的应用,由四个单独的微服务构成。" href=/v1.17/zh/docs/examples/bookinfo/>Bookinfo 应用</a></li><li role=none><a role=treeitem title="使用在网格内的虚拟机上运行的 MySQL 服务运行 Bookinfo 应用程序。" href=/v1.17/zh/docs/examples/virtual-machines/>在虚拟机上部署 Bookinfo 应用程序</a></li><li role=treeitem aria-label="使用 Kubernetes 和 Istio 学习微服务"><button aria-hidden=true tabindex=-1></button><a title="该模块化教程为新用户提供了一步步将 Istio 应用于常见微服务场景的动手经验。" href=/v1.17/zh/docs/examples/microservices-istio/>使用 Kubernetes 和 Istio 学习微服务</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/prereq/>前提条件</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/setup-kubernetes-cluster/>设置 Kubernetes 集群</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/setup-local-computer/>设置本地计算机</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/single/>本地运行微服务</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/package-service/>在 Docker 中运行 ratings 服务</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/bookinfo-kubernetes/>使用 Kubernetes 运行 Bookinfo</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/production-testing/>生产测试</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/add-new-microservice-version/>添加一个新版本的 reviews</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/add-istio/>在 productpage 启用 Istio</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/enable-istio-all-microservices/>在所有微服务中启用 Istio</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/istio-ingress-gateway/>配置 Istio Ingress Gateway</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/examples/microservices-istio/logs-istio/>监控 Istio</a></li></ul></li></ul></li><li role=treeitem aria-label=运维><a class=main title="关于部署和管理 Istio 网格的概念、工具和技术。" href=/v1.17/zh/docs/ops/>运维</a><ul role=group aria-expanded=true><li role=treeitem aria-label=部署><button aria-hidden=true tabindex=-1></button><a title="设置 Istio 部署的要求、概念和注意事项。" href=/v1.17/zh/docs/ops/deployment/>部署</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="描述 Istio 的整体架构与设计目标。" href=/v1.17/zh/docs/ops/deployment/architecture/>架构</a></li><li role=none><a role=treeitem title="描述 Istio 部署中的选择和建议。" href=/v1.17/zh/docs/ops/deployment/deployment-models/>部署模型</a></li><li role=none><a role=treeitem title="阐述 Istio 针对虚拟机的高级架构。" href=/v1.17/zh/docs/ops/deployment/vm-architecture/>虚拟机架构</a></li><li role=none><a role=treeitem title="介绍 Istio 的性能和可扩展性。" href=/v1.17/zh/docs/ops/deployment/performance-and-scalability/>性能和可扩展性</a></li><li role=none><a role=treeitem title="部署在支持 Istio 的集群中的应用程序的要求。" href=/v1.17/zh/docs/ops/deployment/requirements/>应用程序要求</a></li></ul></li><li role=treeitem aria-label=配置><button aria-hidden=true tabindex=-1></button><a title="配置运行中的 Istio 网格的高级概念和功能。" href=/v1.17/zh/docs/ops/configuration/>配置</a><ul role=group aria-expanded=false><li role=treeitem aria-label=网格配置><button aria-hidden=true tabindex=-1></button><a title=帮助您管理全局网格配置。 href=/v1.17/zh/docs/ops/configuration/mesh/>网格配置</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="简要描述 Istio 对 Kubernetes webhook 的使用以及可能出现的相关问题。" href=/v1.17/zh/docs/ops/configuration/mesh/webhook/>动态准入 Webhook 概述</a></li><li role=none><a role=treeitem title=如何等待资源达到给定的就绪状态。 href=/v1.17/zh/docs/ops/configuration/mesh/config-resource-ready/>等待应用的配置资源状态就绪</a></li><li role=none><a role=treeitem title="为您展示如何对 Istio 服务做健康检查。" href=/v1.17/zh/docs/ops/configuration/mesh/app-health-check/>Istio 服务的健康检查</a></li></ul></li><li role=treeitem aria-label=流量管理><button aria-hidden=true tabindex=-1></button><a title=帮助您管理正在运行的网格的网络方面。 href=/v1.17/zh/docs/ops/configuration/traffic-management/>流量管理</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title=关于如何声明协议。 href=/v1.17/zh/docs/ops/configuration/traffic-management/protocol-selection/>协议选择</a></li><li role=none><a role=treeitem title=有关如何启用和理解地域负载平衡。 href=/v1.17/zh/docs/ops/configuration/traffic-management/locality-load-balancing/>地域负载均衡</a></li><li role=none><a role=treeitem title="如何使用 TLS 配置设置安全的网络流量。" href=/v1.17/zh/docs/ops/configuration/traffic-management/tls-configuration/>TLS 配置</a></li><li role=none><a role=treeitem title="理解 Istio 如何与 DNS 交互。" href=/v1.17/zh/docs/ops/configuration/traffic-management/dns/>DNS</a></li><li role=none><a role=treeitem title="如何配置 DNS 代理。" href=/v1.17/zh/docs/ops/configuration/traffic-management/dns-proxy/>DNS 代理</a></li><li role=none><a role=treeitem title="如何配置 Gateway 网络拓扑。 (Alpha)" href=/v1.17/zh/docs/ops/configuration/traffic-management/network-topologies/>配置 Gateway 网络拓扑 *</a></li><li role=none><a role=treeitem title=如何配置流量在网格集群之间如何分发的。 href=/v1.17/zh/docs/ops/configuration/traffic-management/multicluster/>多集群流量管理</a></li></ul></li><li role=treeitem aria-label=安全><button aria-hidden=true tabindex=-1></button><a title=帮助您管理正在运行的网格的安全性方面。 href=/v1.17/zh/docs/ops/configuration/security/>安全</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="展示使用 Istio 安全策略的通用示例。" href=/v1.17/zh/docs/ops/configuration/security/security-policy-examples/>安全策略示例</a></li><li role=none><a role=treeitem title="使用加固的容器镜像来减小 Istio 的攻击面。" href=/v1.17/zh/docs/ops/configuration/security/harden-docker-images/>加固 Docker 容器镜像</a></li></ul></li><li role=treeitem aria-label=可观测性><button aria-hidden=true tabindex=-1></button><a title=帮助您管理正在运行的网格中的遥测收集和可视化。 href=/v1.17/zh/docs/ops/configuration/telemetry/>可观测性</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="精细化控制 Envoy 的统计信息。" href=/v1.17/zh/docs/ops/configuration/telemetry/envoy-stats/>Envoy 的统计信息</a></li><li role=none><a role=treeitem title="配置 Prometheus 监控 Istio 多集群。" href=/v1.17/zh/docs/ops/configuration/telemetry/monitoring-multicluster-prometheus/>使用 Prometheus 监控 Istio 多集群</a></li></ul></li><li role=treeitem aria-label=可扩展性><button aria-hidden=true tabindex=-1></button><a title=帮助您管理服务网格的扩展。 href=/v1.17/zh/docs/ops/configuration/extensibility/>可扩展性</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="描述 Istio 如何决定是拉取 Wasm 模块还是使用缓存的版本。 (Alpha)" href=/v1.17/zh/docs/ops/configuration/extensibility/wasm-pull-policy/>WebAssembly 模块的拉取策略 *</a></li></ul></li></ul></li><li role=treeitem aria-label=最佳实践><button aria-hidden=true tabindex=-1></button><a title="设置和管理 Istio 服务网格的最佳实践。" href=/v1.17/zh/docs/ops/best-practices/>最佳实践</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="设置 Istio 服务网格时的最佳实践。" href=/v1.17/zh/docs/ops/best-practices/deployment/>Deployment 最佳实践</a></li><li role=none><a role=treeitem title=避免网络或流量管理问题的配置最佳实践。 href=/v1.17/zh/docs/ops/best-practices/traffic-management/>流量管理最佳实践</a></li><li role=none><a role=treeitem title="使用 Istio 保护应用的最佳实践。" href=/v1.17/zh/docs/ops/best-practices/security/>安全最佳实践</a></li><li role=none><a role=treeitem title="描述如何使用镜像签名来验证 Istio 镜像的出处。" href=/v1.17/zh/docs/ops/best-practices/image-signing-validation/>镜像签名和验证</a></li><li role=none><a role=treeitem title="使用 Istio 观测应用时的最佳实践。" href=/v1.17/zh/docs/ops/best-practices/observability/>可观察性最佳实践</a></li></ul></li><li role=treeitem aria-label=常见问题><button aria-hidden=true tabindex=-1></button><a title="描述如何辨认和解决 Istio 中的常见问题。" href=/v1.17/zh/docs/ops/common-problems/>常见问题</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="定位常见的 Istio 流量管理和网络问题的技术。" href=/v1.17/zh/docs/ops/common-problems/network-issues/>流量管理问题</a></li><li role=none><a role=treeitem title="定位常见 Istio 认证、授权、安全相关问题的技巧。" href=/v1.17/zh/docs/ops/common-problems/security-issues/>安全问题</a></li><li role=none><a role=treeitem title="处理 Telemetry 收集问题。" href=/v1.17/zh/docs/ops/common-problems/observability-issues/>可观测性问题</a></li><li role=none><a role=treeitem title="解决 Istio 使用 Kubernetes Webhooks 进行 Sidecar 自动注入的常见问题。" href=/v1.17/zh/docs/ops/common-problems/injection/>Sidecar 自动注入问题</a></li><li role=none><a role=treeitem title=如何解决配置验证的问题。 href=/v1.17/zh/docs/ops/common-problems/validation/>配置验证的问题</a></li></ul></li><li role=treeitem aria-label=诊断工具><button aria-hidden=true tabindex=-1></button><a title="帮助解决 Istio 网格问题的工具和技术。" href=/v1.17/zh/docs/ops/diagnostic-tools/>诊断工具</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Istio 自带的一个可以为服务网格部署提供调试和诊断的补充工具。" href=/v1.17/zh/docs/ops/diagnostic-tools/istioctl/>使用 Istioctl 命令行工具</a></li><li role=none><a role=treeitem title="描述诊断与流量管理相关的 Envoy 配置问题的工具和技术。" href=/v1.17/zh/docs/ops/diagnostic-tools/proxy-cmd/>调试 Envoy 和 Istiod</a></li><li role=none><a role=treeitem title="向您展示如何使用 istioctl describe 来验证您的网格中的 pod 的配置。" href=/v1.17/zh/docs/ops/diagnostic-tools/istioctl-describe/>通过 Istioctl Describe 理解您的网格</a></li><li role=none><a role=treeitem title="演示如何使用 istioctl analyze 来识别配置中的潜在问题。" href=/v1.17/zh/docs/ops/diagnostic-tools/istioctl-analyze/>使用 Istioctl Analyze 诊断配置</a></li><li role=none><a role=treeitem title="介绍如何使用 ControlZ 深入了解正在运行的 istiod 组件。" href=/v1.17/zh/docs/ops/diagnostic-tools/controlz/>组件自检</a></li><li role=none><a role=treeitem title=如何使用组件级别日志来深入了解正在运行的组件的行为。 href=/v1.17/zh/docs/ops/diagnostic-tools/component-logging/>组件日志记录</a></li><li role=none><a role=treeitem title=介绍关于虚拟机调试的技术和工具。 href=/v1.17/zh/docs/ops/diagnostic-tools/virtual-machines/>虚拟机调试</a></li><li role=none><a role=treeitem title=介绍用来诊断多集群和多网络下安装问题的工具和技术。 href=/v1.17/zh/docs/ops/diagnostic-tools/multicluster/>多集群下的故障排除</a></li></ul></li><li role=treeitem aria-label=集成><button aria-hidden=true tabindex=-1></button><a title="能够与 Istio 集成以提供额外功能的其他软件。" href=/v1.17/zh/docs/ops/integrations/>集成</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="关于如何与 cert-manager 集成的相关说明。" href=/v1.17/zh/docs/ops/integrations/certmanager/>cert-manager</a></li><li role=none><a role=treeitem title="关于如何与 Grafana 集成构建 Istio 仪表盘的相关文档。" href=/v1.17/zh/docs/ops/integrations/grafana/>Grafana</a></li><li role=none><a role=treeitem title="如何与 Jaeger 集成。" href=/v1.17/zh/docs/ops/integrations/jaeger/>Jaeger</a></li><li role=none><a role=treeitem title="有关如何与 Kiali 集成的信息。" href=/v1.17/zh/docs/ops/integrations/kiali/>Kiali</a></li><li role=none><a role=treeitem title="如何集成 Prometheus。" href=/v1.17/zh/docs/ops/integrations/prometheus/>Prometheus</a></li><li role=none><a role=treeitem title="如何与 Zipkin 进行集成。" href=/v1.17/zh/docs/ops/integrations/zipkin/>Zipkin</a></li><li role=none><a role=treeitem title="如何集成 Apache SkyWalking。" href=/v1.17/zh/docs/ops/integrations/skywalking/>Apache SkyWalking</a></li></ul></li></ul></li><li role=treeitem aria-label=发布><a class=main title="与 Istio 发布有关的信息。" href=/v1.17/zh/docs/releases/>发布</a><ul role=group aria-expanded=true><li role=none><a role=treeitem title=特性及其发布阶段的列表。 href=/v1.17/zh/docs/releases/feature-stages/>功能状态</a></li><li role=none><a role=treeitem title=如果发现错误该怎么办。 href=/v1.17/zh/docs/releases/bugs/>报告错误</a></li><li role=none><a role=treeitem title=我们如何处理安全漏洞。 href=/v1.17/zh/docs/releases/security-vulnerabilities/>安全漏洞</a></li><li role=none><a role=treeitem title="当前支持的 Istio 版本。" href=/v1.17/zh/docs/releases/supported-releases/>版本支持</a></li><li role=treeitem aria-label=贡献文档><button aria-hidden=true tabindex=-1></button><a title="详细介绍了如何创建和维护 Istio 文档。" href=/v1.17/zh/docs/releases/contribute/>贡献文档</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="介绍如何为 Istio 贡献新文档。" href=/v1.17/zh/docs/releases/contribute/add-content/>添加新文档</a></li><li role=none><a role=treeitem title="详细说明如何将已停用的文档提交给 Istio。" href=/v1.17/zh/docs/releases/contribute/remove-content/>删除已停用的文档</a></li><li role=none><a role=treeitem title=介绍如何在本地进行本网站的构建,测试,运行和预览。 href=/v1.17/zh/docs/releases/contribute/build/>本地构建和运行本网站</a></li><li role=none><a role=treeitem title=介绍了文档中使用的文章头及其可用字段。 href=/v1.17/zh/docs/releases/contribute/front-matter/>文章头部</a></li><li role=none><a role=treeitem title="向您展示如何审阅和批准对 Istio 文档和网站的更改。" href=/v1.17/zh/docs/releases/contribute/review/>文档审阅流程</a></li><li role=none><a role=treeitem title=介绍如何在您的文档中添加代码。 href=/v1.17/zh/docs/releases/contribute/code-blocks/>添加代码块</a></li><li role=none><a role=treeitem title="介绍可用的 shortcode 及其用法。" href=/v1.17/zh/docs/releases/contribute/shortcodes/>使用 Shortcode</a></li><li role=none><a role=treeitem title="介绍 Istio 文档的格式标准。" href=/v1.17/zh/docs/releases/contribute/formatting/>格式标准</a></li><li role=none><a role=treeitem title="介绍 Istio 文档所使用的风格规则。" href=/v1.17/zh/docs/releases/contribute/style-guide/>风格指南</a></li><li role=none><a role=treeitem title="解释 Istio 文档中使用的术语标准。" href=/v1.17/zh/docs/releases/contribute/terminology/>术语标准</a></li><li role=none><a role=treeitem title="为 Istio 文档创建图表提供素材和说明。" href=/v1.17/zh/docs/releases/contribute/diagrams/>创建图表指南</a></li><li role=none><a role=treeitem title="向您展示如何使用 GitHub 参与贡献 Istio 文档。" href=/v1.17/zh/docs/releases/contribute/github/>使用 GitHub 参与社区活动</a></li></ul></li><li role=none><a role=treeitem title=该网站的最新更改列表。 href=/v1.17/zh/docs/releases/log/>网站内容更改</a></li></ul></li><li role=treeitem aria-label=参考><a class=main title="参考部分包含详细的权威参考资料,如命令行选项、配置选项和 API 调用参数。" href=/v1.17/zh/docs/reference/>参考</a><ul role=group aria-expanded=true><li role=treeitem aria-label=配置><button aria-hidden=true tabindex=-1></button><a title=关于配置选项的详细信息。 href=/v1.17/zh/docs/reference/config/>配置</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title="Telemetry configuration for workloads." href=/v1.17/zh/docs/reference/config/telemetry/>Telemetry</a></li><li role=none><a role=treeitem title="描述使用 Helm chart 安装 Istio 时的可选项。" href=/v1.17/zh/docs/reference/config/installation-options/>安装选项Helm</a></li><li role=none><a role=treeitem title="Describes the structure of messages generated by Istio analyzers." href=/v1.17/zh/docs/reference/config/istio.analysis.v1alpha1/>Analysis Messages</a></li><li role=none><a role=treeitem title="Configuration affecting the service mesh as a whole." href=/v1.17/zh/docs/reference/config/istio.mesh.v1alpha1/>Global Mesh Options</a></li><li role=none><a role=treeitem title="Configuration affecting Istio control plane installation version and shape." href=/v1.17/zh/docs/reference/config/istio.operator.v1alpha1/>IstioOperator Options</a></li><li role=none><a role=treeitem title=描述“状态”字段在配置工作流程中的作用。 href=/v1.17/zh/docs/reference/config/config-status/>状态字段配置</a></li><li role=treeitem aria-label=流量管理><button aria-hidden=true tabindex=-1></button><a title="描述如何配置 HTTP/TCP 路由功能。" href=/v1.17/zh/docs/reference/config/networking/>流量管理</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Configuration affecting load balancing, outlier detection, etc." href=/v1.17/zh/docs/reference/config/networking/destination-rule/>Destination Rule</a></li><li role=none><a role=treeitem title="Customizing Envoy configuration generated by Istio." href=/v1.17/zh/docs/reference/config/networking/envoy-filter/>Envoy Filter</a></li><li role=none><a role=treeitem title="Configuration affecting edge load balancer." href=/v1.17/zh/docs/reference/config/networking/gateway/>Gateway</a></li><li role=none><a role=treeitem title="Provides configuration for individual workloads." href=/v1.17/zh/docs/reference/config/networking/proxy-config/>ProxyConfig</a></li><li role=none><a role=treeitem title="Configuration affecting service registry." href=/v1.17/zh/docs/reference/config/networking/service-entry/>Service Entry</a></li><li role=none><a role=treeitem title="Configuration affecting network reachability of a sidecar." href=/v1.17/zh/docs/reference/config/networking/sidecar/>Sidecar</a></li><li role=none><a role=treeitem title="Configuration affecting label/content routing, sni routing, etc." href=/v1.17/zh/docs/reference/config/networking/virtual-service/>Virtual Service</a></li><li role=none><a role=treeitem title="Configuration affecting VMs onboarded into the mesh." href=/v1.17/zh/docs/reference/config/networking/workload-entry/>Workload Entry</a></li><li role=none><a role=treeitem title="Describes a collection of workload instances." href=/v1.17/zh/docs/reference/config/networking/workload-group/>Workload Group</a></li></ul></li><li role=treeitem aria-label=Security><button aria-hidden=true tabindex=-1></button><a title="如何配置 Istio 的安全功能。" href=/v1.17/zh/docs/reference/config/security/>Security</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Configuration to validate JWT." href=/v1.17/zh/docs/reference/config/security/jwt/>JWTRule</a></li><li role=none><a role=treeitem title="Peer authentication configuration for workloads." href=/v1.17/zh/docs/reference/config/security/peer_authentication/>PeerAuthentication</a></li><li role=none><a role=treeitem title="Request authentication configuration for workloads." href=/v1.17/zh/docs/reference/config/security/request_authentication/>RequestAuthentication</a></li><li role=none><a role=treeitem title="Configuration for access control on workloads." href=/v1.17/zh/docs/reference/config/security/authorization-policy/>Authorization Policy</a></li><li role=none><a role=treeitem title=授权策略中支持的条件。 href=/v1.17/zh/docs/reference/config/security/conditions/>授权策略</a></li><li role=none><a role=treeitem title=受支持的约束条件和属性。 href=/v1.17/zh/docs/reference/config/security/constraints-and-properties/>RBAC 约束和属性(不建议使用)</a></li></ul></li><li role=none><a role=treeitem title="通过 Istio 遥测导出的 Istio 标准指标。" href=/v1.17/zh/docs/reference/config/metrics/>Istio 标准指标</a></li><li role=treeitem aria-label=常见类型><button aria-hidden=true tabindex=-1></button><a title="描述 Istio API 中的常见类型。" href=/v1.17/zh/docs/reference/config/type/>常见类型</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Definition of a workload selector." href=/v1.17/zh/docs/reference/config/type/workload-selector/>Workload Selector</a></li></ul></li><li role=none><a role=treeitem title="Resource annotations used by Istio." href=/v1.17/zh/docs/reference/config/annotations/>Resource Annotations</a></li><li role=none><a role=treeitem title="Resource labels used by Istio." href=/v1.17/zh/docs/reference/config/labels/>Resource Labels</a></li><li role=treeitem aria-label=配置分析消息><button aria-hidden=true tabindex=-1></button><a title=记录配置分析期间产生的各个错误和警告消息。 href=/v1.17/zh/docs/reference/config/analysis/>配置分析消息</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0136/>AlphaAnnotation</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/message-format/>Analyzer Message Format</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0109/>ConflictingMeshGatewayVirtualServiceHosts</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0110/>ConflictingSidecarWorkloadSelectors</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0116/>DeploymentAssociatedToMultipleServices</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0137/>DeploymentConflictingPorts</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0117/>DeploymentRequiresServiceAssociated</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0002/>Deprecated</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0135/>DeprecatedAnnotation</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0153/>EnvoyFilterUsesAddOperationIncorrectly</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0151/>EnvoyFilterUsesRelativeOperation</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0155/>EnvoyFilterUsesRelativeOperationWithProxyVersion</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0154/>EnvoyFilterUsesRemoveOperationIncorrectly</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0152/>EnvoyFilterUsesReplaceOperationIncorrectly</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0150/>ExternalNameServiceTypeInvalidPortName</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0104/>GatewayPortNotOnWorkload</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0001/>InternalError</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0125/>InvalidAnnotation</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0144/>InvalidApplicationUID</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0122/>InvalidRegexp</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0105/>IstioProxyImageMismatch</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0119/>JwtFailureDueToInvalidServicePortPrefix</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0107/>MisplacedAnnotation</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0113/>MTLSPolicyConflict</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0111/>MultipleSidecarsWithoutWorkloadSelectors</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0123/>NamespaceMultipleInjectionLabels</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0102/>NamespaceNotInjected</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0127/>NoMatchingWorkloadsFound</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0128/>NoServerCertificateVerificationDestinationLevel</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0129/>NoServerCertificateVerificationPortLevel</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0103/>PodMissingProxy</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0118/>PortNameIsNotUnderNamingConvention</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0101/>ReferencedResourceNotFound</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0106/>SchemaValidationError</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0108/>UnknownAnnotation</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0112/>VirtualServiceDestinationPortSelectorRequired</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0132/>VirtualServiceHostNotFoundInGateway</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0131/>VirtualServiceIneffectiveMatch</a></li><li role=none><a role=treeitem title href=/v1.17/zh/docs/reference/config/analysis/ist0130/>VirtualServiceUnreachableRule</a></li></ul></li></ul></li><li role=treeitem aria-label=命令><button aria-hidden=true tabindex=-1></button><a title="描述 Istio 命令和工具的用法及选项。" href=/v1.17/zh/docs/reference/commands/>命令</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Install and configure Istio CNI plugin on a node, detect and repair pod which is broken by race condition." href=/v1.17/zh/docs/reference/commands/install-cni/>install-cni</a></li><li role=none><a role=treeitem title="Istio control interface." href=/v1.17/zh/docs/reference/commands/istioctl/>istioctl</a></li><li role=none><a role=treeitem title="The Istio operator." href=/v1.17/zh/docs/reference/commands/operator/>operator</a></li><li role=none><a role=treeitem title="Istio Pilot agent." href=/v1.17/zh/docs/reference/commands/pilot-agent/>pilot-agent</a></li><li role=none><a role=treeitem title="Istio Pilot." href=/v1.17/zh/docs/reference/commands/pilot-discovery/>pilot-discovery</a></li></ul></li><li role=none><a role=treeitem title="Istio 常用术语的词汇表。" href=/v1.17/zh/docs/reference/glossary/>术语表</a></li></ul></li></ul></div></div></div></nav></div><div class=article-container><button id=sidebar-toggle class=main-navigation-toggle aria-label="Open sidebar"><svg class="icon hamburger-sidebar"><use xlink:href="/v1.17/img/icons.svg#hamburger-sidebar"/></svg>
目录</button><article aria-labelledby=title><nav aria-label=Breadcrumb><ol><li><a href=/v1.17/zh/docs/ title="了解如何部署、使用和运维 Istio。">文档</a><svg class="icon breadcrumb-arrow"><use xlink:href="/v1.17/img/icons.svg#breadcrumb-arrow"/></svg></li><li><a href=/v1.17/zh/docs/setup/ title="关于如何在 Kubernetes 集群中安装 Istio 控制平面和添加虚拟机到 mesh 中的说明。">安装</a><svg class="icon breadcrumb-arrow"><use xlink:href="/v1.17/img/icons.svg#breadcrumb-arrow"/></svg></li><li><a href=/v1.17/zh/docs/setup/install/ title=选择最适合你需求和平台的安装指南。>安装</a><svg class="icon breadcrumb-arrow"><use xlink:href="/v1.17/img/icons.svg#breadcrumb-arrow"/></svg></li><li>使用外部控制平面安装 Istio</li></ol></nav><div class=title-area><div style=width:100%><h1 id=title>使用外部控制平面安装 Istio</h1><p class=byline><span class=reading-time title="1807 字"><svg class="icon clock"><use xlink:href="/v1.17/img/icons.svg#clock"/></svg><span>&nbsp;</span>阅读大约需要 9 分钟</span>
<span>&nbsp;</span>
<span><a href=https://github.com/istio/istio.io/tree/master/README.md#testing-document-content title=这个页面的自动化测试是可用的,点击详情。><svg class="icon checkmark"><use xlink:href="/v1.17/img/icons.svg#checkmark"/></svg><span>&nbsp;</span>
页面测试</a></span></p></div></div><nav class=toc-inlined aria-label="Table of Contents"><div><hr><ol><li role=none aria-label=准备开始><a href=#before-you-begin>准备开始</a><ol><li role=none aria-label=集群><a href=#clusters>集群</a><li role=none aria-label="API Server 访问"><a href=#API-server-access>API Server 访问</a><li role=none aria-label=环境变量><a href=#environment-variables>环境变量</a></ol></li><li role=none aria-label=集群配置><a href=#cluster-configuration>集群配置</a><ol><li role=none aria-label=网格操作步骤><a href=#mesh-operator-steps>网格操作步骤</a><ol><li role=none aria-label="在外部集群中搭建 Gateway"><a href=#set-up-a-gateway-in-the-external-cluster>在外部集群中搭建 Gateway</a><li role=none aria-label=设置远程集群><a href=#set-up-the-remote-cluster>设置远程集群</a><li role=none aria-label=在外部集群中安装控制平面><a href=#set-up-the-control-plane-in-the-external-cluster>在外部集群中安装控制平面</a></ol></li><li role=none aria-label=网格管理步骤><a href=#mesh-admin-steps>网格管理步骤</a><ol><li role=none aria-label=部署一个简单应用><a href=#deploy-a-sample-application>部署一个简单应用</a><li role=none aria-label="启用 Gateway"><a href=#enable-gateways>启用 Gateway</a><li role=none aria-label="配置和测试 Ingress Gateway"><a href=#%e9%85%8d%e7%bd%ae%e5%92%8c%e6%b5%8b%e8%af%95-ingress-gateway>配置和测试 Ingress Gateway</a></ol></li></ol></li><li role=none aria-label=将集群添加到网格(可选)><a href=#adding-clusters>将集群添加到网格(可选)</a><ol><li role=none aria-label=注册新集><a href=#register-the-new-cluster>注册新集</a><li role=none aria-label="设置东西向 Gateway"><a href=#setup-east-west-gateways>设置东西向 Gateway</a><li role=none aria-label=验证安装><a href=#validate-the-installation>验证安装</a></ol></li><li role=none aria-label=清理环境><a href=#clean-up>清理环境</a><li role=none aria-label=相关内容><a href=#see-also>相关内容</a></li></ol><hr></div></nav><p>本指南将引导您完成安装<span class=term data-title="External Control Plane" data-body='<p>External Control Plane 是从外部管理运行在自己的 <a href="/zh/docs/reference/glossary/#cluster">Cluster</a> 或者其他基础设施中的网格工作负载的 <a href="/zh/docs/reference/glossary/#control-plane">Control Plane</a>。Control Plane 可以部署在一个 Cluster 中,尽管不能部署在它所控制的网格的一部分 Cluster 中。它的目的是将 Control Plane 与网格的 Data Plane 完全分离。</p>
'>外部控制平面</span>,然后将一个或多个 <span class=term data-title="Remote Cluster" data-body='<p>从集群是一个连接到集群外部
<a href="/zh/docs/reference/glossary/#control-plane">控制平面</a>
的<a href="/zh/docs/reference/glossary/#cluster">集群</a>。
从集群可以连接到
<a href="/zh/docs/reference/glossary/#primary-cluster">主集群</a>
的控制平面,或连接到一个
<a href="/zh/docs/reference/glossary/#external-control-plane">外部控制平面</a>。</p>
'>远程集群</span>连接到该平面的过程。</p><p>外部控制平面<a href=/v1.17/zh/docs/ops/deployment/deployment-models/#control-plane-models>部署模型</a>允许网格操作员在与组成网格的数据平面集群(或多个集群)分开的外部集群上安装和管理控制平面。 这种部署模型可以将网状网络运营商和网状网络管理员明确区分。 网格操作员可以安装和管理 Istio 控制平面,而网格管理员只需配置网格即可。</p><figure style=width:75%><div class=wrapper-with-intrinsic-ratio style=padding-bottom:61.19402985074627%><a data-skipendnotes=true href=/v1.17/zh/docs/setup/install/external-controlplane/external-controlplane.svg title=外部控制平面集群和远程集群><img class=element-to-stretch src=/v1.17/zh/docs/setup/install/external-controlplane/external-controlplane.svg alt=外部控制平面集群和远程集群></a></div><figcaption>外部控制平面集群和远程集群</figcaption></figure><p>在远程集群中运行的 Envoy 代理Sidecar 和 Gateway通过 Ingress Gateway 访问外部 Istiod向外暴露了需要被发现CA注入和验证的端点。</p><p>虽然外部控制平面的配置和管理是由外部集群中的网格操作员完成的但连接到外部控制平面的第一个远程集群充当了网格本身的配置集群。除了网状服务本身之外网格管理员还将使用配置集群来配置网状资源Gateway、虚拟服务等。外部控制平面将从 Kubernetes API Server 远程访问此配置,如上图所示。</p><h2 id=before-you-begin>准备开始</h2><h3 id=clusters>集群</h3><p>本指南要求您有任意两个<a href=/v1.17/zh/docs/releases/supported-releases#support-status-of-istio-releases>受支持版本的 Kubernetes</a> 集群1.23, 1.24, 1.25, 1.26。</p><p>第一个集群将托管安装在 <code>external-istiod</code> 命名空间中的<span class=term data-title="External Control Plane" data-body='<p>External Control Plane 是从外部管理运行在自己的 <a href="/zh/docs/reference/glossary/#cluster">Cluster</a> 或者其他基础设施中的网格工作负载的 <a href="/zh/docs/reference/glossary/#control-plane">Control Plane</a>。Control Plane 可以部署在一个 Cluster 中,尽管不能部署在它所控制的网格的一部分 Cluster 中。它的目的是将 Control Plane 与网格的 Data Plane 完全分离。</p>
'>外部控制平面</span>
Ingress Gateway 也安装在 <code>istio-system</code> 命名空间中,以提供对外部控制平面的跨集群访问。</p><p>第二个集群是将运行网格应用程序工作负载的<span class=term data-title="Remote Cluster" data-body='<p>从集群是一个连接到集群外部
<a href="/zh/docs/reference/glossary/#control-plane">控制平面</a>
的<a href="/zh/docs/reference/glossary/#cluster">集群</a>。
从集群可以连接到
<a href="/zh/docs/reference/glossary/#primary-cluster">主集群</a>
的控制平面,或连接到一个
<a href="/zh/docs/reference/glossary/#external-control-plane">外部控制平面</a>。</p>
'>远程集群</span>
它的 Kubernetes API Server 还提供了外部控制平面Istiod用来配置工作负载代理的网状配置。</p><h3 id=API-server-access>API Server 访问</h3><p>外部控制平面集群必须可以访问远程集群中的 Kubernetes API Server。
许多云提供商通过网络负载平衡器NLB公开访问 API Server。
如果无法直接访问 API Server则需要修改安装过程以启用访问权限。
例如,在<a href=#adding-clusters>多集群配置</a>中使用的<a href=https://en.wikipedia.org/wiki/East-west_traffic>东西向</a> Gateway 也可以用于启用对 API Server 的访问。</p><h3 id=environment-variables>环境变量</h3><p>以下环境变量将始终用于简化说明:</p><table><thead><tr><th>变量名称</th><th>描述</th></tr></thead><tbody><tr><td><code>CTX_EXTERNAL_CLUSTER</code></td><td>默认 <a href=https://kubernetes.io/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/>Kubernetes配置文件</a>中的上下文名称,用于访问外部控制平面集群。</td></tr><tr><td><code>CTX_REMOTE_CLUSTER</code></td><td>默认 <a href=https://kubernetes.io/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/>Kubernetes配置文件</a>中的上下文名称,用于访问远程集群。</td></tr><tr><td><code>REMOTE_CLUSTER_NAME</code></td><td>远程集群的名称。</td></tr><tr><td><code>EXTERNAL_ISTIOD_ADDR</code></td><td>外部控制平面集群上的 Ingress Gateway 的主机名。 远程集群使用它来访问外部控制平面。</td></tr><tr><td><code>SSL_SECRET_NAME</code></td><td>拥有外部控制平面集群上 Ingress Gateway 的 TLS 证书的密钥名称。</td></tr></tbody></table><p>立即设置 <code>CTX_EXTERNAL_CLUSTER</code><code>CTX_REMOTE_CLUSTER</code><code>REMOTE_CLUSTER_NAME</code>。稍后将设置其他变量。</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ export CTX_EXTERNAL_CLUSTER=&lt;your external cluster context&gt;
$ export CTX_REMOTE_CLUSTER=&lt;your remote cluster context&gt;
$ export REMOTE_CLUSTER_NAME=&lt;your remote cluster name&gt;
</code></pre><h2 id=cluster-configuration>集群配置</h2><h3 id=mesh-operator-steps>网格操作步骤</h3><p>网格操作员负责在外部集群上安装和管理外部 Istio 控制平面。
这包括在外部集群上配置 Ingress Gateway允许远程集群访问控制平面并在远程集群上安装所需的 Webhook、ConfigMap 和 Secret以便使用外部控制平面。</p><h4 id=set-up-a-gateway-in-the-external-cluster>在外部集群中搭建 Gateway</h4><ol><li><p>为 Ingress Gateway 创建 Istio 安装配置,该配置会将外部控制平面端口暴露给其他集群:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; controlplane-gateway.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
spec:
components:
ingressGateways:
- name: istio-ingressgateway
enabled: true
k8s:
service:
ports:
- port: 15021
targetPort: 15021
name: status-port
- port: 15012
targetPort: 15012
name: tls-xds
- port: 15017
targetPort: 15017
name: tls-webhook
EOF
</code></pre><p>然后,将 Gateway 安装在外部集群的 <code>istio-system</code> 命名空间中:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ istioctl install -f controlplane-gateway.yaml --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
</code></pre></li><li><p>运行以下命令来确认 Ingress Gateway 已启动并正在运行:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get po -n istio-system --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
NAME READY STATUS RESTARTS AGE
istio-ingressgateway-9d4c7f5c7-7qpzz 1/1 Running 0 29s
istiod-68488cd797-mq8dn 1/1 Running 0 38s
</code></pre><p>您会注意到在 <code>istio-system</code> 命名空间中也创建了一个 Istiod Deployment。这用于配置 Ingress Gateway而不是远程集群使用的控制平面。</p><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-tip"/></svg></div><div class=content>可以将 Ingress Gateway 配置为在外部集群上的不同命名空间中承载多个外部控制平面,尽管在本示例中,您将仅在 <code>external-istiod</code> 命名空间中部署一个外部 Istiod。</div></aside></div></li><li><p>使用带有 TLS 的公共主机名配置您的环境来暴露 Istio Ingress Gateway 服务。
<code>EXTERNAL_ISTIOD_ADDR</code> 环境变量设置为主机名,将 <code>SSL_SECRET_NAME</code> 环境变量设置为包含 TLS 证书的密钥:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ export EXTERNAL_ISTIOD_ADDR=&lt;your external istiod host&gt;
$ export SSL_SECRET_NAME=&lt;your external istiod secret&gt;
</code></pre><p>这些说明假定您使用具有正确签名的 DNS 证书的主机名公开外部集群的 Gateway因为这是生产环境中推荐的方法。
参阅<a href=/v1.17/zh/docs/tasks/traffic-management/ingress/secure-ingress/#configure-a-tls-ingress-gateway-for-a-single-host>安全的 Ingress 任务</a>,了解暴露安全 Gateway 的更多信息。</p><p>您的环境变量应如下所示:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ echo &#34;$EXTERNAL_ISTIOD_ADDR&#34; &#34;$SSL_SECRET_NAME&#34;
myhost.example.com myhost-example-credential
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-tip"/></svg></div><div class=content><p>如果您没有 DNS 主机名但想在测试环境中试验外部控制平面,您可以使用其外部负载均衡器 IP 地址访问 Gateway</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ export EXTERNAL_ISTIOD_ADDR=$(kubectl -n istio-system --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34; get svc istio-ingressgateway -o jsonpath=&#39;{.status.loadBalancer.ingress[0].ip}&#39;)
$ export SSL_SECRET_NAME=NONE
</code></pre><p>这样做还需要对配置进行一些其他更改。请务必按照以下说明中的所有相关步骤进行操作。</p></div></aside></div></li></ol><h4 id=set-up-the-remote-cluster>设置远程集群</h4><ol><li><p>使用 <code>remote</code> 配置文件配置远程集群上安装的 Istio。这将安装一个使用外部控制平面注入器的注入 Webhook而不是本地部署的注入器。
因为这个集群也将作为配置集群,所以安装远程集群上所需的 Istio CRD 和其他资源时将 <code>global.configCluster</code><code>pilot.configMap</code> 设置为 <code>true</code></p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; remote-config-cluster.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: external-istiod
spec:
profile: remote
values:
global:
istioNamespace: external-istiod
configCluster: true
pilot:
configMap: true
istiodRemote:
injectionURL: https://${EXTERNAL_ISTIOD_ADDR}:15017/inject/cluster/${REMOTE_CLUSTER_NAME}/net/network1
base:
validationURL: https://${EXTERNAL_ISTIOD_ADDR}:15017/validate
EOF
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-tip"/></svg></div><div class=content>如果您的集群名称包含<code>/</code>(斜杠)字符,请在 <code>injectionURL</code> 中将其替换为 <code>--slash--</code>
例如 <code>injectionURL: https://1.2.3.4:15017/inject/cluster/</code><mark><code>cluster--slash--1</code></mark><code>/net/network1</code></div></aside></div></li><li><p>如果您使用的是 <code>EXTERNAL_ISTIOD_ADDR</code> 的 IP 地址,而不是正确的 DNS 主机名,请修改配置以指定发现地址和路径,而不是 URL</p><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-warning"/></svg></div><div class=content>在生产环境中不推荐这样做。</div></aside></div><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ sed -i&#39;.bk&#39; \
-e &#34;s|injectionURL: https://${EXTERNAL_ISTIOD_ADDR}:15017|injectionPath: |&#34; \
-e &#34;/istioNamespace:/a\\
remotePilotAddress: ${EXTERNAL_ISTIOD_ADDR}&#34; \
-e &#39;/base:/,+1d&#39; \
remote-config-cluster.yaml; rm remote-config-cluster.yaml.bk
</code></pre></li><li><p>在远程集群上安装配置:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl create namespace external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
$ istioctl manifest generate -f remote-config-cluster.yaml --set values.defaultRevision=default | kubectl apply --context=&#34;${CTX_REMOTE_CLUSTER}&#34; -f -
</code></pre></li><li><p>确认远程集群的注入 Webhook 配置已经安装:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get mutatingwebhookconfiguration --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
NAME WEBHOOKS AGE
istio-sidecar-injector-external-istiod 4 6m24s
</code></pre></li><li><p>确认已安装远程集群的验证 Webhook 配置:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get validatingwebhookconfiguration --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
NAME WEBHOOKS AGE
istio-validator-external-istiod 1 6m53s
istiod-default-validator 1 6m53s
</code></pre></li></ol><h4 id=set-up-the-control-plane-in-the-external-cluster>在外部集群中安装控制平面</h4><ol><li><p>创建 <code>external-istiod</code> 命名空间,该命名空间将用于托管外部控制平面:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl create namespace external-istiod --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
</code></pre></li><li><p>外部集群中的控制平面需要访问远程集群以发现服务、端点和 Pod 属性。创建具有凭据的 Secret以访问远程集群的 <code>kube-apiserver</code> 并将其安装在外部集群中:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl create sa istiod-service-account -n external-istiod --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
$ istioctl x create-remote-secret \
--context=&#34;${CTX_REMOTE_CLUSTER}&#34; \
--type=config \
--namespace=external-istiod \
--service-account=istiod \
--create-service-account=false | \
kubectl apply -f - --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
</code></pre></li><li><p>创建 Istio 配置以在外部集群的 <code>external-istiod</code> 命名空间中安装控制平面。
请注意istiod 配置为使用本地安装的 <code>istio</code> configmap并且 <code>SHARED_MESH_CONFIG</code> 环境变量设置为 <code>istio</code>
这指示 istiod 将网格管理员在配置集群的 configmap 中设置的值与网格操作员在本地 configmap 中设置的值合并,如果有任何冲突,这将优先考虑:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; external-istiod.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: external-istiod
spec:
profile: empty
meshConfig:
rootNamespace: external-istiod
defaultConfig:
discoveryAddress: $EXTERNAL_ISTIOD_ADDR:15012
proxyMetadata:
XDS_ROOT_CA: /etc/ssl/certs/ca-certificates.crt
CA_ROOT_CA: /etc/ssl/certs/ca-certificates.crt
components:
pilot:
enabled: true
k8s:
overlays:
- kind: Deployment
name: istiod
patches:
- path: spec.template.spec.volumes[100]
value: |-
name: config-volume
configMap:
name: istio
- path: spec.template.spec.volumes[100]
value: |-
name: inject-volume
configMap:
name: istio-sidecar-injector
- path: spec.template.spec.containers[0].volumeMounts[100]
value: |-
name: config-volume
mountPath: /etc/istio/config
- path: spec.template.spec.containers[0].volumeMounts[100]
value: |-
name: inject-volume
mountPath: /var/lib/istio/inject
env:
- name: INJECTION_WEBHOOK_CONFIG_NAME
value: &#34;&#34;
- name: VALIDATION_WEBHOOK_CONFIG_NAME
value: &#34;&#34;
- name: EXTERNAL_ISTIOD
value: &#34;true&#34;
- name: LOCAL_CLUSTER_SECRET_WATCHER
value: &#34;true&#34;
- name: CLUSTER_ID
value: ${REMOTE_CLUSTER_NAME}
- name: SHARED_MESH_CONFIG
value: istio
values:
global:
caAddress: $EXTERNAL_ISTIOD_ADDR:15012
istioNamespace: external-istiod
operatorManageWebhooks: true
configValidation: false
meshID: mesh1
EOF
</code></pre></li><li><p>如果您使用的是 <code>EXTERNAL_ISTIOD_ADDR</code> 的 IP 地址,而不是合适的 DNS 主机名,请删除代理元数据并更新配置中的 Webhook 配置环境变量:</p><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-warning"/></svg></div><div class=content>这在生产环境中不推荐。</div></aside></div><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ sed -i&#39;.bk&#39; \
-e &#39;/proxyMetadata:/,+2d&#39; \
-e &#39;/INJECTION_WEBHOOK_CONFIG_NAME/{n;s/value: &#34;&#34;/value: istio-sidecar-injector-external-istiod/;}&#39; \
-e &#39;/VALIDATION_WEBHOOK_CONFIG_NAME/{n;s/value: &#34;&#34;/value: istio-validator-external-istiod/;}&#39; \
external-istiod.yaml ; rm external-istiod.yaml.bk
</code></pre></li><li><p>在外部集群上应用 Istio 配置:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ istioctl install -f external-istiod.yaml --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
</code></pre></li><li><p>确认外部 Istiod 已成功部署:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get po -n external-istiod --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
NAME READY STATUS RESTARTS AGE
istiod-779bd6fdcf-bd6rg 1/1 Running 0 70s
</code></pre></li><li><p>创建 Istio <code>Gateway</code><code>VirtualService</code><code>DestinationRule</code> 配置,将流量从 Ingress Gateway 路由到外部控制平面:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; external-istiod-gw.yaml
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: external-istiod-gw
namespace: external-istiod
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 15012
protocol: https
name: https-XDS
tls:
mode: SIMPLE
credentialName: $SSL_SECRET_NAME
hosts:
- $EXTERNAL_ISTIOD_ADDR
- port:
number: 15017
protocol: https
name: https-WEBHOOK
tls:
mode: SIMPLE
credentialName: $SSL_SECRET_NAME
hosts:
- $EXTERNAL_ISTIOD_ADDR
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: external-istiod-vs
namespace: external-istiod
spec:
hosts:
- $EXTERNAL_ISTIOD_ADDR
gateways:
- external-istiod-gw
http:
- match:
- port: 15012
route:
- destination:
host: istiod.external-istiod.svc.cluster.local
port:
number: 15012
- match:
- port: 15017
route:
- destination:
host: istiod.external-istiod.svc.cluster.local
port:
number: 443
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: external-istiod-dr
namespace: external-istiod
spec:
host: istiod.external-istiod.svc.cluster.local
trafficPolicy:
portLevelSettings:
- port:
number: 15012
tls:
mode: SIMPLE
connectionPool:
http:
h2UpgradePolicy: UPGRADE
- port:
number: 443
tls:
mode: SIMPLE
EOF
</code></pre></li><li><p>如果您为 <code>EXTERNAL_ISTIOD_ADDR</code> 使用 IP 地址,而不是合适的 DNS 主机名,请修改配置。
删除 <code>DestinationRule</code>,不要在 <code>Gateway</code> 中终止 TLS<code>VirtualService</code> 中使用 TLS 路由:</p><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-warning"/></svg></div><div class=content>在生产环境中不推荐这样做。</div></aside></div><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ sed -i&#39;.bk&#39; \
-e &#39;55,$d&#39; \
-e &#39;s/mode: SIMPLE/mode: PASSTHROUGH/&#39; -e &#39;/credentialName:/d&#39; -e &#34;s/${EXTERNAL_ISTIOD_ADDR}/\&#34;*\&#34;/&#34; \
-e &#39;s/http:/tls:/&#39; -e &#39;s/https/tls/&#39; -e &#39;/route:/i\
sniHosts:\
- &#34;*&#34;&#39; \
external-istiod-gw.yaml; rm external-istiod-gw.yaml.bk
</code></pre></li><li><p>在外部集群上应用配置:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f external-istiod-gw.yaml --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
</code></pre></li></ol><h3 id=mesh-admin-steps>网格管理步骤</h3><p>现在 Istio 已启动并运行,网格管理员只需在网格中部署和配置服务,包括 Gateway如果需要</p><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-tip"/></svg></div><div class=content>默认情况下,某些 <code>istioctl</code> CLI 命令在远程集群上不起作用,但您可以轻松配置 <code>istioctl</code> 以使其功能齐全。
详情参见 <a href=https://github.com/istio-ecosystem/istioctl-proxy-sample>Istioctl-proxy 生态系统项目</a></div></aside></div><h4 id=deploy-a-sample-application>部署一个简单应用</h4><ol><li><p>在远程集群上创建 <code>sample</code> 命名空间并启用标签注入:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl create --context=&#34;${CTX_REMOTE_CLUSTER}&#34; namespace sample
$ kubectl label --context=&#34;${CTX_REMOTE_CLUSTER}&#34; namespace sample istio-injection=enabled
</code></pre></li><li><p>部署示例 <code>helloworld</code><code>v1</code>)和 <code>sleep</code></p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/sleep/sleep.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/helloworld/helloworld.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/helloworld/helloworld.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f @samples/helloworld/helloworld.yaml@ -l service=helloworld -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
$ kubectl apply -f @samples/helloworld/helloworld.yaml@ -l version=v1 -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
$ kubectl apply -f @samples/sleep/sleep.yaml@ -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
</code></pre></div></li><li><p>等几秒钟Pod <code>helloworld</code><code>sleep</code> 将以 Sidecar 注入的方式运行:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get pod -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
NAME READY STATUS RESTARTS AGE
helloworld-v1-5b75657f75-ncpc5 2/2 Running 0 10s
sleep-64d7d56698-wqjnm 2/2 Running 0 9s
</code></pre></li><li><p>从 Pod <code>sleep</code> 向 Pod <code>helloworld</code> 服务发送请求:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl exec --context=&#34;${CTX_REMOTE_CLUSTER}&#34; -n sample -c sleep \
&#34;$(kubectl get pod --context=&#34;${CTX_REMOTE_CLUSTER}&#34; -n sample -l app=sleep -o jsonpath=&#39;{.items[0].metadata.name}&#39;)&#34; \
-- curl -sS helloworld.sample:5000/hello
Hello version: v1, instance: helloworld-v1-776f57d5f6-s7zfc
</code></pre></li></ol><h4 id=enable-gateways>启用 Gateway</h4><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-tip"/></svg></div><div class=content><p>Istio 包括了对 Kubernetes <a href=https://gateway-api.sigs.k8s.io/>Gateway API</a> 的 Beta 支持,
打算<a href=/v1.17/zh/blog/2022/gateway-api-beta/>未来</a>使其成为流量管理的默认 API。</p><p>如果您使用 Gateway API则无需安装任何 Gateway 组件。
您可以跳过以下说明,直接进入<a href=#configure-and-test-an-ingress-gateway>配置和测试 Ingress Gateway</a></p></div></aside></div><p>在远程集群上启用 Ingress Gateway</p><div id=tabset-zhdocssetupinstallexternal-controlplane-1 role=tablist class=tabset><div class=tab-strip data-category-name=ingress-gateway-install-type><button aria-selected=true data-category-value=iop aria-controls=tabset-zhdocssetupinstallexternal-controlplane-1-0-panel id=tabset-zhdocssetupinstallexternal-controlplane-1-0-tab role=tab><span>IstioOperator</span>
</button><button tabindex=-1 data-category-value=helm aria-controls=tabset-zhdocssetupinstallexternal-controlplane-1-1-panel id=tabset-zhdocssetupinstallexternal-controlplane-1-1-tab role=tab><span>Helm</span></button></div><div class=tab-content><div id=tabset-zhdocssetupinstallexternal-controlplane-1-0-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-1-0-tab><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; istio-ingressgateway.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
profile: empty
components:
ingressGateways:
- namespace: external-istiod
name: istio-ingressgateway
enabled: true
values:
gateways:
istio-ingressgateway:
injectionTemplate: gateway
EOF
$ istioctl install -f istio-ingressgateway.yaml --set values.global.istioNamespace=external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
</code></pre></div><div hidden id=tabset-zhdocssetupinstallexternal-controlplane-1-1-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-1-1-tab><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ helm install istio-ingressgateway istio/gateway -n external-istiod --kube-context=&#34;${CTX_REMOTE_CLUSTER}&#34;
</code></pre><p>有关 Gateway 安装的详细文档,请参阅<a href=/v1.17/zh/docs/setup/additional-setup/gateway/>安装 Gateway</a></p></div></div></div><p>在远程集群上启用 Egress Gateway 或者其他 Gateway可选</p><div id=tabset-zhdocssetupinstallexternal-controlplane-2 role=tablist class=tabset><div class=tab-strip data-category-name=egress-gateway-install-type><button aria-selected=true data-category-value=iop aria-controls=tabset-zhdocssetupinstallexternal-controlplane-2-0-panel id=tabset-zhdocssetupinstallexternal-controlplane-2-0-tab role=tab><span>IstioOperator</span>
</button><button tabindex=-1 data-category-value=helm aria-controls=tabset-zhdocssetupinstallexternal-controlplane-2-1-panel id=tabset-zhdocssetupinstallexternal-controlplane-2-1-tab role=tab><span>Helm</span></button></div><div class=tab-content><div id=tabset-zhdocssetupinstallexternal-controlplane-2-0-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-2-0-tab><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; istio-egressgateway.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
profile: empty
components:
egressGateways:
- namespace: external-istiod
name: istio-egressgateway
enabled: true
values:
gateways:
istio-egressgateway:
injectionTemplate: gateway
EOF
$ istioctl install -f istio-egressgateway.yaml --set values.global.istioNamespace=external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
</code></pre></div><div hidden id=tabset-zhdocssetupinstallexternal-controlplane-2-1-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-2-1-tab><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ helm install istio-egressgateway istio/gateway -n external-istiod --kube-context=&#34;${CTX_REMOTE_CLUSTER}&#34; --set service.type=ClusterIP
</code></pre><p>有关 Gateway 安装的详细文档,请参阅<a href=/v1.17/zh/docs/setup/additional-setup/gateway/>安装 Gateway</a></p></div></div></div><h4 id=配置和测试-ingress-gateway>配置和测试 Ingress Gateway</h4><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-tip"/></svg></div><div class=content>以下说明指导您在网格中配置流量管理时如何选择使用 Gateway API 或 Istio 配置 API。
请按照您的首选项遵循 <code>Gateway API</code><code>Istio classic</code> 页签中的指示说明。</div></aside></div><ol><li>确保集群已准备好配置 Gateway</li></ol><div id=tabset-zhdocssetupinstallexternal-controlplane-3 role=tablist class=tabset><div class=tab-strip data-category-name=config-api><button aria-selected=true data-category-value=istio-classic aria-controls=tabset-zhdocssetupinstallexternal-controlplane-3-0-panel id=tabset-zhdocssetupinstallexternal-controlplane-3-0-tab role=tab><span>Istio classic</span>
</button><button tabindex=-1 data-category-value=gateway-api aria-controls=tabset-zhdocssetupinstallexternal-controlplane-3-1-panel id=tabset-zhdocssetupinstallexternal-controlplane-3-1-tab role=tab><span>Gateway API</span></button></div><div class=tab-content><div id=tabset-zhdocssetupinstallexternal-controlplane-3-0-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-3-0-tab><p>确认 Istio Ingress Gateway 正在运行:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get pod -l app=istio-ingressgateway -n external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
NAME READY STATUS RESTARTS AGE
istio-ingressgateway-7bcd5c6bbd-kmtl4 1/1 Running 0 8m4s
</code></pre></div><div hidden id=tabset-zhdocssetupinstallexternal-controlplane-3-1-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-3-1-tab><p>大多数 Kubernetes 集群默认不会安装 Kubernetes Gateway API CRD因此请确保在使用 Gateway API 之前安装了它们:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get crd gateways.gateway.networking.k8s.io --context=&#34;${CTX_REMOTE_CLUSTER}&#34; || \
{ kubectl kustomize &#34;github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.6.1&#34; | kubectl apply -f - --context=&#34;${CTX_REMOTE_CLUSTER}&#34;; }
</code></pre></div></div></div><ol><li>在 Ingress Gateway 上暴露 <code>helloworld</code> 应用:</li></ol><div id=tabset-zhdocssetupinstallexternal-controlplane-4 role=tablist class=tabset><div class=tab-strip data-category-name=config-api><button aria-selected=true data-category-value=istio-classic aria-controls=tabset-zhdocssetupinstallexternal-controlplane-4-0-panel id=tabset-zhdocssetupinstallexternal-controlplane-4-0-tab role=tab><span>Istio classic</span>
</button><button tabindex=-1 data-category-value=gateway-api aria-controls=tabset-zhdocssetupinstallexternal-controlplane-4-1-panel id=tabset-zhdocssetupinstallexternal-controlplane-4-1-tab role=tab><span>Gateway API</span></button></div><div class=tab-content><div id=tabset-zhdocssetupinstallexternal-controlplane-4-0-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-4-0-tab><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/helloworld/helloworld-gateway.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f @samples/helloworld/helloworld-gateway.yaml@ -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
</code></pre></div></div><div hidden id=tabset-zhdocssetupinstallexternal-controlplane-4-1-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-4-1-tab><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/helloworld/gateway-api/helloworld-gateway.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f @samples/helloworld/gateway-api/helloworld-gateway.yaml@ -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
</code></pre></div></div></div></div><ol><li>设置 <code>GATEWAY_URL</code> 环境变量(有关详细信息,请参阅<a href=/v1.17/zh/docs/tasks/traffic-management/ingress/ingress-control/#determining-the-ingress-ip-and-ports>确定 Ingress 的 IP 和端口</a>)</li></ol><div id=tabset-zhdocssetupinstallexternal-controlplane-5 role=tablist class=tabset><div class=tab-strip data-category-name=config-api><button aria-selected=true data-category-value=istio-classic aria-controls=tabset-zhdocssetupinstallexternal-controlplane-5-0-panel id=tabset-zhdocssetupinstallexternal-controlplane-5-0-tab role=tab><span>Istio classic</span>
</button><button tabindex=-1 data-category-value=gateway-api aria-controls=tabset-zhdocssetupinstallexternal-controlplane-5-1-panel id=tabset-zhdocssetupinstallexternal-controlplane-5-1-tab role=tab><span>Gateway API</span></button></div><div class=tab-content><div id=tabset-zhdocssetupinstallexternal-controlplane-5-0-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-5-0-tab><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ export INGRESS_HOST=$(kubectl -n external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34; get service istio-ingressgateway -o jsonpath=&#39;{.status.loadBalancer.ingress[0].ip}&#39;)
$ export INGRESS_PORT=$(kubectl -n external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34; get service istio-ingressgateway -o jsonpath=&#39;{.spec.ports[?(@.name==&#34;http2&#34;)].port}&#39;)
$ export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
</code></pre></div><div hidden id=tabset-zhdocssetupinstallexternal-controlplane-5-1-panel role=tabpanel tabindex=0 aria-labelledby=tabset-zhdocssetupinstallexternal-controlplane-5-1-tab><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34; wait --for=condition=ready gtw helloworld-gateway
$ export INGRESS_HOST=$(kubectl -n sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34; get gtw helloworld-gateway -o jsonpath=&#39;{.status.addresses[*].value}&#39;)
$ export GATEWAY_URL=$INGRESS_HOST:80
</code></pre></div></div></div><ol><li><p>确认您可以通过 Ingress Gateway 访问 <code>helloworld</code> 应用:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ curl -s &#34;http://${GATEWAY_URL}/hello&#34;
Hello version: v1, instance: helloworld-v1-776f57d5f6-s7zfc
</code></pre></li></ol><h2 id=adding-clusters>将集群添加到网格(可选)</h2><p>本节介绍如何通过添加另一个远程集群将现有的外部控制平面网格扩展到多集群。
这使您可以轻松分发服务并使用<a href=/v1.17/zh/docs/tasks/traffic-management/locality-load-balancing/>位置感知路由和故障转移</a>,以支持应用程序的高可用性。</p><figure style=width:75%><div class=wrapper-with-intrinsic-ratio style=padding-bottom:61.19402985074627%><a data-skipendnotes=true href=/v1.17/zh/docs/setup/install/external-controlplane/external-multicluster.svg title=多远程集群的外部控制平面><img class=element-to-stretch src=/v1.17/zh/docs/setup/install/external-controlplane/external-multicluster.svg alt=多远程集群的外部控制平面></a></div><figcaption>多远程集群的外部控制平面</figcaption></figure><p>与第一个远程集群不同,添加到同一外部控制平面的第二个以及后续集群不提供网格配置,而仅提供端点配置的来源,就像<a href=/v1.17/zh/docs/setup/install/multicluster/primary-remote_multi-network/>主从</a> Istio 多集群配置中的远程集群一样。</p><p>要继续的话,您需要另一个 Kubernetes 集群作为网格的第二个远程集群。将以下环境变量设置为集群的上下文名称和集群名称:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ export CTX_SECOND_CLUSTER=&lt;your second remote cluster context&gt;
$ export SECOND_CLUSTER_NAME=&lt;your second remote cluster name&gt;
</code></pre><h3 id=register-the-new-cluster>注册新集</h3><ol><li><p>创建远程 Istio 安装配置,它安装使用外部控制平面注入器的注入 Webhook而不是本地部署的注入器</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ cat &lt;&lt;EOF &gt; second-remote-cluster.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: external-istiod
spec:
profile: remote
values:
global:
istioNamespace: external-istiod
istiodRemote:
injectionURL: https://${EXTERNAL_ISTIOD_ADDR}:15017/inject/cluster/${SECOND_CLUSTER_NAME}/net/network2
EOF
</code></pre></li><li><p>如果您使用的是 <code>EXTERNAL_ISTIOD_ADDR</code> 的 IP 地址,而不是合适的 DNS 主机名,请修改配置以指定发现地址和路径,而不是注入 URL</p><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.17/img/icons.svg#callout-warning"/></svg></div><div class=content>在生产环境中不推荐这样做。</div></aside></div><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ sed -i&#39;.bk&#39; \
-e &#34;s|injectionURL: https://${EXTERNAL_ISTIOD_ADDR}:15017|injectionPath: |&#34; \
-e &#34;/istioNamespace:/a\\
remotePilotAddress: ${EXTERNAL_ISTIOD_ADDR}&#34; \
second-remote-cluster.yaml; rm second-remote-cluster.yaml.bk
</code></pre></li><li><p>在远程集群上创建系统命名空间并添加注解:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl create namespace external-istiod --context=&#34;${CTX_SECOND_CLUSTER}&#34;
$ kubectl annotate namespace external-istiod &#34;topology.istio.io/controlPlaneClusters=${REMOTE_CLUSTER_NAME}&#34; --context=&#34;${CTX_SECOND_CLUSTER}&#34;
</code></pre><p><code>topology.istio.io/controlPlaneClusters</code> 注解指定了应该管理这个远程集群的外部控制平面的集群 ID。
注意这是第一个远程 (config) 集群的名称,之前在外部集群安装时用于设置外部控制平面的集群 ID。</p></li><li><p>在远程集群上安装配置:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ istioctl manifest generate -f second-remote-cluster.yaml | kubectl apply --context=&#34;${CTX_SECOND_CLUSTER}&#34; -f -
</code></pre></li><li><p>确认远程集群的注入 Webhook 配置已经安装:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get mutatingwebhookconfiguration --context=&#34;${CTX_SECOND_CLUSTER}&#34;
NAME WEBHOOKS AGE
istio-sidecar-injector-external-istiod 4 4m13s
</code></pre></li><li><p>使用凭据创建一个 Secret以允许控制平面访问第二个远程集群上的端点并安装它</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ istioctl x create-remote-secret \
--context=&#34;${CTX_SECOND_CLUSTER}&#34; \
--name=&#34;${SECOND_CLUSTER_NAME}&#34; \
--type=remote \
--namespace=external-istiod \
--create-service-account=false | \
kubectl apply -f - --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
</code></pre><p>请注意,与网格的第一个远程集群不同,它也用作 config 集群,此时 <code>--type</code> 参数设置为 <code>remote</code>,而不是 <code>config</code></p></li></ol><h3 id=setup-east-west-gateways>设置东西向 Gateway</h3><ol><li><p>在两个远程集群上部署东西向 Gateway</p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/multicluster/gen-eastwest-gateway.sh>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ @samples/multicluster/gen-eastwest-gateway.sh@ \
--mesh mesh1 --cluster &#34;${REMOTE_CLUSTER_NAME}&#34; --network network1 &gt; eastwest-gateway-1.yaml
$ istioctl manifest generate -f eastwest-gateway-1.yaml \
--set values.global.istioNamespace=external-istiod | \
kubectl apply --context=&#34;${CTX_REMOTE_CLUSTER}&#34; -f -
</code></pre></div><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/multicluster/gen-eastwest-gateway.sh>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ @samples/multicluster/gen-eastwest-gateway.sh@ \
--mesh mesh1 --cluster &#34;${SECOND_CLUSTER_NAME}&#34; --network network2 &gt; eastwest-gateway-2.yaml
$ istioctl manifest generate -f eastwest-gateway-2.yaml \
--set values.global.istioNamespace=external-istiod | \
kubectl apply --context=&#34;${CTX_SECOND_CLUSTER}&#34; -f -
</code></pre></div></li><li><p>等待东西向 Gateway 分配外部 IP 地址:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl --context=&#34;${CTX_REMOTE_CLUSTER}&#34; get svc istio-eastwestgateway -n external-istiod
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istio-eastwestgateway LoadBalancer 10.0.12.121 34.122.91.98 ... 51s
</code></pre><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl --context=&#34;${CTX_SECOND_CLUSTER}&#34; get svc istio-eastwestgateway -n external-istiod
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istio-eastwestgateway LoadBalancer 10.0.12.121 34.122.91.99 ... 51s
</code></pre></li><li><p>通过东西向 Gateway 公开服务:</p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/multicluster/expose-services.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl --context=&#34;${CTX_REMOTE_CLUSTER}&#34; apply -n external-istiod -f \
@samples/multicluster/expose-services.yaml@
</code></pre></div></li></ol><h3 id=validate-the-installation>验证安装</h3><ol><li><p>在远程集群上创建 <code>sample</code> 命名空间并启用标签注入:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl create --context=&#34;${CTX_SECOND_CLUSTER}&#34; namespace sample
$ kubectl label --context=&#34;${CTX_SECOND_CLUSTER}&#34; namespace sample istio-injection=enabled
</code></pre></li><li><p>部署 <code>helloworld</code>(<code>v2</code> 版本) 和 <code>sleep</code> 的样本:</p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/sleep/sleep.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/helloworld/helloworld.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.17/samples/helloworld/helloworld.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl apply -f @samples/helloworld/helloworld.yaml@ -l service=helloworld -n sample --context=&#34;${CTX_SECOND_CLUSTER}&#34;
$ kubectl apply -f @samples/helloworld/helloworld.yaml@ -l version=v2 -n sample --context=&#34;${CTX_SECOND_CLUSTER}&#34;
$ kubectl apply -f @samples/sleep/sleep.yaml@ -n sample --context=&#34;${CTX_SECOND_CLUSTER}&#34;
</code></pre></div></li><li><p>等待几秒钟,让 <code>helloworld</code> 和 Pod <code>sleep</code> 在注入 Sidecar 的情况下运行:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl get pod -n sample --context=&#34;${CTX_SECOND_CLUSTER}&#34;
NAME READY STATUS RESTARTS AGE
helloworld-v2-54df5f84b-9hxgw 2/2 Running 0 10s
sleep-557747455f-wtdbr 2/2 Running 0 9s
</code></pre></li><li><p>从 Pod <code>sleep</code><code>helloworld</code> 服务发送请求:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl exec --context=&#34;${CTX_SECOND_CLUSTER}&#34; -n sample -c sleep \
&#34;$(kubectl get pod --context=&#34;${CTX_SECOND_CLUSTER}&#34; -n sample -l app=sleep -o jsonpath=&#39;{.items[0].metadata.name}&#39;)&#34; \
-- curl -sS helloworld.sample:5000/hello
Hello version: v2, instance: helloworld-v2-54df5f84b-9hxgw
</code></pre></li><li><p>确认通过 Ingress Gateway 多次访问 <code>helloworld</code> 应用时,现在调用的是版本 <code>v1</code><code>v2</code></p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ for i in {1..10}; do curl -s &#34;http://${GATEWAY_URL}/hello&#34;; done
Hello version: v1, instance: helloworld-v1-776f57d5f6-s7zfc
Hello version: v2, instance: helloworld-v2-54df5f84b-9hxgw
Hello version: v1, instance: helloworld-v1-776f57d5f6-s7zfc
Hello version: v2, instance: helloworld-v2-54df5f84b-9hxgw
...
</code></pre></li></ol><h2 id=clean-up>清理环境</h2><p>清理外部控制平面集群:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl delete -f external-istiod-gw.yaml --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
$ istioctl uninstall -y --purge --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
$ kubectl delete ns istio-system external-istiod --context=&#34;${CTX_EXTERNAL_CLUSTER}&#34;
$ rm controlplane-gateway.yaml external-istiod.yaml external-istiod-gw.yaml
</code></pre><p>清理远程配置集群:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl delete ns sample --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
$ istioctl manifest generate -f remote-config-cluster.yaml --set values.defaultRevision=default | kubectl delete --context=&#34;${CTX_REMOTE_CLUSTER}&#34; -f -
$ kubectl delete ns external-istiod --context=&#34;${CTX_REMOTE_CLUSTER}&#34;
$ rm remote-config-cluster.yaml istio-ingressgateway.yaml
$ rm istio-egressgateway.yaml eastwest-gateway-1.yaml || true
</code></pre><p>如果安装了可选的第二个远程集群,请清理它:</p><pre><code class=language-bash data-expandlinks=true data-repo=istio>$ kubectl delete ns sample --context=&#34;${CTX_SECOND_CLUSTER}&#34;
$ istioctl manifest generate -f second-remote-cluster.yaml | kubectl delete --context=&#34;${CTX_SECOND_CLUSTER}&#34; -f -
$ kubectl delete ns external-istiod --context=&#34;${CTX_SECOND_CLUSTER}&#34;
$ rm second-remote-cluster.yaml eastwest-gateway-2.yaml
</code></pre><nav id=see-also><h2>相关内容</h2><div class=see-also><div class=entry><p class=link><a data-skipendnotes=true href=/v1.17/zh/docs/setup/install/multiple-controlplanes/>在单集群中安装多个 Istio 控制面</a></p><p class=desc>使用修订和 discoverySelectors 在单集群中安装多个 Istio 控制面。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.17/zh/blog/2020/new-deployment-model/>在网格外部署多个控制平面</a></p><p class=desc>Istio 的新部署模型。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.17/zh/blog/2020/istiod/>介绍 istiod简化控制平面</a></p><p class=desc>Istiod 将 Istio 控制平面组件合并为一个二进制文件。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.17/zh/docs/concepts/observability/>可观测性</a></p><p class=desc>描述 Istio 提供的遥测和监控特性。</p></div></div></nav></article><nav class=pagenav><div class=left><a title="使用修订和 discoverySelectors 在单集群中安装多个 Istio 控制面。" href=/v1.17/zh/docs/setup/install/multiple-controlplanes/ class=next-link><svg class="icon left-arrow"><use xlink:href="/v1.17/img/icons.svg#left-arrow"/></svg>在单集群中安装多个 Istio 控制面</a></div><div class=right><a title="使用 Istio Operator 在 Kubernetes 集群中安装 Istio 的说明。" href=/v1.17/zh/docs/setup/install/operator/ class=next-link>使用 Istio Operator 安装<svg class="icon right-arrow"><use xlink:href="/v1.17/img/icons.svg#right-arrow"/></svg></a></div></nav><div id=feedback><div id=feedback-initial>这些信息有用吗?<br><button class="btn feedback" onclick='sendFeedback("zh",1)'>是的</button>
<button class="btn feedback" onclick='sendFeedback("zh",0)'>没有</button></div><div id=feedback-comment>Do you have any suggestions for improvement?<br><br><input id=feedback-textbox type=text placeholder='Help us improve...' data-lang=zh></div><div id=feedback-thankyou>Thanks for your feedback!</div></div><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=#before-you-begin>准备开始</a><ol><li role=none aria-label=集群><a href=#clusters>集群</a><li role=none aria-label="API Server 访问"><a href=#API-server-access>API Server 访问</a><li role=none aria-label=环境变量><a href=#environment-variables>环境变量</a></ol></li><li role=none aria-label=集群配置><a href=#cluster-configuration>集群配置</a><ol><li role=none aria-label=网格操作步骤><a href=#mesh-operator-steps>网格操作步骤</a><ol><li role=none aria-label="在外部集群中搭建 Gateway"><a href=#set-up-a-gateway-in-the-external-cluster>在外部集群中搭建 Gateway</a><li role=none aria-label=设置远程集群><a href=#set-up-the-remote-cluster>设置远程集群</a><li role=none aria-label=在外部集群中安装控制平面><a href=#set-up-the-control-plane-in-the-external-cluster>在外部集群中安装控制平面</a></ol></li><li role=none aria-label=网格管理步骤><a href=#mesh-admin-steps>网格管理步骤</a><ol><li role=none aria-label=部署一个简单应用><a href=#deploy-a-sample-application>部署一个简单应用</a><li role=none aria-label="启用 Gateway"><a href=#enable-gateways>启用 Gateway</a><li role=none aria-label="配置和测试 Ingress Gateway"><a href=#%e9%85%8d%e7%bd%ae%e5%92%8c%e6%b5%8b%e8%af%95-ingress-gateway>配置和测试 Ingress Gateway</a></ol></li></ol></li><li role=none aria-label=将集群添加到网格(可选)><a href=#adding-clusters>将集群添加到网格(可选)</a><ol><li role=none aria-label=注册新集><a href=#register-the-new-cluster>注册新集</a><li role=none aria-label="设置东西向 Gateway"><a href=#setup-east-west-gateways>设置东西向 Gateway</a><li role=none aria-label=验证安装><a href=#validate-the-installation>验证安装</a></ol></li><li role=none aria-label=清理环境><a href=#clean-up>清理环境</a><li role=none aria-label=相关内容><a href=#see-also>相关内容</a></li></ol></div></nav></div></main><footer class=footer><div class="footer-wrapper container-l"><div class="user-links footer-links"><a class=channel title='Istio 的代码在 GitHub 上开发' href=https://github.com/istio/community aria-label=GitHub><svg class="icon github"><use xlink:href="/v1.17/img/icons.svg#github"/></svg></a><a class=channel title='如果您想深入了解 Istio 的技术细节,请查看我们日益完善的设计文档' href=https://groups.google.com/forum/#!forum/istio-team-drive-access aria-label="team drive"><svg class="icon drive"><use xlink:href="/v1.17/img/icons.svg#drive"/></svg></a><a class=channel title='在 Slack 上与 Istio 社区交互讨论开发问题(仅限邀请)' href=https://slack.istio.io aria-label=slack><svg class="icon slack"><use xlink:href="/v1.17/img/icons.svg#slack"/></svg></a><a class=channel title='Stack Overflow 中列举了针对实际问题以及部署、配置和使用 Istio 的各项回答' href=https://stackoverflow.com/questions/tagged/istio aria-label="Stack Overflow"><svg class="icon stackoverflow"><use xlink:href="/v1.17/img/icons.svg#stackoverflow"/></svg></a><a class=channel title='关注我们的 Twitter 来获取最新信息' href=https://twitter.com/IstioMesh aria-label=Twitter><svg class="icon twitter"><use xlink:href="/v1.17/img/icons.svg#twitter"/></svg></a></div><hr class=footer-separator role=separator><div class="info footer-info"><a class=logo href=/v1.17/zh/ aria-label=logotype><svg xmlns="http://www.w3.org/2000/svg" width="128" height="60" viewBox="0 0 128 60"><path d="M58.434 48.823A.441.441.0 0158.3 48.497V22.583a.444.444.0 01.134-.326.446.446.0 01.327-.134h3.527a.447.447.0 01.325.134.447.447.0 01.134.326v25.914a.443.443.0 01-.134.326.444.444.0 01-.325.134h-3.527a.444.444.0 01-.327-.134z"/><path d="m70.969 48.477a6.556 6.556.0 01-2.818-1.955 4.338 4.338.0 01-1-2.78v-.345a.443.443.0 01.134-.326.444.444.0 01.326-.135h3.374a.444.444.0 01.326.135.445.445.0 01.134.326v.077a2.014 2.014.0 001.054 1.667 4.672 4.672.0 002.664.709 4.446 4.446.0 002.492-.633 1.862 1.862.0 00.958-1.591 1.426 1.426.0 00-.786-1.322 12.7 12.7.0 00-2.549-.939l-1.457-.46a21.526 21.526.0 01-3.3-1.227 6.57 6.57.0 01-2.262-1.783 4.435 4.435.0 01-.92-2.894 5.081 5.081.0 012.109-4.275 8.993 8.993.0 015.558-1.591 10.445 10.445.0 014.1.748 6.3 6.3.0 012.722 2.07 5 5 0 01.958 3.009.441.441.0 01-.134.326.441.441.0 01-.325.134h-3.258a.441.441.0 01-.326-.134.443.443.0 01-.134-.326 1.974 1.974.0 00-.978-1.667 4.647 4.647.0 00-2.665-.671 4.741 4.741.0 00-2.435.556 1.724 1.724.0 00-.938 1.553 1.512 1.512.0 00.9 1.4 15.875 15.875.0 003.01 1.055l.843.229a27.368 27.368.0 013.412 1.246 6.67 6.67.0 012.338 1.763 4.387 4.387.0 01.958 2.933 4.988 4.988.0 01-2.146 4.275 9.543 9.543.0 01-5.712 1.552 11.626 11.626.0 01-4.227-.709z"/><path d="m97.039 32.837a.443.443.0 01-.326.135h-3.911a.169.169.0 00-.191.192v9.239a2.951 2.951.0 00.632 2.108 2.7 2.7.0 002.013.652h1.15a.444.444.0 01.325.134.441.441.0 01.134.326v2.875a.471.471.0 01-.459.5l-1.994.039a8 8 0 01-4.524-1.035q-1.495-1.035-1.533-3.91V33.166A.17.17.0 0088.164 32.974H85.978A.441.441.0 0185.652 32.839.441.441.0 0185.518 32.513V29.83a.441.441.0 01.134-.326.444.444.0 01.326-.135h2.186a.169.169.0 00.191-.192v-4.485a.438.438.0 01.134-.326.44.44.0 01.325-.134h3.336a.443.443.0 01.325.134.442.442.0 01.135.326v4.485a.169.169.0 00.191.192h3.911a.446.446.0 01.326.135.446.446.0 01.134.326v2.683a.446.446.0 01-.133.324z"/><path d="m101.694 25.917a2.645 2.645.0 01-.767-1.955 2.65 2.65.0 01.767-1.955 2.65 2.65.0 011.955-.767 2.65 2.65.0 011.955.767 2.652 2.652.0 01.767 1.955 2.647 2.647.0 01-.767 1.955 2.646 2.646.0 01-1.955.767 2.645 2.645.0 01-1.955-.767zm-.211 22.906a.441.441.0 01-.134-.326V29.79a.444.444.0 01.134-.326.446.446.0 01.326-.134h3.527a.446.446.0 01.326.134.445.445.0 01.134.326v18.707a.443.443.0 01-.134.326.443.443.0 01-.326.134h-3.527a.443.443.0 01-.326-.134z"/><path d="m114.019 47.734a8.1 8.1.0 01-3.047-4.255 14.439 14.439.0 01-.652-4.37 14.3 14.3.0 01.614-4.371A7.869 7.869.0 01114 30.56a9.072 9.072.0 015.252-1.5 8.543 8.543.0 015.041 1.5 7.985 7.985.0 013.009 4.14 12.439 12.439.0 01.69 4.37 13.793 13.793.0 01-.651 4.37 8.255 8.255.0 01-3.028 4.275 8.475 8.475.0 01-5.1 1.553 8.754 8.754.0 01-5.194-1.534zm7.629-3.1a4.536 4.536.0 001.476-2.262 11.335 11.335.0 00.383-3.221 10.618 10.618.0 00-.383-3.22 4.169 4.169.0 00-1.457-2.243 4.066 4.066.0 00-2.531-.785 3.942 3.942.0 00-2.453.785 4.376 4.376.0 00-1.5 2.243 11.839 11.839.0 00-.383 3.22 11.84 11.84.0 00.383 3.221 4.222 4.222.0 001.476 2.262 4.075 4.075.0 002.549.8 3.8 3.8.0 002.44-.809z"/><path d="m15.105 32.057v15.565a.059.059.0 01-.049.059L.069 50.25A.06.06.0 01.005 50.167l14.987-33.47a.06.06.0 01.114.025z"/><path d="m17.631 23.087v24.6a.06.06.0 00.053.059l22.449 2.507a.06.06.0 00.061-.084L17.745.032a.06.06.0 00-.114.024z"/><path d="m39.961 52.548-24.833 7.45a.062.062.0 01-.043.0L.079 52.548a.059.059.0 01.026-.113h39.839a.06.06.0 01.017.113z"/></svg></a><div class=footer-languages><a tabindex=-1 lang=en id=switch-lang-en class=footer-languages-item>English</a>
<a tabindex=-1 lang=zh id=switch-lang-zh class="footer-languages-item active"><svg class="icon tick"><use xlink:href="/v1.17/img/icons.svg#tick"/></svg>中文</a></div></div><ul class=footer-policies><li class=footer-policies-item><a class=footer-policies-link href=https://www.linuxfoundation.org/legal/terms>条款</a> |
<a class=footer-policies-link href=https://www.linuxfoundation.org/legal/privacy-policy>隐私政策</a> |
<a class=footer-policies-link href=https://github.com/istio/istio.io/edit/release-1.17/content/zh/docs/setup/install/external-controlplane/index.md>在 GitHub 上编辑此页</a></li></ul><div class=footer-base><span class=footer-base-copyright>&copy; 2023 the Istio Authors.</span>
<span class=footer-base-version>部分内容可能滞后于英文版本,同步工作正在进行中<br>Version
Istio 归档
1.17.3</span><ul class=footer-base-releases><li class=footer-base-releases-item><a tabindex=-1 class=footer-base-releases-link onclick='return navigateToUrlOrRoot("https://istio.io/docs/setup/install/external-controlplane/"),!1'>当前版本</a></li><li class=footer-base-releases-item><a tabindex=-1 class=footer-base-releases-link onclick='return navigateToUrlOrRoot("https://preliminary.istio.io/docs/setup/install/external-controlplane/"),!1'>下个版本</a></li><li class=footer-base-releases-item><a tabindex=-1 class=footer-base-releases-link href=https://istio.io/archive>旧版本</a></li></ul></div></div></footer><script src=https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js defer></script><div id=scroll-to-top-container aria-hidden=true><button id=scroll-to-top title=回到顶部 tabindex=-1><svg class="icon top"><use xlink:href="/v1.17/img/icons.svg#top"/></svg></button></div></body></html>