k8s1.28.2集群部署istioctl的1.20.0版本(X86架构)
文章目录
- 前言
- 一、istioctl是什么?
- 二、部署思路
- 三、部署步骤
- 1.版本列表
- 1.镜像下载
- 2.镜像上传到内网harbor
- 3.下载部署文件
- 4.生成yaml文件并修改镜像信息
- 5.安装服务验证结果
- 总结
前言
记录一下在k8s1.28.2集群部署istioctl的1.20.0版本的过程(X86架构)
一、istioctl是什么?
Istio 是一种开源服务网格,可透明地分层到现有的分布式应用程序上。
官网:https://istio.io/latest/zh/
二、部署思路
我也不知道这个是干啥的,但是要求是镜像本地化一下,放到harbor里面,然后通过harbor的镜像部署。
三、部署步骤
1.版本列表
k8s版本:v1.28.2
docker版本:23.0.1
containerd版本:1.6.33
istio版本:1.20.0
1.镜像下载
找个可以访问互联网的环境下载镜像,一定要带–all-platforms参数
ctr -n=default image pull docker.1ms.run/istio/pilot:1.20.0 --all-platforms
ctr -n=default image pull docker.1ms.run/istio/proxyv2:1.20.0 --all-platforms
ctr -n=default image pull docker.1ms.run/busybox:1.28 --all-platforms
ctr -n=default image export istioctl-image.tar docker.1ms.run/istio/pilot:1.20.0 docker.1ms.run/istio/proxyv2:1.20.0 docker.1ms.run/busybox:1.28 --all-platforms
2.镜像上传到内网harbor
harbor地址:192.168.150.62:31180
# 上传镜像
ctr -n=default image import /data/istioctl-image.tar --all-platforms
# 修改tag
ctr -n=default image tag docker.1ms.run/istio/pilot:1.20.0 192.168.150.62:31180/library/istio/pilot:1.20.0
ctr -n=default image tag docker.1ms.run/istio/proxyv2:1.20.0 192.168.150.62:31180/library/istio/proxyv2:1.20.0
ctr -n=default image tag docker.1ms.run/busybox:1.28 192.168.150.62:31180/library/istio/busybox:1.28
# push到harbor
ctr -n=default i push --plain-http=true -u admin:Harbor12345 192.168.150.62:31180/library/istio/pilot:1.20.0
ctr -n=default i push --plain-http=true -u admin:Harbor12345 192.168.150.62:31180/library/istio/proxyv2:1.20.0
ctr -n=default i push --plain-http=true -u admin:Harbor12345 192.168.150.62:31180/library/istio/busybox:1.28
# 删除本地镜像,防止创建pod的时候没有走harbor引发后续异节点拉不到镜像的问题
ctr -n=default i delete 192.168.150.62:31180/library/istio/pilot:1.20.0
ctr -n=default i delete 192.168.150.62:31180/library/istio/proxyv2:1.20.0
ctr -n=default i delete 192.168.150.62:31180/library/istio/busybox:1.28
ctr -n=default i delete docker.1ms.run/istio/pilot:1.20.0
ctr -n=default i delete docker.1ms.run/istio/proxyv2:1.20.0
ctr -n=default i delete docker.1ms.run/busybox:1.28
3.下载部署文件
# 下载文件
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.20.0 TARGET_ARCH=x86_64 sh -
# 解压
tar -xvf istio-1.20.0-linux-amd64.tar.gz
# 拷贝二进制文件
cp ./istio-1.20.0/bin/istioctl /usr/local/bin/
# 查看版本
istioctl version
4.生成yaml文件并修改镜像信息
istioctl manifest generate > generated-manifest.yaml
修改generated-manifest.yaml中的镜像信息
image: 192.168.150.62:31180/library/istio/busybox:1.28 #9604行
image: 192.168.150.62:31180/library/istio/proxyv2:1.20.0 #10975行
image: 192.168.150.62:31180/library/istio/pilot:1.20.0 #11170行
5.安装服务验证结果
kubectl create -f generated-manifest.yaml
# 验证安装结果
istioctl verify-install -f generated-manifest.yaml
# 查看pod
kubectl -n istio-system get pod