1. Istio下载
- 点击下载或者使用如下命令进行下载。
[root@c72082 ~]# curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.0 sh -% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 107 100 107 0 0 98 0 0:00:01 0:00:01 --:--:-- 98100 3896 100 3896 0 0 2601 0 0:00:01 0:00:01 --:--:-- 2601Downloading istio-1.6.0 from https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz ...Failed.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 ...Istio 1.6.0 Download Complete!Istio has been successfully downloaded into the istio-1.6.0 folder on your system.Next Steps:See https://istio.io/docs/setup/kubernetes/install/ to add Istio to your Kubernetes cluster.To configure the istioctl client tool for your workstation,add the /root/istio-1.6.0/bin directory to your environment path variable with:export PATH="$PATH:/root/istio-1.6.0/bin"Begin the Istio pre-installation verification check by running:istioctl verify-installNeed more information? Visit https://istio.io/docs/setup/kubernetes/install/
[warning]以上命令将会下载最新的istio版本,如果想要下载指定的版本。使用如下命令
# 下载1.4.3版本的curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.3 sh -
- 进入到下载的istio目录
cd istio-1.6.0
这些安装目录包含如下:
install/kubernetes: 针对kubernetes的安装YAML文件.samples/: 应用案例bin/: istioctl客户端二进制文件。
- 添加istioctl客户端到你的路径。
export PATH=$PWD/bin:$PATH
或者执行如下:
[root@c72082 istio-1.6.0]# ln -s /root/istio-1.6.0/bin/istioctl /usr/local/bin/istioctl
2. Istio的部署
- 针对安装,在这里使用
demo的配置文件。它被选择为具有一组用于测试的良好默认设置,但是还有用于生产或性能测试的其他配置文件。
$ istioctl manifest apply --set profile=demoDetected 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.- Applying manifest for component Base...✔ Finished applying manifest for component Base.- Applying manifest for component Pilot...✔ Finished applying manifest for component Pilot.Waiting for resources to become ready...- Applying manifest for component IngressGateways...- Applying manifest for component EgressGateways...- Applying manifest for component AddonComponents...✔ Finished applying manifest for component EgressGateways.✔ Finished applying manifest for component IngressGateways.✔ Finished applying manifest for component AddonComponents.✔ Installation complete
- 添加名称空间的标签,当部署应用后,告诉istio去自动的注入Envoy sidecar代理。
$ kubectl label namespace default istio-injection=enablednamespace/default labeled
