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

minikube can't re-configure ingress to use a different ssl certificate #12896

Closed
LanDinh opened this issue Nov 8, 2021 · 4 comments · Fixed by #12897
Closed

minikube can't re-configure ingress to use a different ssl certificate #12896

LanDinh opened this issue Nov 8, 2021 · 4 comments · Fixed by #12897
Assignees
Labels
addon/ingress kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@LanDinh
Copy link

LanDinh commented Nov 8, 2021

Steps to reproduce the issue:

Tutorial that was followed: https://minikube.sigs.k8s.io/docs/tutorials/custom_cert_ingress/

  1. start minikube locally minikube start
  2. enable ingress minikube addons enable ingress
  3. add the auto-generated certificate in .pem:
  4. kubectl -n kube-system create secret tls mkcert --key ~/.minikube/key.pem --cert ~/.minikube/cert.pem
  5. minikube addons configure ingress
  6. In the prompt to add the certificate: be stupid and have a typo: bogus-namespace/mkcert
  7. Re-enable the ingress:
  8. minikube addons disable ingress
  9. minikube addons enable ingress
  10. Notice the mistake
  11. Try to re-configure the ingress: minikube addons configure ingress
  12. instead of getting the prompt again, it auto-proceeds to ingress was successfully configured <--- this is the bug! Why would I be stuck with this typo forever?

Run minikube logs --file=logs.txt and drag and drop the log file into this issue

Full output of failed command if not minikube start:

@medyagh
Copy link
Member

medyagh commented Nov 8, 2021

cc: @sharifelgamal

@sharifelgamal
Copy link
Collaborator

yeah, I can reproduce this pretty easily, it seems like it's by design:

if cfg.KubernetesConfig.CustomIngressCert == "" {
cfg.KubernetesConfig.CustomIngressCert = AskForStaticValidatedValue("-- Enter custom cert(format is \"namespace/secret\"): ", validator)
}

I agree that calling minikube addons configure ingress should allow for overriding existing config, so I'll add it our short term work to fix.

@sharifelgamal sharifelgamal added addon/ingress kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Nov 9, 2021
@sharifelgamal sharifelgamal added this to the 1.25.0 milestone Nov 9, 2021
@sharifelgamal sharifelgamal self-assigned this Nov 9, 2021
@medyagh
Copy link
Member

medyagh commented Nov 9, 2021

@LanDinh

There is a PR that might fix this issue, here is the link to the binary from a PR that I think might fix this issue, do you mind trying it out ?

http://storage.googleapis.com/minikube-builds/12897/minikube-linux-amd64
http://storage.googleapis.com/minikube-builds/12897/minikube-darwin-amd64
http://storage.googleapis.com/minikube-builds/12897/minikube-windows-amd64.exe

@LanDinh
Copy link
Author

LanDinh commented Nov 10, 2021

I confirm that this is working - I especially like the warning about overwriting an existing certificate :) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon/ingress kind/bug Categorizes issue or PR as related to a bug. 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.

3 participants