K8S集群安裝Istio1.8

在前述 k8s集群 后續(xù)追加新節(jié)點 配置好集群后,安裝配置ServiceMesh首屈一指的Istio。

1 環(huán)境說明

框架 版本 功能
Kubernetes 1.20.1 K8S集群
Istio 1.8 ServiceMesh

2 下載 Istio

2.1 解壓并切換到 Istio 包所在目錄下

$ cd /usr/local/
$ curl -L https://istio.io/downloadIstio | sh -
$ cd istio-1.8.1
$ tree -L 3
.
├── bin
│   └── istioctl
├── LICENSE
├── manifests
│   ├── charts
│   │   ├── base
│   │   ├── gateways
│   │   ├── global.yaml
│   │   ├── istio-cni
│   │   ├── istio-control
│   │   ├── istiocoredns
│   │   ├── istiod-remote
│   │   ├── istio-operator
│   │   ├── README-helm3.md
│   │   ├── README.md
│   │   └── UPDATING-CHARTS.md
│   ├── examples
│   │   ├── customresource
│   │   ├── multicluster
│   │   ├── user-gateway
│   │   └── vm
│   └── profiles
│       ├── default.yaml
│       ├── demo.yaml
│       ├── empty.yaml
│       ├── minimal.yaml
│       ├── openshift.yaml
│       ├── preview.yaml
│       ├── PROFILES.md
│       └── remote.yaml
├── manifest.yaml
├── README.md
├── samples
│   ├── addons
│   │   ├── extras
│   │   ├── grafana.yaml
│   │   ├── jaeger.yaml
│   │   ├── kiali.yaml
│   │   ├── prometheus.yaml
│   │   └── README.md
│   ├── bookinfo
│   │   ├── build_push_update_images.sh
│   │   ├── networking
│   │   ├── platform
│   │   ├── policy
│   │   ├── README.md
│   │   ├── src
│   │   └── swagger.yaml
│   ├── certs
│   │   ├── ca-cert.pem
│   │   ├── ca-key.pem
│   │   ├── cert-chain.pem
│   │   ├── generate-workload.sh
│   │   ├── README.md
│   │   ├── root-cert.pem
│   │   ├── workload-bar-cert.pem
│   │   ├── workload-bar-key.pem
│   │   ├── workload-foo-cert.pem
│   │   └── workload-foo-key.pem
│   ├── custom-bootstrap
│   │   ├── custom-bootstrap.yaml
│   │   ├── example-app.yaml
│   │   └── README.md
│   ├── external
│   │   ├── aptget.yaml
│   │   ├── github.yaml
│   │   ├── pypi.yaml
│   │   └── README.md
│   ├── health-check
│   │   ├── liveness-command.yaml
│   │   └── liveness-http-same-port.yaml
│   ├── helloworld
│   │   ├── gen-helloworld.sh
│   │   ├── helloworld-gateway.yaml
│   │   ├── helloworld.yaml
│   │   ├── loadgen.sh
│   │   ├── README.md
│   │   └── src
│   ├── httpbin
│   │   ├── httpbin-gateway.yaml
│   │   ├── httpbin-nodeport.yaml
│   │   ├── httpbin-vault.yaml
│   │   ├── httpbin.yaml
│   │   ├── README.md
│   │   └── sample-client
│   ├── https
│   │   ├── default.conf
│   │   └── nginx-app.yaml
│   ├── kubernetes-blog
│   │   ├── bookinfo-ratings.yaml
│   │   ├── bookinfo-reviews-v2.yaml
│   │   └── bookinfo-v1.yaml
│   ├── multicluster
│   │   ├── expose-istiod.yaml
│   │   ├── expose-services.yaml
│   │   ├── gen-eastwest-gateway.sh
│   │   └── README.md
│   ├── operator
│   │   ├── cni-on.yaml
│   │   ├── default-install.yaml
│   │   ├── pilot-advanced-override.yaml
│   │   ├── pilot-k8s.yaml
│   │   ├── values-global.yaml
│   │   └── values-pilot.yaml
│   ├── rawvm
│   │   ├── demo.sh
│   │   ├── Makefile
│   │   └── README.md
│   ├── README.md
│   ├── security
│   │   └── psp
│   ├── sleep
│   │   ├── README.md
│   │   ├── sleep-vault.yaml
│   │   └── sleep.yaml
│   ├── tcp-echo
│   │   ├── README.md
│   │   ├── src
│   │   ├── tcp-echo-20-v2.yaml
│   │   ├── tcp-echo-all-v1.yaml
│   │   ├── tcp-echo-services.yaml
│   │   └── tcp-echo.yaml
│   └── websockets
│       ├── app.yaml
│       ├── README.md
│       └── route.yaml
└── tools
    ├── certs
    │   ├── common.mk
    │   ├── Makefile.k8s.mk
    │   ├── Makefile.selfsigned.mk
    │   └── README.md
    ├── dump_kubernetes.sh
    ├── _istioctl
    └── istioctl.bash

