{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/minikube/issues/2833","repository_url":"https://api.github.com/repos/kubernetes/minikube","labels_url":"https://api.github.com/repos/kubernetes/minikube/issues/2833/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/minikube/issues/2833/comments","events_url":"https://api.github.com/repos/kubernetes/minikube/issues/2833/events","html_url":"https://github.com/kubernetes/minikube/issues/2833","id":325681677,"number":2833,"title":"Cannot pull images from AWS ECR: no basic auth credentials (v0.27.0 minikube)","user":{"login":"ptaillard","id":1677806,"avatar_url":"https://avatars3.githubusercontent.com/u/1677806?v=4","gravatar_id":"","url":"https://api.github.com/users/ptaillard","html_url":"https://github.com/ptaillard","followers_url":"https://api.github.com/users/ptaillard/followers","following_url":"https://api.github.com/users/ptaillard/following{/other_user}","gists_url":"https://api.github.com/users/ptaillard/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaillard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaillard/subscriptions","organizations_url":"https://api.github.com/users/ptaillard/orgs","repos_url":"https://api.github.com/users/ptaillard/repos","events_url":"https://api.github.com/users/ptaillard/events{/privacy}","received_events_url":"https://api.github.com/users/ptaillard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-23T12:25:22Z","updated_at":"2018-05-26T14:35:45Z","closed_at":"2018-05-24T15:40:44Z","author_association":"NONE","body":"**Environment**:\r\n\r\n- **Minikube version** : 0.27.0\r\n- **OS** (e.g. from /etc/os-release): MacOS 10.12.6 High Sierra\r\n- **VM Driver** (e.g. `cat ~/.minikube/machines/minikube/config.json | grep DriverName`): virtualbox\r\n- **ISO version** (e.g. `cat ~/.minikube/machines/minikube/config.json | grep -i ISO` or `minikube ssh cat /etc/VERSION`): v0.26.0\r\n- **Install tools**: homebrew\r\n\r\n**What happened**:\r\nI cannot pull images from the ECR registry: \"no basic auth credentials\" error\r\n\r\n**What you expected to happen**:\r\nI expected to pull the image from the ECR registry after having configured registry-creds with my ID, KEY, TOKEN and AWS Region, and activating the registry-creds addon and using PullSecrets\r\n\r\n**How to reproduce it** (as minimally and precisely as possible):\r\n `minikube start`\r\n`minikube addons configure registry-creds` => configure only with AWS ECR\r\n`minikube addons enable registry-creds`\r\n`kubectl create -f deployment.yaml`\r\n=> The error occured: cannot start the container due to **no basic auth credentials** error.\r\n\r\n`kubectl get secrets --all-namespaces` => we can see that the secret created is in **kube-system** and called **registry-creds-ecr**. I never found the **awsecr-cred** name for the secret as mentioned in the documentation https://github.com/upmc-enterprises/registry-creds\r\n\r\ndeployement.yaml content:\r\n> apiVersion: extensions/v1beta1\r\nkind: Deployment\r\nmetadata:\r\n  name: deployment\r\nspec:\r\n  replicas: 1\r\n  template:\r\n    metadata:\r\n      labels:\r\n        app: <APP>\r\n    spec:\r\n      containers:\r\n        - name: adserver-test\r\n          image: <MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/<IMAGE_TO_PULL>:latest\r\n          command: [\"/bin/bash\"]\r\n          env:\r\n            - name: TMN_ENVIRONMENT\r\n              value: \"qa\"\r\n      imagePullSecrets:\r\n        - name: registry-creds-ecr\r\n\r\n\r\n**Output of `minikube logs` (if applicable)**:\r\n\r\n> May 23 09:53:31 minikube kubelet[3443]: W0523 09:53:31.388519    3443 kubelet_pods.go:878] Unable to retrieve pull secret default/registry-creds-ecr for default/adserver-deployment-654f4668bf-l97n8 due to secrets \"registry-creds-ecr\" not found.  The image pull may not succeed.\r\n\r\n> May 23 09:53:31 minikube kubelet[3443]: I0523 09:53:31.388628    3443 kuberuntime_manager.go:513] Container {Name:adserver-test Image:<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/adserver:latest Command:[/bin/bash] Args:[] WorkingDir: Ports:[] EnvFrom:[] Env:[{Name:TMN_ENVIRONMENT Value:qa ValueFrom:nil}] Resources:{Limits:map[] Requests:map[]} VolumeMounts:[{Name:default-token-27gpt ReadOnly:true MountPath:/var/run/secrets/kubernetes.io/serviceaccount SubPath: MountPropagation:<nil>}] VolumeDevices:[] LivenessProbe:nil ReadinessProbe:nil Lifecycle:nil TerminationMessagePath:/dev/termination-log TerminationMessagePolicy:File ImagePullPolicy:Always SecurityContext:nil Stdin:false StdinOnce:false TTY:false} is dead, but RestartPolicy says that we should restart it.\r\n\r\n> May 23 09:53:32 minikube kubelet[3443]: E0523 09:53:32.229556    3443 remote_image.go:108] PullImage \"<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/adserver:latest\" from image service failed: rpc error: code = Unknown desc = Error response from daemon: Get https://<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/v2/adserver/manifests/latest: no basic auth credentials\r\n\r\n> May 23 09:53:32 minikube kubelet[3443]: E0523 09:53:32.229585    3443 kuberuntime_image.go:51] Pull image \"<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/adserver:latest\" failed: rpc error: code = Unknown desc = Error response from daemon: Get https://<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/v2/adserver/manifests/latest: no basic auth credentials\r\n\r\n> May 23 09:53:32 minikube kubelet[3443]: E0523 09:53:32.229627    3443 kuberuntime_manager.go:733] container start failed: ErrImagePull: rpc error: code = Unknown desc = Error response from daemon: Get https://<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/v2/adserver/manifests/latest: no basic auth credentials\r\n\r\n> May 23 09:53:32 minikube kubelet[3443]: E0523 09:53:32.229648    3443 pod_workers.go:186] Error syncing pod 1d7cad94-5e6f-11e8-962c-0800278cf469 (\"adserver-deployment-654f4668bf-l97n8_default(1d7cad94-5e6f-11e8-962c-0800278cf469)\"), skipping: failed to \"StartContainer\" for \"adserver-test\" with ErrImagePull: \"rpc error: code = Unknown desc = Error response from daemon: Get https://<MY_ACCOUNT_ID_REMOVED_HERE>.dkr.ecr.us-east-1.amazonaws.com/v2/adserver/manifests/latest: no basic auth credentials\"\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/minikube/issues/comments/392265449","html_url":"https://github.com/kubernetes/minikube/issues/2833#issuecomment-392265449","issue_url":"https://api.github.com/repos/kubernetes/minikube/issues/2833","id":392265449,"user":{"login":"ptaillard","id":1677806,"avatar_url":"https://avatars3.githubusercontent.com/u/1677806?v=4","gravatar_id":"","url":"https://api.github.com/users/ptaillard","html_url":"https://github.com/ptaillard","followers_url":"https://api.github.com/users/ptaillard/followers","following_url":"https://api.github.com/users/ptaillard/following{/other_user}","gists_url":"https://api.github.com/users/ptaillard/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaillard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaillard/subscriptions","organizations_url":"https://api.github.com/users/ptaillard/orgs","repos_url":"https://api.github.com/users/ptaillard/repos","events_url":"https://api.github.com/users/ptaillard/events{/privacy}","received_events_url":"https://api.github.com/users/ptaillard/received_events","type":"User","site_admin":false},"created_at":"2018-05-26T14:35:45Z","updated_at":"2018-05-26T14:35:45Z","author_association":"NONE","body":"Ok, I will do that,\r\nThanks"}}
{"actor":{"display_login":"ptaillard"}}