1. Istio下载

  1. 点击下载或者使用如下命令进行下载。
  1. [root@c72082 ~]# curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.0 sh -
  2. % Total % Received % Xferd Average Speed Time Time Time Current
  3. Dload Upload Total Spent Left Speed
  4. 100 107 100 107 0 0 98 0 0:00:01 0:00:01 --:--:-- 98
  5. 100 3896 100 3896 0 0 2601 0 0:00:01 0:00:01 --:--:-- 2601
  6. Downloading istio-1.6.0 from https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz ...Failed.
  7. Trying with TARGET_ARCH. Downloading istio-1.6.0 from https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux-amd64.tar.gz ...
  8. Istio 1.6.0 Download Complete!
  9. Istio has been successfully downloaded into the istio-1.6.0 folder on your system.
  10. Next Steps:
  11. See https://istio.io/docs/setup/kubernetes/install/ to add Istio to your Kubernetes cluster.
  12. To configure the istioctl client tool for your workstation,
  13. add the /root/istio-1.6.0/bin directory to your environment path variable with:
  14. export PATH="$PATH:/root/istio-1.6.0/bin"
  15. Begin the Istio pre-installation verification check by running:
  16. istioctl verify-install
  17. Need more information? Visit https://istio.io/docs/setup/kubernetes/install/

[warning]以上命令将会下载最新的istio版本,如果想要下载指定的版本。使用如下命令

  1. # 下载1.4.3版本的
  2. curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.3 sh -
  1. 进入到下载的istio目录
  1. cd istio-1.6.0

这些安装目录包含如下:

  • install/kubernetes: 针对kubernetes的安装YAML文件.

  • samples/: 应用案例

  • bin/: istioctl客户端二进制文件。

  1. 添加istioctl客户端到你的路径。
  1. export PATH=$PWD/bin:$PATH

或者执行如下:

  1. [root@c72082 istio-1.6.0]# ln -s /root/istio-1.6.0/bin/istioctl /usr/local/bin/istioctl

2. Istio的部署

  1. 针对安装,在这里使用demo的配置文件。它被选择为具有一组用于测试的良好默认设置,但是还有用于生产或性能测试的其他配置文件。
  1. $ istioctl manifest apply --set profile=demo
  2. Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
  3. - Applying manifest for component Base...
  4. ✔ Finished applying manifest for component Base.
  5. - Applying manifest for component Pilot...
  6. ✔ Finished applying manifest for component Pilot.
  7. Waiting for resources to become ready...
  8. - Applying manifest for component IngressGateways...
  9. - Applying manifest for component EgressGateways...
  10. - Applying manifest for component AddonComponents...
  11. ✔ Finished applying manifest for component EgressGateways.
  12. ✔ Finished applying manifest for component IngressGateways.
  13. ✔ Finished applying manifest for component AddonComponents.
  14. ✔ Installation complete
  1. 添加名称空间的标签,当部署应用后,告诉istio去自动的注入Envoy sidecar代理。
  1. $ kubectl label namespace default istio-injection=enabled
  2. namespace/default labeled