安装Service Mesh(Istio)在dockers desktop的问题

在通过手动安装(Releases · istio/istio)完成istioctl工具后,通过以下命令安装Istio

XML 复制代码
istioctl install --set profile=demo -y

在通过dockers desktop安装过程中总是遇到奇怪的网络下载问题,如:

XML 复制代码
✔ Istio core installed ⛵️
✘ Istiod encountered an error: failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  Deployment/istio-system/istiod (container failed to start: ImagePullBackOff: Back-off pulling image "docker.io/istio/pilot:1.31.0": ErrImagePull: failed to pull and unpack image "docker.io/istio/pilot:1.31.0": failed to resolve reference "docker.io/istio/pilot:1.31.0": unexpected status from HEAD request to http://registry-mirror:1273/v2/istio/pilot/manifests/1.31.0?ns=docker.io: 500 Internal Server Error)
✘ Egress gateways encountered an error: failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  Deployment/istio-system/istio-egressgateway (container failed to start: ContainerCreating: )
✘ Ingress gateways encountered an error: failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  Deployment/istio-system/istio-ingressgateway (container failed to start: ContainerCreating: )
Error: failed to install manifests: 3 errors occurred:
        * failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  Deployment/istio-system/istiod (container failed to start: ImagePullBackOff: Back-off pulling image "docker.io/istio/pilot:1.31.0": ErrImagePull: failed to pull and unpack image "docker.io/istio/pilot:1.31.0": failed to resolve reference "docker.io/istio/pilot:1.31.0": unexpected status from HEAD request to http://registry-mirror:1273/v2/istio/pilot/manifests/1.31.0?ns=docker.io: 500 Internal Server Error)
        * failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  Deployment/istio-system/istio-egressgateway (container failed to start: ContainerCreating: )
        * failed to wait for resource: resources not ready after 5m0s: context deadline exceeded
  Deployment/istio-system/istio-ingressgateway (container failed to start: ContainerCreating: )

这里的解决方案是:

1.打开 Docker Desktop → Settings → Docker Engine ,在 JSON 配置中找到 registry-mirrors 字段,删除或修正无效的地址,只保留如下的镜像地址,然后重启dockers desktop

XML 复制代码
"registry-mirrors": [
    "https://docker.1ms.run",
    "https://docker.m.daocloud.io"
  ]

2.手动安装pilot

XML 复制代码
docker pull docker.io/istio/pilot:1.31.0

# 使用本地策略
istioctl install --set profile=demo --set values.global.imagePullPolicy=IfNotPresent -y

这次安装完成后Istio安装成功,但是但是Egress和Ingress网关却失败了,接下来,我们继续安装

3.手动拉取proxy

XML 复制代码
# 拉取proxy代理
docker pull docker.io/istio/proxyv2:1.31.0

# 删除两个网关 Deployment
kubectl delete deployment istio-ingressgateway -n istio-system
kubectl delete deployment istio-egressgateway -n istio-system

最后在重新安装

XML 复制代码
istioctl install --set profile=demo --set values.global.imagePullPolicy=IfNotPresent -y

这样所有的安装都成功了。验证网关 Pod 状态

XML 复制代码
kubectl get pods -n istio-system -w

在这个过程中如果有安装失败的情况,我们先要清理数据

XML 复制代码
# 卸载
istioctl uninstall --purge -y

# 删除命名空间
kubectl delete namespace istio-system

# 清理 webhook
kubectl delete validatingwebhookconfiguration istio-validator-istio-system 2>$null
kubectl delete mutatingwebhookconfiguration istio-sidecar-injector 2>$null
相关推荐
分布式存储与RustFS10 小时前
浏览器调 RustFS 的 S3 接口被拦下来?两个 CORS 变量分开管 9000 和 9001
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
جيون داد ناالام ميづ11 小时前
五、Nacos 项目实战:企业级微服务落地方案
微服务·云原生·架构
A-刘晨阳2 天前
Kubernetes 查询证书有效期及续签证书(适用于二进制部署)
云原生·容器·kubernetes·证书·cfssl
东风微鸣2 天前
QuePaxa VS Raft:广域网共识,为什么「慢但不停」胜过「快但一抖就死」
分布式·云原生·raft
Z21-X3 天前
云原生运维学习笔记:Kubernetes 自动扩缩容与资源管控实战
运维·笔记·学习·云原生·kubernetes
阿里云云原生3 天前
近期开源的 Durable Harness 对 Always-on 有什么帮助?
云原生
keke.shengfengpolang4 天前
计算机科学与技术专业考证路线:开发、网络、数据分析与云原生的6项选择
网络·云原生·数据分析
你的钉钉响了5 天前
用 kubeadm-ha 部署高可用 Kubernetes 集群
云原生·容器·kubernetes·ansible·高可用集群·kubeadm-ha
威嵌神州5 天前
NXP P2020核心板技术解析:PowerPC架构与VxWorks存量项目迁移指南
嵌入式硬件·微服务·云原生·架构
分布式存储与RustFS6 天前
向量库快照只落在本地盘:换节点恢复时把 RustFS 桶当副本源
运维·云原生·开源·对象存储·分布式存储·s3·性能基准