K8S集群安装Istio服务网格

 下载地址Release Istio 1.11.4 · istio/istio · GitHubConnect, secure, control, and observe services. Contribute to istio/istio development by creating an account on GitHub.https://github.com/istio/istio/releases/tag/1.11.4

1 环境说明
框架    版本    功能
Kubernetes    v1.21.4    K8S集群
Istio    v1.11.4    ServiceMesh


2 下载 Istio
2.1 解压并切换到 Istio 包所在目录下
cd /usr/local/
方法一:curl -L https://istio.io/downloadIstio | sh -
方法二:wget https://github.com/istio/istio/releases/download/1.11.4/istio-1.11.4-linux-amd64.tar.gz

cd istio-1.11.4

安装目录包含如下内容:
samples/ 目录下,有示例应用程序
bin/ 目录下,包含 istioctl的客户端文件。istioctl 工具用于手动注入 Envoy sidecar 代理。
2.2 将 istioctl 客户端路径增加到 path 环境变量中
vi /etc/profile
export PATH=/usr/local/istio-1.11.4/bin:$PATH
source /etc/profile
1
2
3
2.3 开启自动补全
cp /usr/local/istio-1.11.4/tools/istioctl.bash $HOME/
source ~/istioctl.bash
1
2
3 安装 Istio
3.1 安装 default配置
cd /usr/local/istio-1.11.4
istioctl install
1
2
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.11.4
istioctl install --set profile=demo -y
1
2
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
1
2
3
4
5
6
7
8
3.3 检查安装状态
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
 卸载istio
要从集群中完整卸载Istio
istioctl x uninstall --purge
1
控制平面的命名空间,删除istio-system
kubectl delete namespace istio-system

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值