一、安装istio
1、下载镜像并且安装
1、wget https://github.com/istio/istio/releases/download/1.4.2/istio-1.4.2-linux.tar.gz
2、tar zxvf istio-1.4.2-linux.tar.gz
3、mv bin/istioctl usr/bin
4、istioctl manifest apply --set profile=demo
2、查看pods
[root@k8s-master bin]# kubectl get pods -n istio-system NAME READY STATUS RESTARTS AGE grafana-5595d6fd96-w9r7k 1/1 Running 0 8m49s istio-citadel-556f6b94d7-m6lgw 1/1 Running 0 8m50s istio-egressgateway-78b856f55f-5hnxw 1/1 Running 0 8m50s istio-galley-d88fbb9bc-brjh4 1/1 Running 0 8m51s istio-ingressgateway-7b594c9ddf-tt69q 1/1 Running 0 8m50s istio-pilot-5485645b54-4bb9n 1/1 Running 0 8m50s istio-policy-b58b84cd4-564s7 1/1 Running 5 8m50s istio-sidecar-injector-7d796b95d7-qqsds 1/1 Running 0 8m50s istio-telemetry-6ff4d9cf48-qjh57 1/1 Running 4 8m50s istio-tracing-756d99ccd-r84sw 1/1 Running 0 8m51s kiali-95488cf85-2bhxf 1/1 Running 0 8m50s prometheus-85b8877c9c-j4x2p 1/1 Running 0 8m50s
3、部署istio界面
cd /root/istio/istio-1.4.2/samples/httpbin kubectl apply -f httpbin-nodeport.yaml
4、手动注入sidecar
kubectl apply -f <(istioctl kube-inject -f httpbin-nodeport.yaml)
5、自动注入
kubectl label namespace default istio-injection=enabled kubectl apply -f httpbin-gateway.yaml