starting with a fresh cluster on Ubuntu 19.10 using VirtualBox
minikube start
(all is starting fine)
๐ minikube v1.5.2 on Ubuntu 19.10
โจ Automatically selected the 'virtualbox' driver (alternates: [none])
๐ฟ Downloading VM boot image ...
minikube-v1.5.1.iso.sha256: 65 B / 65 B [--------------] 100.00% ? p/s 0s
minikube-v1.5.1.iso: 143.76 MiB / 143.76 MiB [-] 100.00% 3.09 MiB p/s 47s
๐ฅ Creating virtualbox VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
๐ณ Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
๐พ Downloading kubeadm v1.16.2
๐พ Downloading kubelet v1.16.2
๐ Pulling images ...
๐ Launching Kubernetes ...
โ Waiting for: apiserver
๐ Done! kubectl is now configured to use "minikube"
minikube addons configure registry-creds
(entering all data for ECR)
โ ERROR creating registry-creds-ecr secret: Temporary Error: secrets "registry-creds-ecr" not found
โ ERROR creating registry-creds-gcr secret: Temporary Error: secrets "registry-creds-gcr" not found
โ ๏ธ ERROR creating registry-creds-dpr secret
โ
registry-creds was successfully configured
After this procedure no secret has been setup and therefore image Pull fails.
Any Idea ?
Thanks,
detlef
Hey @detlef-brendle thanks for opening this issue.
Based on this comment it looks like you need to run the following to configure ecr credentials:
minikube addons configure registry-creds creates the initial secret
minikube addons enable registry-creds runs the registry creds addon
However, if the secret isn't being created after the first command I suspect the second won't do anything. Perhaps you could try both commands again after a fresh minikube delete and minikube start? If anyone has any idea why this may be happening, please chime in!
Hi @priyawadhwa.
I tried it again ang it fails with the same error than before.
โ ERROR creating registry-creds-ecr secret: Temporary Error: secrets "registry-creds-ecr" not found
โ ERROR creating registry-creds-gcr secret: Temporary Error: secrets "registry-creds-gcr" not found
โ ๏ธ ERROR creating registry-creds-dpr secret
โ
registry-creds was successfully configured
I had the exact same problem, I downgraded to the 1.4.0 as a coworker had that version, and that fixed the problem for me.
Thanks for the tip @MalgAmoe. @detlef-brendle, does v1.4.0 work for you?
Yes, 1.4.0 works fine.
So it seems there is an error in the latest version.
Can you put that on your roadmap ?
Thanks,
detlef
I havent' looked into this, but I'm betting this is related to:
https://github.com/kubernetes/minikube/commit/c9c4a8fbb93fe3ee8bb00ecd6bffc055b52c297e#diff-b9bd799b523100f1bc7d8b18c23df5e3
Any thoughts @reegnz?
kubectl -n kube-system create secret generic registry-creds-ecr
kubectl -n kube-system create secret generic registry-creds-gcr
kubectl -n kube-system create secret generic registry-creds-dpr
And then:
minikube addons configure registry-creds
Looks like the code is failing to create the secrets if they don't already exists.
In my case I just wanted to use my own private registry, so I answer noto ECR and GCR questions. but k8s is complaining about a gcr and not deploying the registry-creds :
secret "registry-creds-gcr" not found
MountVolume.SetUp failed for volume "gcr-creds" : secret "registry-creds-gcr" not found
any workaroud for this ?
Just create empty secrets like I showed in https://github.com/kubernetes/minikube/issues/5885#issuecomment-566131944, and then run configure, configuring only the secrets you need.
By looking at the code, maybe the issue is due to a change at this line https://github.com/kubernetes/minikube/blob/d1151d93385a70c5a03775e166e94067791fe2d9/pkg/minikube/service/service.go#L342-L345
Before 1.5.0, the code didn't check the error on secrets.Get, now if there is an error, it returns.
Since the Go API returns an error if there is no secret, then the create function ends.
/assign
Most helpful comment
Workaround
And then:
Looks like the code is failing to create the secrets if they don't already exists.