ContainerCreating
当执行kubectl get pod -l app=xxx
时,容器一直处于ContainerCreating状态,
使用kubectl describe pod xxx-xxx
查看pod信息。
kubelet does not have ClusterDNS IP configured and cannot create Pod using “ClusterFirst” policy. Falling back to “Default” policy.
没有启动dns服务,使用命令microk8s.enable dns dashboard
启动dns。
code = Unknown desc = failed pulling image “k8s.gcr.io/pause:3.1”: Error response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
这是由于无法连接到国外服务器造成的,可以先从国内的服务器上拉取相应的镜像,然后修改成相应的版本即可。
1 | docker pull registry.cn-beijing.aliyuncs.com/zhoujun/pause-amd64:3.1 |