istio.io/content/zh/docs/examples/microservices-istio/setup-local-computer/index.md

1.6 KiB
Raw Permalink Blame History

title overview weight owner test
设置本地计算机 为该教程设置本地计算机。 3 istio/wg-docs-maintainers no

{{< boilerplate work-in-progress >}}

在本模块中,您将为教程准备本地计算机

  1. 安装 curl

  2. 安装 Node.js

  3. 安装 Docker

  4. 安装 kubectl

  5. 为您从教程中收到的配置文件或者在上一个模块自己创建的配置文件设置环境变量 KUBECONFIG

    {{< text bash >}} $ export KUBECONFIG= {{< /text >}}

  6. 通过打印当前命名空间来验证配置是否生效:

    {{< text bash >}} kubectl config view -o jsonpath="{.contexts[?(@.name==\"(kubectl config current-context)")].context.namespace}" tutorial {{< /text >}}

    您应该在输出中看到命名空间的名称,该命名空间由讲师分配或者在上一个模块中由您自己分配。

  7. 下载一个 Istio 发行版bin 目录下提出命令行工具 istioctl,使用下边的命令验证 istioctl 是否可以正常使用:

    {{< text bash >}} $ istioctl version client version: 1.22.0 control plane version: 1.22.0 data plane version: 1.22.0 (4 proxies) {{< /text >}}

恭喜,您已配置完毕本地计算机!

接下来在本地运行微服务