elasticsearch:v5.5.1-1和 fluentd-elasticsearch:v2.0.1下载镜像失败 imagePullBackOff的解决方法,其他镜像类似

elasticsearch:v5.5.1-1和 fluentd-elasticsearch:v2.0.1下载镜像失败  imagePullBackOff的解决方法,其他镜像类似

 

问题:发现镜像错误:imagePullBackOff

查看容器在哪台主机上运行,查看命令  kubectl get pods -n kube-system  -o wide

elasticsearch:v5.5.1-1和 fluentd-elasticsearch:v2.0.1下载镜像失败  imagePullBackOff的解决方法,其他镜像类似

查看具体错误原因:原来是镜像下载是失败,

使用Kubelet describe 查看日志,一定要带上 命名空间

kubectl describe pod  fluentd-es-v2.0.1-7tgw6 --namespace kube-system

报错: Failed to pull image "gcr.io/google-containers/fluentd-elasticsearch:v2.0.1": rpc error: code = Unknown desc = Error response from daemon: Get https://gcr.io/v2/: net/http: request canceled while waiting for connection

 

gcr.io被防火墙屏蔽了,那就换个国内地方去下载(这里找到2个地方都可以),再下载:

docker pull mirrorgooglecontainers/fluentd-elasticsearch:v2.0.1

(或者  docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/fluentd-elasticsearch:v2.0.1

重新打上标签:

docker tag docker.io/mirrorgooglecontainers/fluentd-elasticsearch:v2.0.1 gcr.io/google-containers/fluentd-elasticsearch:v2.0.1

查看docker images

查看容器是否起来 kubectl get pods -n kube-system  -o wide

都running了,成功

 

其他:

安装这些需要*

k8s.gcr.io/kube-apiserver:v1.14.0
k8s.gcr.io/kube-controller-manager:v1.14.0
k8s.gcr.io/kube-scheduler:v1.14.0
k8s.gcr.io/kube-proxy:v1.14.0
k8s.gcr.io/pause:3.1
k8s.gcr.io/etcd:3.3.10
k8s.gcr.io/coredns:1.3.1

不能*换个方法变通处理一下

docker pull mirrorgooglecontainers/kube-apiserver:v1.14.0
docker pull mirrorgooglecontainers/kube-controller-manager:v1.14.0
docker pull mirrorgooglecontainers/kube-scheduler:v1.14.0
docker pull mirrorgooglecontainers/kube-proxy:v1.14.0
docker pull mirrorgooglecontainers/pause:3.1
docker pull mirrorgooglecontainers/etcd:3.3.10
docker pull coredns/coredns:1.3.1

在重新给下载的打个tag

docker tag docker.io/mirrorgooglecontainers/kube-apiserver:v1.14.0 k8s.gcr.io/kube-apiserver:v1.14.0
docker tag docker.io/mirrorgooglecontainers/kube-controller-manager:v1.14.0 k8s.gcr.io/kube-controller-manager:v1.14.0
docker tag docker.io/mirrorgooglecontainers/kube-scheduler:v1.14.0 k8s.gcr.io/kube-scheduler:v1.14.0
docker tag docker.io/mirrorgooglecontainers/kube-proxy:v1.14.0 k8s.gcr.io/kube-proxy:v1.14.0
docker tag docker.io/mirrorgooglecontainers/pause:3.1 k8s.gcr.io/pause:3.1
docker tag docker.io/mirrorgooglecontainers/etcd:3.3.10 k8s.gcr.io/etcd:3.3.10
docker tag docker.io/coredns/coredns:1.3.1 k8s.gcr.io/coredns:1.3.1

这样就不需要*下载了。

-----------------------------------------------------------------------------------------

上一篇:fluentd 安装、配置、使用介绍


下一篇:[从零开始学Kubernetes] 10.Kubernetes的DaemonSet