共计 3488 个字符,预计需要花费 9 分钟才能阅读完成。
@TOC
前言
上一篇讲了什么是 Istio 的实践篇,这次咱们就来实际操作。
想看上一篇实践篇的看这里(看完相对有所播种):
[Istio 是什么?] 还不晓得你就 out 了, 一文 40 分钟疾速了解_小叶的技术 Logs 的博客 -CSDN 博客
本文阐明 请大家务必查看
本文有两个版本, 具体版、简洁版 。
前者适宜老手,后者适宜新手 (不便大家查找,从而过滤掉某些步骤,节约工夫老本) 所以大家按需查看哟。
具体版 | 简洁版 |
---|
简洁版 :蕴含所有步骤,以及命令的执行过程(适宜老手)
简洁版 :只蕴含命令(适宜有肯定熟练度的人)
环境筹备
零碎 | Vcpu | Memory | 集群 |
---|---|---|---|
centos7 | 2 | 8 | kubernetes |
具体版
入门:搭建步骤
Istio 软件包下载
装置最新软件包
$ curl -L https://istio.io/downloadIstio | sh - # 装置最新软件包
这一条命令如果下载不下来,能够间接拜访下载地址:Istio 下载
筛选对应的 istio 版本、下载对应的压缩文件,如图所示: 留神:Istio1.13.3 版本,要求 kubernetes 最低集群版是 1.19
解压软件包:
[root@master istio]# ll
total 22704
-rw-r--r-- 1 root root 23245765 Apr 23 10:39 istio-1.12.3-linux-amd64.tar.gz
[root@master istio]# tar -vzxf istio-1.12.3-linux-amd64.tar.gz
istio-1.12.3/
istio-1.12.3/manifest.yaml
istio-1.12.3/bin/
istio-1.12.3/bin/istioctl
istio-1.12.3/manifests/
istio-1.12.3/manifests/examples/
istio-1.12.3/manifests/examples/customresource/
istio-1.12.3/manifests/examples/customresource/istio_v1alpha1_istiooperator_cr.yaml
istio-1.12.3/manifests/examples/user-gateway/
装置目录蕴含:
- samples/ 目录下的示例应用程序
- bin/ 目录下的 istioctl 客户端二进制文件 .
配置环境变量:
[root@master istio]# cat /etc/profile
export ISTIO_HOME=/root/istio/istio-1.12.3
export PATH=$PATH:$ISTIO_HOME/bin
[root@master istio]# istioctl version
client version: 1.12.3
control plane version: 1.12.3
data plane version: 1.12.3 (10 proxies)
下载 Istio
[root@master ~]# istioctl install --set profile=demo -y
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/v1.12/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
WARNING: Istio control planes installed: 1.13.3.
WARNING: An older installed version of Istio has been detected. Running this command will overwrite it.
✔ Istio core installed
✔ Istiod installed
✔ Egress gateways installed
✔ Ingress gateways installed
✔ Installation complete Making this installation the default for injection and validation.
Thank you for installing Istio 1.12. Please take a few minutes to tell us about your install/upgrade experience! https://forms.gle/FegQbc9UvePd4Z9z7
主动注入 Envoy 边车代理
[root@master ~]# kubectl label namespace default istio-injection=enabled
namespace/default labeled
卸载
残缺卸载 Istio
[root@master istio]# istioctl x uninstall --purge
All Istio resources will be pruned from the cluster
Proceed? (y/N) y
Removed IstioOperator:istio-system:installed-state.
Removed PodDisruptionBudget:istio-system:istio-egressgateway.
Removed PodDisruptionBudget:istio-system:istio-ingressgateway.
Removed PodDisruptionBudget:istio-system:istiod.
Removed Deployment:istio-system:istio-egressgateway.
Removed Deployment:istio-system:istio-ingressgateway.
Removed Deployment:istio-system:istiod.
Removed Service:istio-system:istio-egressgateway.
Removed Service:istio-system:istio-ingressgateway.
Removed Service:istio-system:istiod.
Removed ConfigMap:istio-system:istio.
Removed ConfigMap:istio-system:istio-sidecar-injector.
Removed Pod:istio-system:istio-egressgateway-6b69dfb9f8-x7zwb.
Removed Pod:istio-system:istio-ingressgateway-7484f57fd6-hrjjt.
Removed Pod:istio-system:istiod-7989b7749b-rmslt.
简洁版
装置
[root@master istio]# curl -L https://istio.io/downloadIstio | sh -
[root@master istio]# tar -vzxf istio-1.12.3-linux-amd64.tar.gz
[root@master istio]# cat /etc/profile
export ISTIO_HOME=/root/istio/istio-1.12.3
export PATH=$PATH:$ISTIO_HOME/bin
[root@master ~]# istioctl install --set profile=demo -y
[root@master istio]# kubectl label namespace default istio-injection=enabled
卸载
[root@master istio]# istioctl x uninstall --purge
学习不走弯路,gz 号「yeTechLog」
正文完