45 directories, 90 files

安裝目錄包含如下內(nèi)容:

  • samples/ 目錄下,有示例應(yīng)用程序
  • bin/ 目錄下,包含 istioctl的客戶端文件。istioctl 工具用于手動注入 Envoy sidecar 代理。

2.2 將 istioctl 客戶端路徑增加到 path 環(huán)境變量中

$ vi /etc/profile
$ export PATH=/usr/local/istio-1.8.1/bin:$PATH
$ source /etc/profile

2.3 開啟自動補全

$ cp /usr/local/istio-1.8.1/tools/istioctl.bash $HOME/
$ source ~/istioctl.bash

3 安裝 Istio

3.1 安裝 default配置

$ cd /usr/local/istio-1.8.1
$ istioctl install
This will install the Istio default profile with ["Istio core" "Istiod" "Ingress gateways"] components into the cluster. Proceed? (y/N) y
? Istio core installed
? Istiod installed
? Ingress gateways installed
- Pruning removed resources                                                                                                                                                                         Removed PodDisruptionBudget:istio-system:istio-egressgateway.
  Removed Deployment:istio-system:istio-egressgateway.
  Removed Service:istio-system:istio-egressgateway.
  Removed ServiceAccount:istio-system:istio-egressgateway-service-account.
  Removed RoleBinding:istio-system:istio-egressgateway-sds.
  Removed Role:istio-system:istio-egressgateway-sds.
? Installation complete  

3.2 安裝demo配置

此處安裝時候會花些功夫,如果第一次安裝失敗,多裝幾回

$ cd /usr/local/istio-1.8.1
$ istioctl install --set profile=demo -y
This will install the Istio demo profile with ["Istio core" "Istiod" "Ingress gateways" "Egress
? Istio core installed
- Processing resources for Istiod.                                                              ? Istiod installed
? Ingress gateways installed
? Egress gateways installed
- Pruning removed resources                                                                       Removed HorizontalPodAutoscaler:istio-system:istio-ingressgateway.
  Removed HorizontalPodAutoscaler:istio-system:istiod.
? Installation complete

3.3 檢查安裝狀態(tài)

$ kubectl -n istio-system get deploy
NAME                   READY   UP-TO-DATE   AVAILABLE   AGE
istio-egressgateway    1/1     1            1           7m4s
istio-ingressgateway   1/1     1            1           15m
istiod                 1/1     1            1           15m

4 卸載istio

要從集群中完整卸載Istio

$ istioctl x uninstall --purge

控制平面的命名空間,刪除istio-system

$ kubectl delete namespace istio-system
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 1. 準(zhǔn)備環(huán)境 k8s集群(1.18.5) 2. 安裝配置 創(chuàng)建/tmp/istio目錄,并下載istio包 會在...
    phoahan閱讀 2,802評論 0 0
  • istio官網(wǎng)地址 istio中文 istio安裝三步走: 搭建kubernets平臺:已完成 下載istiois...
    與詩小睡閱讀 827評論 0 0
  • 久違的晴天,家長會。 家長大會開好到教室時,離放學(xué)已經(jīng)沒多少時間了。班主任說已經(jīng)安排了三個家長分享經(jīng)驗。 放學(xué)鈴聲...
    飄雪兒5閱讀 7,819評論 16 22
  • 今天感恩節(jié)哎,感謝一直在我身邊的親朋好友。感恩相遇!感恩不離不棄。 中午開了第一次的黨會,身份的轉(zhuǎn)變要...
    余生動聽閱讀 10,845評論 0 11
  • 可愛進取,孤獨成精。努力飛翔,天堂翱翔。戰(zhàn)爭美好,孤獨進取。膽大飛翔,成就輝煌。努力進取,遙望,和諧家園??蓯塾巫?..
    趙原野閱讀 3,502評論 1 1

友情鏈接更多精彩內(nèi)容