Github:https://github.com/istio/istio
官方地址https://istio.io/
中文文档:https://istio.io/latest/zh/docs/
安装
一键脚本安装
curl -L https://istio.io/downloadIstio | sh -
执行版本和操作系统
$ curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.8 TARGET_ARCH=x86_64 sh -
release安装
https://github.com/istio/istio/releases/
$ wget https://github.com/istio/istio/releases/download/1.10.3/istio-1.10.3-linux-amd64.tar.gz$ tar -zxvf istio-1.10.3-linux-amd64.tar.gz$ cd istio-1.10.3
目录
ls -latotal 24drwxr-x--- 6 root root 115 Jul 15 13:32 .drwxr-xr-x 3 root root 65 Jul 23 01:30 ..drwxr-x--- 2 root root 22 Jul 15 13:32 bin-rw-r--r-- 1 root root 11348 Jul 15 13:32 LICENSEdrwxr-xr-x 5 root root 52 Jul 15 13:32 manifests-rw-r----- 1 root root 854 Jul 15 13:32 manifest.yaml-rw-r--r-- 1 root root 5866 Jul 15 13:32 README.mddrwxr-xr-x 20 root root 332 Jul 15 13:32 samplesdrwxr-xr-x 3 root root 57 Jul 15 13:32 tools
其中 samples/ 目录下面是一些示例应用程序,bin/ 目录下面的 istioctl 是 Istio 的 CLI 工具,可以将该 bin/ 目录加入到 PATH 路径之下,也可以直接拷贝到某个 PATH 目录下去:
cp bin/istioctl /usr/local/bin/istioctlistioctl versionno running Istio pods in "istio-system"1.10.3
采用的是 demo 配置组合的形式,这是因为它包含了一组专为测试准备的功能集合,另外还有用于生产或性能测试的配置组合。
istioctl install --set profile=demo -yDetected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/v1.10/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.! values.global.jwtPolicy is deprecated; use Values.global.jwtPolicy=third-party-jwt. See http://istio.io/latest/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for more information instead✔ Istio core installed✔ Istiod installed✔ Ingress gateways installed✔ Egress gateways installed✔ Installation complete Thank you for installing Istio 1.10. Please take a few minutes to tell us about your install/upgrade experience! https://forms.gle/KjkrDnMPByq7akrYA
安装完成后查看 istio-system 命名空间下面的 Pod 运行状态:
# kubectl get pods -n istio-systemNAME READY STATUS RESTARTS AGEistio-egressgateway-5c8d96c9b5-95fnw 1/1 Running 0 2m4sistio-ingressgateway-6bcfd457f9-4z96h 1/1 Running 0 2m5sistiod-775bcf58f7-6hl5c 1/1 Running 0 3m15s
给 namespace 添加一个 isito-injection=enabled 的 label 标签,指示 Istio 在部署应用的时候,可以自动注入 Envoy Sidecar 代理,比如这里我们给 default 命名空间注入自动标签:
kubectl label ns default istio-injection=enablednamespace/default labeled
