Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registry-creds addon: Temporary Error: secrets "registry-creds-ecr" not found #5885

Closed
detlef-brendle opened this issue Nov 11, 2019 · 12 comments · Fixed by #6380
Closed

registry-creds addon: Temporary Error: secrets "registry-creds-ecr" not found #5885

detlef-brendle opened this issue Nov 11, 2019 · 12 comments · Fixed by #6380
Assignees
Labels
addon/registry-creds registry-creds issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@detlef-brendle
Copy link

detlef-brendle commented Nov 11, 2019

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"

Then running ecr credentials fails:

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

@priyawadhwa priyawadhwa added the kind/support Categorizes issue or PR as a support question. label Nov 11, 2019
@priyawadhwa
Copy link

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!

@priyawadhwa priyawadhwa added addon/registry-creds registry-creds issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Nov 11, 2019
@detlef-brendle
Copy link
Author

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

@MalgAmoe
Copy link

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.

@priyawadhwa
Copy link

Thanks for the tip @MalgAmoe. @detlef-brendle, does v1.4.0 work for you?

@detlef-brendle
Copy link
Author

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

@tstromberg
Copy link
Contributor

I havent' looked into this, but I'm betting this is related to:

c9c4a8f#diff-b9bd799b523100f1bc7d8b18c23df5e3

Any thoughts @reegnz?

@tstromberg tstromberg added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/backlog Higher priority than priority/awaiting-more-evidence. labels Nov 20, 2019
@tstromberg tstromberg changed the title ERROR creating registry-creds-ecr secret: Temporary Error: secrets "registry-creds-ecr" not found registry-creds addon: Temporary Error: secrets "registry-creds-ecr" not found Nov 20, 2019
@segevfiner
Copy link

segevfiner commented Dec 16, 2019

Workaround

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.

@cvgaviao
Copy link

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 ?

@segevfiner
Copy link

Just create empty secrets like I showed in #5885 (comment), and then run configure, configuring only the secrets you need.

@guillomep
Copy link

By looking at the code, maybe the issue is due to a change at this line

secret, err := secrets.Get(name, meta.GetOptions{})
if err != nil {
return &retry.RetriableError{Err: err}
}

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.

@akshaysu12
Copy link
Contributor

/assign

@somnathpawar
Copy link

Workaround

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.

This works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon/registry-creds registry-creds issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants