pod镜像拉取失败
错误信息 no basic auth credentials:
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 4m26s default-scheduler Successfully assigned demolssdl/ks-sample-dev-b9c5fb8d-kjkgm to node2 Normal Pulling 2m53s (x4 over 4m25s) kubelet Pulling image "**:SNAPSHOT-main-11" Warning Failed 2m53s (x4 over 4m25s) kubelet Failed to pull image "**:SNAPSHOT-main-11": rpc error: code = Unknown desc = Error response from daemon: Get **/manifests/SNAPSHOT-main-11: no basic auth credentials Warning Failed 2m53s (x4 over 4m25s) kubelet Error: ErrImagePull Warning Failed 2m39s (x6 over 4m25s) kubelet Error: ImagePullBackOff Normal BackOff 2m26s (x7 over 4m25s) kubelet Back-off pulling image "***"
利用k8s
部署服务时,kubectl get all -o wide 查看到的pod异常运行状态
kubectl describe pod pod-hhja889hkjshaf87yh 最后看到异常信息 Error response from daemon: pull access denied for istio/citadel, repository does not exist or may require ‘docker login判断是未登录或无效造成的
所有节点都需要登录
docker login 后生成/root/.docker/config.json将文件复制到/var/lib/kubelet/config.json