nwcdheap / kops-cn

AWS中国宁夏区域/北京区域,快速Kops部署K8S集群
Apache License 2.0
121 stars 74 forks source link

Istio安装无法拉取镜像 #82

Closed YuTingLiu closed 5 years ago

YuTingLiu commented 5 years ago

参考: https://github.com/nwcdlabs/kops-cn/blob/master/doc/Istio.md#install kubectl -n istio-system get po NAME READY STATUS RESTARTS AGE grafana-7ffdd5fb74-kgg5f 1/1 Running 0 5m45s istio-citadel-555dd547c4-zmzbq 0/1 ImagePullBackOff 0 5m45s istio-egressgateway-7bdf7f7d59-bskj7 0/1 ImagePullBackOff 0 5m45s istio-galley-ccd674b65-bq2dp 0/1 ContainerCreating 0 5m45s istio-grafana-post-install-w87jf 0/1 ContainerCreating 0 5m45s istio-ingressgateway-76d7965b66-c57sb 0/1 ImagePullBackOff 0 5m45s istio-pilot-7d8b979947-nw5lg 0/2 ImagePullBackOff 0 5m45s istio-policy-7c4d56cd6d-dbw9r 0/2 ImagePullBackOff 0 5m45s istio-sidecar-injector-7664c64dd7-zgbkf 0/1 ContainerCreating 0 5m45s istio-telemetry-845b98f76b-kh4dj 0/2 ImagePullBackOff 0 5m45s prometheus-65d6f6b6c-zwvkg 1/1 Running 0 5m45s

是什么原因?是否需要手动修改hub地址?

YuTingLiu commented 5 years ago

问题有两个:

  1. 使用release安装包:https://github.com/istio/istio/releases/tag/1.0.5,这个包中有crds.yaml,但是values.yaml中没有globla.hub参数,所以helm安装时无法拉取到镜像
  2. 使用git repo,没有crds.yaml.尝试 https://istio.io/docs/setup/kubernetes/install/helm/#uninstall helm template install/kubernetes/helm/istio-init --name istio-init --namespace istio-system | kubectl apply -f - kubectl apply -f install/kubernetes/helm/istio-init/files 两个方法 仍然: NAME READY STATUS RESTARTS AGE grafana-7869478fc5-tcfcv 1/1 Running 0 21m istio-citadel-76f9bf955f-zbzvg 0/1 ImagePullBackOff 0 21m istio-galley-6b9d5bc9c7-xr4l8 0/1 ContainerCreating 0 21m istio-ingressgateway-5dc97bb6bb-8jtgx 0/1 Running 0 21m istio-init-crd-10-4vfq4 0/1 ImagePullBackOff 0 21m istio-init-crd-11-rd8ql 0/1 ImagePullBackOff 0 21m istio-init-crd-12-88hnt 0/1 ImagePullBackOff 0 21m istio-pilot-6568bc49fd-4vhgj 1/2 Running 5 21m istio-policy-68b6b6657c-t5gxd 1/2 CrashLoopBackOff 11 21m istio-sidecar-injector-7b8c6d66fb-2l29l 0/1 ContainerCreating 0 21m istio-telemetry-6b8dc87c86-c8c5h 1/2 CrashLoopBackOff 11 21m prometheus-5b48f5d49-mmt5m 0/1 ContainerCreating 0 21m
YuTingLiu commented 5 years ago

确定问题,应该是: helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system --set global.hub=937788672844.dkr.ecr.cn-north-1.amazonaws.com.cn/gcr.io/istio-release 使用的hub没有用

pahud commented 5 years ago

這個需要深入看一下具體原因,如果你這邊已經發現原因以及解決方法,歡迎提PR給我們,謝謝!

pahud commented 5 years ago

@YuTingLiu 目前最新Istio release 1.1.7 是有global.hub的

https://github.com/istio/istio/blob/eec7a74473deee98cad0a996f41a32a47dd453c2/install/kubernetes/helm/istio/values.yaml#L111

YuTingLiu commented 5 years ago

這個需要深入看一下具體原因,如果你這邊已經發現原因以及解決方法,歡迎提PR給我們,謝謝!

解决了,gcr.io切换到docker.io就可以了

pahud commented 5 years ago

@YuTingLiu 欢迎对这份文件提交PR改进 https://github.com/nwcdlabs/kops-cn/blob/master/doc/Istio.md#install

让更多人更方便安装

pahud commented 5 years ago

文件更新 - https://github.com/nwcdlabs/kops-cn/blob/master/doc/Istio.md