Minikube: ingress addon: "default backend - 404" when HTTPS is used.

Created on 15 Jul 2017  路  27Comments  路  Source: kubernetes/minikube

BUG REPORT

Minikube version: v0.20.0

Environment:

  • OS: Windows 10 Pro (Anniversary Edition)
  • VM Driver: hyperv
  • ISO version: minikube-v0.20.0.iso

What happened:

$ kubectl run hello-world --image=tutum/hello-world:latest --port=80
deployment "hello-world" created

$ kubectl expose deployment hello-world --type=NodePort
service "hello-world" exposed

$ curl $(minikube service hello-world --url)
<html>
<head>
        <title>Hello world!</title>
...

$ minikube addons enable ingress
ingress was successfully enabled

$ curl $(minikube ip)
default backend - 404

So far so good. Created a file minikube-ingress.yaml as so:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: minikube-ingress
  annotations:
spec:
  rules:
  - host: hello.world
    http:
      paths:
      - path: /*
        backend:
          serviceName: hello-world
          servicePort: 80

Added my minikube ip to my hosts file: 192.168.0.25 hello.world

$ kubectl apply -f minikube-ingress.yaml
ingress "minikube-ingress" created

$ curl http://hello.world
<html>
<head>
        <title>Hello world!</title>
...

$ curl -k https://hello.world
default backend - 404

Ok, so I should be able to hit the hello-world service with https. Supposedly the default configuration of the ingress is SSL Termination, with some auto-generated self-signed certs.
I did try hitting this in my browser as well, where I was asked to accept the cert first.
But no matter what, it still goes to the 'default backend' instead of my hello-world service.

Also tried the following configuration:

apiVersion: v1
kind: Secret
metadata:
  name: minikube-ingress-secret
  namespace: default
type: Opaque
data:
  tls.crt: LS0t...
  tls.key: LS0t...

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: minikube-ingress
  annotations:
    ingress.kubernetes.io/rewrite-target: /
    ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
  - secretName: minikube-ingress-secret
  backend:
    serviceName: hello-world
    servicePort: 80

The above ingress definition completely ignores whatever I put in "backend" and just sends everything to the "default backend 404".
I also tried adding the rule from the first config into this, and several other permutations, all with the same results.
I also tried deleting all the resources and creating them again, with no luck.

I've tried deleting all my dns and ingress pods, to see if when they came back it would work. That did not help.

What you expected to happen:
I would expect that I could curl https://hello.world and get back my hello world html results with 200, instead of going to default-backend-404.

I would also expect that I could overwrite what the default backend is by specifying the backend block in the above spec, but it is getting compltely ignored.

And I would also expect that the ssl-redirect would work, yet it seems to also be ignored (http continues to work just fine).

addoingress chyperv good first issue help wanted kinbug lifecyclrotten prioritbacklog 2019q2

Most helpful comment

it seems adding the following made it work for me:

spec:
  tls:
  - hosts:
    - hello.world
  secretName: minikube-ingress-secret

All 27 comments

I'm seeing the same thing. Interestingly, if I kubectl exec -it <ingress-controller-pod> bash and then curl from there, it works. So it seems something is mangling the request before it arrives at the ingress controller?

I can confirm I'm also seeing this. not only does it 404, but it appears to ignore my TLS certs from secret.

it seems adding the following made it work for me:

spec:
  tls:
  - hosts:
    - hello.world
  secretName: minikube-ingress-secret

I'm wondering if minikube addons enable ingress creates some sort of hidden ingress somewhere? Because if I do kubectl port-forward to the ingress and point to localhost, it also works as intended...

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

/remove-lifecycle rotten

Does minikube ingress support https? No matter what I do, I cannot get it to work (I can get http to work). Is there a tutorial anywhere for minikube ingress that shows how to get https to work?

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

I am facing the same issue. my ingress is https://gist.github.com/darkedges/80def8628fa3faa5bb13f0c5d00ed36c

I know it is working as when I hit the http:// address it redirects tohttps://, but I get the backend not found response.

If I kubectl exec -it -n kube-system nginx-ingress-controller-67956bf89d-5c9zx bash I can see my certificates are there

root@nginx-ingress-controller-67956bf89d-5c9zx:/ingress-controller/ssl# ls -lrt
total 20
-rw------- 1 root root 2933 Jul 21 19:48 default-fake-certificate.pem
-rw-r--r-- 1 root root 1659 Jul 21 19:48 default-darkedges.com-full-chain.pem
-rw------- 1 root root 3364 Jul 21 21:18 default-darkedges.com.pem
-rw-r--r-- 1 root root 1659 Jul 21 21:19 default-darkedges-com-tls-full-chain.pem
-rw------- 1 root root 3364 Jul 21 21:58 default-darkedges-com-tls.pem

but in /etc/nginx.conf I can see all my host entries on port 80, but nothing on 443.

Any ideas on what I am doing wrong?

Edit:

Found this via kubectl logs -n kube-system nginx-ingress-controller-67956bf89d-5c9zx
W0721 22:34:37.322152 6 controller.go:1027] Validating certificate against DNS names. This will be deprecated in a future version. W0721 22:34:37.322162 6 controller.go:1032] ssl certificate default/darkedges-com-tls does not contain a Common Name or Subject Alternative Name for host as.tpp.forgerockdev.darkedges.com. Reason: x509: certificate is valid for *.darkedges.com, darkedges.com, not as.tpp.forgerockdev.darkedges.com W0721 22:34:37.322388 6 controller.go:1026] unexpected error validating SSL certificate default/darkedges-com-tls for host as.bank.forgerockdev.darkedges.com. Reason: x509: certificate is valid for *.darkedges.com, darkedges.com, not as.bank.forgerockdev.darkedges.com

So mine is an issue with my certificates not matching.

I am having same issue

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

Still happening. Please don't close. Can someone provide an example where this is working?

A working example would be great indeed. Dropping a line to follow this...

This is working (well... almost):

it seems adding the following made it work for me:

spec:
  tls:
  - hosts:
    - hello.world
  secretName: minikube-ingress-secret

Little change:

spec:
  tls:
  - hosts:
    - hello.world
  - secretName: minikube-ingress-secret

(Notice the last line)

Sweet, the - secretName fixed it for me too

The workarounds seem reasonable. Help wanted to get this into the addon itself!

Hilarious! After moving on to other things and months passing, I decided to try out the work around today. I was just about to report back here that is was working and tstromberg commented.

There is a Software God (or Gods) and a Single Global Cache!

Sweet, the - secretName fixed it for me too
Mee too! After an evening of struggling with 404. Thanks, ametad!

This is working (well... almost):

it seems adding the following made it work for me:

spec:
  tls:
  - hosts:
    - hello.world
  secretName: minikube-ingress-secret

Little change:

spec:
  tls:
  - hosts:
    - hello.world
  - secretName: minikube-ingress-secret

(Notice the last line)

New info! Ingress config change will force ingress to use fake certificate. Site will work but with big browser ssl alarm.

In my case true reason has been in certificate, that was stored in another kubernetes' namespace from ingress. After I put certificate in same namespace, HTTPS worked with default ingress config.

Idea taken from this commentary
kubernetes/ingress-nginx#1984 (comment)

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

/assign rajalokan

If you are using SSL on your host OS with an ingress for a host which only your host OS knows about then you need to generate a certificate for your host if you don't want to get the browser warning. You can do this with omgwtfssl

Then you need to add the the certificate bundle by appending the domain certificate to the CA certificate. Something like this:
cert.pem


-----BEGIN CERTIFICATE-----
MIIDFTCCAf2gAwIBAgIJANCsh/t+pOVJMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
BAMMDXRyYWVmaWsubG9jYWwwHhcNMTkwNDIxMjEwMTA4WhcNMzgwNjIwMjEwMTA4
WjAYMRYwFAYDVQQDDA10cmFlZmlrLmxvY2FsMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAz52mAJzatttj7WgF6J+Z8SD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DIxMjEwMTA4WhcNMzgwNjIwMjEwMTA4
WjAYMRYwFAYDVQQDDA10cmFlZmlrLmxvY2FsMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAz52mAJzatttj7WgF6J+Z8SDyC/bJzXivP64plNGH0Tf3/chP
Nrvsuhdn4EXFJMSl83oL8Zhryw7nTmtuFXSJ5P/deuUvwd9+2SvFnS668Qfe5cM7
8UKmfbcQVQYne6Br8YKXZq3fefvcwYglzx5gqsHxSO797OMaAPKoEbbfYdhkaYu5
5m9qZPzw7cKR3R89mQtLIfK2pWG/f6rJBD46zmBIBo2Ooi4eUAyh9tp0WgZ9QEKy
xPeOe/g6FNB6P55+fQVbUUrJMEdpFcJXV20K6I6EmY+kRzhses+8xUJVBAOIXO8Q
p7DPvRi8opcZV/mWL1VJ/0Ryh9Ck9jL5Y1PavQIDAQABo2IwYDAJBgNVHRMEAjAA
MAsGA1UdDwQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwJwYD
VR0RBCAwHoINdHJhZWZpay5sb2NhbIINdHJhZWZpay5sb2NhbDANBgkqhkiG9w0B
AQsFAAOCAQEAG608z/RhMCylITwcMZZRLGH4qFwNHqtS4r2C+W5Rh5Sww5GD6ifz
VIP/zCHhvcKY4oxDfA6g70sIRPOaJqDZGaalhhZ31x/fBi/wQLQDNuT8zSmrI8IH
IkSYJXpxGLOChKu4ogHslyWUohWeXnK+LUcdVn9geqmu8K8Y/5adRodDf5YLeGQz
z6lfsPDSzYpvjBeeCYmQM5uZKKgbbSddvep5+eJVccSd+xsYbdRWd59Ng8WwqqQt
81w5gyRCK1DEx788EO35hbQJAo7bb+9fIcI81l5IQ27ho3OUMZZTYCl5SVufGArA
tut+iNNoBkNGf4kNwhoYNKJz3fTSlATc0w==
-----END CERTIFICATE-----

You can manually create a secret or there is an option with omgwtfssl to create a kubernetes secret when generating the certificate. It should look like this:

apiVersion: v1
kind: Secret
metadata:
  name: traefik-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nckJnRUZCUWNEQWdZSUt3WUJCUVVIQXdFd0p3WUQKVlIwUkJDQXdIb0lOZEhKaFpXWnBheTVzYjJOaGJJSU5kSEpoWldacGF5NXNiMk5oYkRBTkJna3Foa2lHOXcwQgpBUXNGQUFPQ0FRRUFHNjA4ei9SaE1DeWxJVHdjTVpaUkxHSDRxRndOSHF0UzRyMkMrVzVSaDVTd3c1R0Q2aWZ6ClZJUC96Q0hodmNLWTRveERmQTZnNzBzSVJQT2FKcURaR2FhbGhoWjMxeC9mQmkvd1FMUUROdVQ4elNtckk4SUgKSWtTWUpYcHhHTE9DaEt1NG9nSHNseVdVb2hXZVhuSytMVWNkVm45Z2VxbXU4SzhZLzVhZFJvZERmNVlMZUdRegp6Nmxmc1BEU3pZcHZqQmVlQ1ltUU01dVpLS2diYlNkZHZlcDUrZUpWY2NTZCt4c1liZFJXZDU5Tmc4V3dxcVF0CjgxdzVneVJDSzFERXg3ODhFTzM1aGJRSkFvN2JiKzlmSWNJODFsNUlRMjdobzNPVU1aWlRZQ2w1U1Z1ZkdBckEKdHV0K2lOTm9Ca05HZjRrTndob1lOS0p6M2ZUU2xBVGMwdz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K

The tls.key is the base64 encoded private key
The tls.cert is the base64 encoded bundled certificate

In your ingress specify the certificate name:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: my-traefik-dashboard
  annotations:
    #optional
    ingress.kubernetes.io/ssl-redirect: "true"
spec:
  rules:
    - host: traefik.local
      http:
        paths:
          - backend:
              serviceName: my-traefik-dashboard
              servicePort: 443
  tls:
    - secretName: traefik-local-default-cert

On mac OS you can trust the bundled cert like so

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain bundle.pem

On Linux it is like this

sudo cp bundle.pem /usr/local/share/ca-certificates/traefik.local.bundle.crt
sudo cp cert.pem /usr/local/share/ca-certificates/traefik.local.cert.pem
sudo update-ca-certificates --fresh
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n /usr/local/share/ca-certificates/traefik.local.cert.pem -i /usr/local/share/ca-certificates/traefik.local.cert.pem

Not sure how to do this on windows.

I think there needs to be a PR that explains all this in the documentation since minikube is run locally and people will not expect to get SSL error warnings and this is really the only right way to resolve both the matching and the certificate error warnings in web browsers.

It would be really nice if minikube had a service that ran on the local machine and installed SSL certificates for https ingress resources. But alas no such capability exists. Maybe an addon could do this?

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings