k8s pod状态 ImagePullBackOff
程序员文章站
2022-03-12 10:19:36
...
[[email protected] hadoop]# kubectl get pods -o wide -n test
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx 0/1 ImagePullBackOff 0 14m 10.244.1.4 hadoop02 <none> <none>
nginx-5984cd8d48-rx4mz 0/1 ImagePullBackOff 0 10m 10.244.1.5 hadoop02 <none> <none>
我是在本地build的镜像,也没有构建本地镜像仓库(以为本地存在镜像就会从本地读取);后发现是从镜像仓库拉取才可以…
[[email protected] k8s]# docker pull registry
...
[[email protected] k8s]# docker run -d -v /registry:/var/lib/registry -p 5000:5000 --restart=always --name registry registry:lastest
############
[[email protected] k8s]# cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"storage-driver": "devicemapper",
"exec-opts": ["native.cgroupdriver=systemd"],
"insecure-registries": ["hadoop03:5000"]
}
[[email protected] k8s]# docker push hadoop03:5000/nginx
################
[[email protected] k8s]# curl hadoop03:5000/v2/_catalog
{"repositories":["nginx"]}
上一篇: linux安装Mysql 8.0环境
推荐阅读
-
K8s~为pod添加sidecar进行日志收集
-
Kubernetes - 从Docker 镜像到K8s Pod操作示例
-
荐 hualinux 进阶 1.9:pod[k8s最小编排单位]及pod本质(整理)
-
.net core i上 K8S(四).netcore程序的pod管理,重启策略与健康检查
-
部署istio官方示例bookinfo,pod的状态是Init:Blocked
-
K8S 将pod中的文件拷贝到本地命令
-
k8s中pod sandbox创建失败"failed to start sandbox container"
-
Pod memory usage in k8s
-
K8s~为pod添加sidecar进行日志收集
-
k8s通过service访问pod(五)