安装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
相关推荐
阿里云云原生13 小时前
欢迎报名丨Alibaba Cloud AgentCore 八城巡回沙龙上海首站开启
云原生
阿里云云原生14 小时前
AgentTeams Dashboard:统一管理团队、项目与资产
云原生·agent
阿里云云原生14 小时前
HiRoute:Jev 模型智能路由实践
云原生
阿里云云原生15 小时前
云栖实录丨面向 AgenticOps 的开源建设:采集标准化、统一语义建模与能力评测
云原生·开源
cubestudio15 小时前
云原生分布式训练怎么调度才不浪费算力?CubeStudio 分布式训练与加速架构解析(CRD+Operator / gang 调度 / 亲和反亲和 / GPU 利用率 / 共享 GPU)
人工智能·云原生·gpu
mengge.cloud16 小时前
1019Namespace ,Contexts ,Kubernetes Pod
运维·服务器·网络·云原生·容器·kubernetes·云计算
阿里云云原生16 小时前
从单点探索到规模化运营:滔搏体育的企业级多智能体实践
云原生
暖核19 小时前
从零理解 Kubernetes Pod:命名空间、生命周期、Pause 容器详解
云原生·容器·kubernetes
.冰块.1 天前
VMware+Ubuntu24.04 kubeadm 部署 K8s 1.30.2 三节点集群
运维·云原生·容器·kubernetes·k8s·容器编排
分布式存储与RustFS2 天前
RustFS 该跟 stable 还是 nightly?两条版本线的分工、风险与回退,一张表说清
运维·云原生·开源·对象存储·分布式存储·s3·性能基准