步骤1 sudo $(aws ecr get-login --no-include-email --region xx-xxxx-x)
第2步 curl -LSs https://github.com/fermayo/ecr-k8s-secret/raw/master/gen-secret.sh | bash -
第 3 步 kubectl describe secret aws-ecr-credentials
Name: aws-ecr-credentials
Namespace: default
Labels: <none>
Annotations: <none>
Type: kubernetes.io/dockerconfigjson
Data
.dockerconfigjson: 32 bytes
第4步 kubectl describe pod x
警告 Failed 5s kubelet, ip-10-46-250-151 Failed to pull image "my-account.dkr.ecr.us-east-1.amazonaws.com/my-image:latest": rpc error: code = Unknown desc = 来自守护程序的错误响应:获取https://my-account.dkr.ecr.us-east-1.amazonaws.com/my-image/latest:没有基本身份验证凭据
为什么 pod 拉不下图片?