1、環境介紹

2、運行以下命令來自動下載並解壓縮最新版本
curl -L https://istio.io/downloadIstio | sh
注意:如果下載最新版本istio,/etc/hosts配置文件需要添加199.232.28.133 raw.githubusercontent.com,原因你懂得,不然報 Failed connect to raw.githubusercontent.com:443; 連接超時錯誤。
這里我沒有下載最新版的istio,下載的是istio1.6.8版本
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.6.8 TARGET_ARCH=x86_64 sh -
3、安裝目錄包含
可以看到有4個目錄(bin、manifests、samples、tools)及3個文件(LICENSE、README.md、manifest.yaml)
其中bin下是istioctl執行程序,manifests是istio相關的主要部署組件,manifest.yaml是當前istio版本(1.7.2)中manifests目錄下各組件的配置和依賴描述,samples是一套istio應用樣例,用來部署測試做功能校驗的,tools是一些工具腳本
打開README.md發現,主要說了3個點,istio的功能介紹、項目git倉庫、以及問題優化管理原則,並沒有直接給出安裝使用方法

4、 實現 istioctl 自動補全功能
/etc/profile文件添加
export ISTIO_HOME=/data/k8s/istio-1.6.8 export PATH=$ISTIO_HOME/bin:$PATH
添加完畢后,加載配置使配置生效:
source /etc/profile
5、安裝demo配置文件
istioctl manifest apply --set profile=demo

注意: 安裝時選擇不同的profile安裝的組件與插件不一樣,查看當前版本profile列表使用istioctl profile list命令:

生產上因為性能原因建議安裝default profile,一般熟練的老手都會使用empty profile,然后根據需求開啟組件與插件, 不同profile安裝組件與插件列表(其中x代表安裝):

6、通過確保已部署以下Kubernetes服務來驗證安裝
kubectl get deployment -n=istio-system

kubectl get pods -n=istio-system

kubectl get svc -n=istio-system

注意:將這里的LoadBalancer修改成NodePort。
7、卸載(會刪除RBAC權限,istio-system名稱空間以及它下面的層次結構中的所有資源)
istioctl manifest generate --set profile=demo | kubectl delete -f -
