istio 升级到1.3.0版本
发表于:2025-12-01 作者:千家信息网编辑
千家信息网最后更新 2025年12月01日,准备# 工作目录/mnt/e/work/# 下载安装包cd /mnt/e/work/curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.3.
千家信息网最后更新 2025年12月01日istio 升级到1.3.0版本
准备
# 工作目录/mnt/e/work/# 下载安装包cd /mnt/e/work/curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.3.0 sh -配置环境变量删除旧的/etc/profileexport PATH="$PATH:/mnt/e/work/istio-1.3.0/bin"source /etc/profile升级
# 修改yaml 与上次版本参数一致#使用Beyond Compare 4 差异对比#修改gateways values.yaml 文件 删除nodePort 当然也可不用删除#参数gateways.istio-ingressgateway.type=NodePort # 参数gateways.istio-ingressgateway.type=ClusterIP 必须删除nodePort# 修改 gateways\templates\service.yaml 文件#添加 clusterIP: None # 方便暴露其它tcp 端口#修改 istio-cni # 修改文件helm\istio-cni\templates\istio-cni.yaml#添加内容 也可以不用修改在这边项目做了修改的 - effect: NoSchedule key: node-role.kubernetes.io/ingress operator: Equal
升级istio
#检查是否安装 istio-cni 插件helm status istio-cni --namespace istio-systemroot@Qist:/mnt/f# helm status istio-cni --namespace istio-systemNAME: istio-cniLAST DEPLOYED: 2019-09-18 16:33:57.4490493 +0800 DSTNAMESPACE: istio-systemSTATUS: deployed#返回正常证明已经安装了istio-cni#由于istio-cni 安装在非kube-system命名空间 先卸载istio-cnihelm uninstall istio-cni --namespace istio-system# 等待卸载完成helm install install/kubernetes/helm/istio-cni --name-template istio-cni --namespace istio-system \--set cniBinDir=/apps/cni/bin \ # cni 在宿主机目录--set excludeNamespaces={"istio-system,monitoring,kubernetes-dashboard,kube-system"}# 排除的命名空间# 如果部署在kube-system 命名空间直接升级helm upgrade --install istio-cni install/kubernetes/helm/istio-cni --namespace kube-system \--set cniBinDir=/apps/cni/bin \--set excludeNamespaces={"istio-system,monitoring,kubernetes-dashboard,kube-system"}# 升级istio-inithelm upgrade --install istio-init install/kubernetes/helm/istio-init --namespace istio-system --force# 等待升级完成# 使用以下命令验证是否已将所有Istio CRD提交到Kubernetes api-serverkubectl get crds | grep 'istio.io' | wc -lroot@Qist:/mnt/f# kubectl get crds | grep 'istio.io' | wc -l23# 返回正常# 升级istio图表# xxxx 替换成自己的域名#xxxx.local 替换成自己k8s集群域helm upgrade --install istio install/kubernetes/helm/istio --namespace istio-system \--set gateways.istio-ingressgateway.type=ClusterIP \ # ClusterIP IP 对外暴露服务 可设置NodePort--set gateways.istio-egressgateway.enabled=true \ # 开启istio-egressgateway 服务--set gateways.istio-ingressgateway.serviceAnnotations={'kubernetes.io/ingress.class: traefik,traefik.ingress.kubernetes.io/affinity: true,traefik.ingress.kubernetes.io/load-balancer-method: drr'} \ # 设置 istio-ingressgateway service 负载均衡规则及session 保持与使用traefik 对外提供ingress 服务 如果是其它ingress 一定要做修改--set mixer.policy.enabled=true \ # 启用策略检查--set grafana.enabled=true \ # 开启grafana--set grafana.ingress.enabled=true \ # 开启grafana ingress--set grafana.ingress.hosts={"gr.xxxx.com"} \ # 配置grafana 访问域名--set grafana.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \ # 配置grafana 使用traefik 作为转发服务--set grafana.contextPath=/ \ # 配置域名访问路径 默认路径/grafana --set prometheus.ingress.enabled=true \ # 开启prometheus ingress--set prometheus.ingress.hosts={"pr.xxxx.com"} \ # 配置 prometheus 访问域名--set prometheus.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \ #用traefik 作为转发服务--set prometheus.contextPath=/ \ #配置域名访问路径 默认路径/prometheus --set tracing.enabled=true \ # 开启tracing 服务如果以前配置zipkin 作为追踪这里请添加 tracing.provider=zipkin 否则部署会报错--set tracing.ingress.enabled=true \ # 开启tracing ingress --set tracing.ingress.hosts={"tracing.xxxx.com"} \ # 配置tracing 域名访问--set tracing.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \ # 用traefik 作为转发服务--set tracing.contextPath=/ \ # 配置域名访问路径 默认路径/tracing --set kiali.enabled=true \ # 开启kiali --set kiali.ingress.enabled=true \ # 开启kiali ingress --set kiali.ingress.hosts={"kiali.xxxx.com"} \ # 配置kiali 域名访问服务--set kiali.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \ # 用traefik 作为转发服务--set kiali.contextPath=/ \ # 配置域名访问路径 默认路径/kiali --set kiali.dashboard.viewOnlyMode=true \ # 配置账号只有读取权限--set kiali.dashboard.grafanaURL=http://gr.xxxx.com \ # 配置grafana 对外访问路径可以是对外的IP 跟域名一定要外网访问--set kiali.dashboard.jaegerURL=http://tracing.xxxx.com \ # 配置jaeger 对外访问路径可以是对外的IP 跟域名 如果启用zipkin 这个配置失效--set kiali.createDemoSecret=true \ # 设置kiali Secret 账号密码 默认admin/admin --set istio_cni.enabled=true \ # 开启 istio_cni--set istio-cni.cniBinDir=/apps/cni/bin \ # 配置 宿主机cni 路径--set istio-cni.excludeNamespaces={"istio-system,monitoring,kubernetes-dashboard,kube-system"} \ # 排除命名空间--set global.k8sIngress.enabled=true \ # 开启用于K8S入口资源的网关--set global.proxy.clusterDomain="xxxx.local" \ # k8s 集群域istio-proxy 会用到--set global.proxy.accessLogFile="/dev/stdout" \ # 代理日志输出到/dev/stdout --set global.proxy.logLevel="info" \ # 代理日志输出级别--set global.disablePolicyChecks=false \ #开启策略检查--set global.proxy.autoInject=disabled # 关闭istio-injection 为enabled 自动注入 设置为使用annotations 注释进行注入 sidecar.istio.io/inject: "true" 默认 sidecar.istio.io/inject: "false"# 等待升级完成 kubectl get pod -n istio-systemroot@Qist:/mnt/f# kubectl get pod -n istio-systemNAME READY STATUS RESTARTS AGEgrafana-7bfb599d6c-5828h 1/1 Running 0 17histio-citadel-5f85674d5b-x2hbt 1/1 Running 0 17histio-cleanup-secrets-1.3.0-rxsqz 0/1 Completed 0 18histio-cni-node-4774c 1/1 Running 0 17histio-cni-node-4t7rz 1/1 Running 0 17histio-cni-node-h66gq 1/1 Running 0 17histio-cni-node-nc64k 1/1 Running 0 17histio-cni-node-rd2pw 1/1 Running 0 17histio-cni-node-tzjjn 1/1 Running 0 17histio-cni-node-xgrj7 1/1 Running 0 17histio-egressgateway-55978569d6-cw99p 1/1 Running 0 17histio-galley-545fbd68c8-56pmq 1/1 Running 0 17histio-ingressgateway-898dd6645-g6jsc 1/1 Running 0 17histio-init-crd-10-1.3.0-shl5z 0/1 Completed 0 17histio-init-crd-11-1.3.0-rmqjl 0/1 Completed 0 17histio-init-crd-12-1.3.0-nckdw 0/1 Completed 0 17histio-pilot-7cf68bfd87-fdwx5 2/2 Running 0 17histio-policy-7cf59b54db-pq27s 2/2 Running 0 17histio-sidecar-injector-5796d5b447-qgnx4 1/1 Running 0 17histio-telemetry-8cbc98d59-v5pl4 2/2 Running 0 17histio-tracing-d4f8cdf58-2jbdg 1/1 Running 0 16hkiali-c5965f96c-pdhg9 1/1 Running 0 15hprometheus-5b68448dc9-pl9qf 1/1 Running 0 17h# 所有pod 状态正常 #边车升级 #在控制平面升级之后,已经运行Istio的应用程序仍将使用较旧的边车。要升级边车,您需要重新注入它。#如果您正在使用自动边车注入,您可以通过对所有吊舱进行滚动更新来升级边车,以便自动重新注入新版本的边车。kubectl rollout restart deployment nginx --namespace defaultkubectl get pod -n default | grep nginxroot@Qist:/mnt/f# kubectl get pod -n default | grep nginxnginx-v1-54dffc665c-gv29t 3/3 Running 0 15hnginx-v1-54dffc665c-kxp89 3/3 Running 0 15hnginx-v2-688f8f54d7-fw54c 3/3 Running 0 15hnginx-v2-688f8f54d7-jbch3 3/3 Running 0 15h# 查看 pod nginx-v2-688f8f54d7-jbch3 边车是否最新kubectl describe pod pod nginx-v2-688f8f54d7-jbch3| grep proxyv2root@Qist:/mnt/f# kubectl describe pod pod nginx-v2-688f8f54d7-jbch3| grep proxyv2Error from server (NotFound): pods "pod" not found Image: docker.io/istio/proxyv2:1.3.0 Image ID: docker-pullable://istio/proxyv2@sha256:f3f68f9984dc2deb748426788ace84b777589a40025085956eb880c9c3c1c056# 已经是最新版本1.3.0 至此 istio 升级安装完成istio 完整安装
# 需要修改的配置参考 升级# istio-init 安装helm install install/kubernetes/helm/istio-init --name-template istio-init --namespace istio-systemkubectl get crds | grep 'istio.io' | wc -l# istio 安装helm install install/kubernetes/helm/istio --name-template istio --namespace istio-system \--set gateways.istio-ingressgateway.type=ClusterIP \--set gateways.istio-egressgateway.enabled=true \--set gateways.istio-ingressgateway.serviceAnnotations={'kubernetes.io/ingress.class: traefik,traefik.ingress.kubernetes.io/affinity: true,traefik.ingress.kubernetes.io/load-balancer-method: drr'} \--set mixer.policy.enabled=true \--set grafana.enabled=true \--set grafana.ingress.enabled=true \--set grafana.ingress.hosts={"gr.xxxx.com"} \--set grafana.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \--set grafana.contextPath=/ \--set prometheus.ingress.enabled=true \--set prometheus.ingress.hosts={"pr.xxxx.com"} \--set prometheus.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \--set prometheus.contextPath=/ \--set tracing.enabled=true \--set tracing.ingress.enabled=true \--set tracing.ingress.hosts={"tracing.xxxx.com"} \--set tracing.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \--set tracing.contextPath=/ \--set kiali.enabled=true \--set kiali.ingress.enabled=true \--set kiali.ingress.hosts={"kiali.xxxx.com"} \--set kiali.ingress.annotations={"kubernetes.io/ingress.class: traefik"} \--set kiali.contextPath=/ \--set kiali.dashboard.viewOnlyMode=true \--set kiali.dashboard.grafanaURL=http://gr.xxxx.com \--set kiali.dashboard.jaegerURL=http://tracing.xxxx.com \--set kiali.createDemoSecret=true \--set istio_cni.enabled=true \--set istio-cni.cniBinDir=/apps/cni/bin \--set istio-cni.excludeNamespaces={"istio-system,monitoring,kubernetes-dashboard,kube-system"} \--set global.k8sIngress.enabled=true \--set global.proxy.clusterDomain="xxxx.local" \--set global.proxy.accessLogFile="/dev/stdout" \--set global.proxy.logLevel="info" \--set global.disablePolicyChecks=false \--set global.proxy.autoInject=disabled# istio-cni 安装helm install install/kubernetes/helm/istio-cni --name-template istio-cni --namespace istio-system \--set cniBinDir=/apps/cni/bin \--set excludeNamespaces={"istio-system,monitoring,kubernetes-dashboard,kube-system"}最新 展示截图
kiali
jaeger
grafana

配置
升级
域名
路径
服务
对外
空间
参数
文件
检查
版本
不用
宿主
宿主机
日志
目录
策略
账号
集群
代理
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
罗湖区网络技术转移服务电话
网络安全宣传周手抄报时代少年团
质量好软件开发厂家
一直提供企业内网网络安全
2020年网络安全感
数据库的创建与维护体会
软件开发运营需要什么资质
工商注册计算机软件开发
服务器或dns错误怎么处理
两个数据库的查询
学生关注网络安全照片模板
如何构建网络安全生态环境
建设银行软件开发中心面试
销售网络技术合作
欧洲生物生物学数据库
数据库可以以什么符号结尾
江苏智能化软件开发方法
广州码云互联网科技公司
计算机网络技术期末考试
广州凡传互联网科技有限公司
云服务器架设传奇外网连接不上
软件开发数据处理
扫码打印软件开发
游戏运营服务器管理系统
网络安全时事件
网络安全清理方案
阿里巴网络技术广州分部
希捷服务器硬盘
软件开发有什么进项
软件连接数据库失败