-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
ssl-passthrough returning ingress cert #1947
Comments
I set up basically the same way as the guy from this issue, but I am still getting the I also had to add the |
@paulbdavis do you have the flag |
@paulbdavis are you using |
Yes, script I am using to check the cert cat ~/bin/check-cert
#!/usr/bin/env bash
echo | openssl s_client -showcerts -servername $1 -connect $1:${2:-443} 2>/dev/null | openssl x509 -inform pem -noout -text |
This is the config for the controller itself containers:
- name: nginx-ingress-controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.0
args:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --configmap=$(POD_NAMESPACE)/nginx-configuration
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
- --publish-service=$(POD_NAMESPACE)/ingress-nginx
- --annotations-prefix=nginx.ingress.kubernetes.io
- --enable-ssl-passthrough |
Interestingly, kubectl reports that there is only port 80 open on the passthrough ingress
|
I'm running nginx-ingress 0.10.0 with
I've also tried adding a fake Generated
|
I have the exact same problem. It seem though as passthrough is not working at all. Besides the Fake certificate I also get the default backend while I get the correct backend with HTTP. ( |
Eager to try this out and see if it was fixed by #1945 Is there an image I can use to test it or would I need to build it myself? |
@paulbdavis you can use |
All issues fixed, thanks for the quick response |
SSL passhrough with nginx-ingress-controller:0.10.1 does not fix issue. Please reopen this issue. I am still getting the Kubernetes Ingress Controller Fake Certificate for tls passthrough use case, and ingress controller is terminating TLS at Ingress controller and sending http request to pod. Pod responds with 400 error saying expecting TLS connection |
Here is the ingress.conf for tls pass through: start server nginx-tls-svc.apps.sbox.k8s.com
See the fake certificate being passed in to ingress controller |
openssl s_client -showcerts -servername nginx-tls.svc.apps.sbox.k8s.com -connect tlsterm.apps.sbox.k8s.com:32005 2>/dev/null CONNECTED(00000003) Certificate chain Server certificate No client certificate CA names sent SSL handshake has read 1602 bytes and written 476 bytes New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
|
reopen #1945 |
It's solved when I use 0.10.1. |
@dghubble Could you share your ingress manifest? I am running into problems as you ran previously with 0.10.0. Tls termination works perfectly but with TLS passthrough I am routed to default backend curl -k https://nginx-tls-svc.apps.sbox.k8s.com |
Following the update to 0.10.1 (and now on 0.10.2), the ingress listing is correct compared with before. Pass-through is working for me:
Maybe revisit the ingress resources themselves. |
This image worked for the specific problem I was having
I have not had a chance to test the official 0.10.x images yet though, so I am not sure if they fix it. @sands6 maybe try that and see if it works. Also, I noticed that the passthrough only works if it is a proper SNI request, otherwise the default ingress cert is returned. |
I'm seeing similar behavior to @sands6. Works on version 0.9.0-beta.17 but broken on 0.10.1. On version 0.10.1 I get a 400 error on the backend: Environment: AWS
Ingress controller args:
Ingress object:
Backend nginx deployment, service:
|
@lander2k2 @sands6 The default annotation prefix has changed between beta-17 and 0.10.x version of the ingress-controller, you change the annotation ingress.kubernetes.io/ssl-passthrough: "true" to nginx.ingress.kubernetes.io/ssl-passthrough: "true". Notice the lead "nginx.". If could not change the annotation then you need to pass this additional cli argument to ingress controller "- |
Changed to 0.9.0-beta.17, and then / ingress.kubernetes.io/ssl-passthrough: "true"/ works fine. Tried lot of other options (including 0.10.0), and none of them worked for me. |
When you have |
0.12.0 works fine. However I have some nginx logging issue. there is no event logged when I do curl/query our service behind nginx controller. |
I found out you need to add annotation nginx.ingress.kubernetes.io/secure-backends: "true" |
Secure backends DEPRECATED (since 0.18.0) |
It feels like I'm running into this issue. Here's my (non-working) ingress.yaml: apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/server-alias: ".domain.tld"
# nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
spec:
rules:
- host: "domain.tld"
http:
paths:
- backend:
serviceName: my-service
servicePort: 443 The weird thing is, when I remove the [EDIT] So, this is a working configuration (certificate is coming from the apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: my-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
# nginx.ingress.kubernetes.io/server-alias: ".domain.tld"
# nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
spec:
rules:
- host: "sub.domain.tld"
http:
paths:
- backend:
serviceName: my-service
servicePort: 443 But since I have many subdomains I would rather not have to list each of them in the ingress. This would be a nightmare to maintain. [EDIT #2] [EDIT #3] |
Hi, have you ever figured this out? |
@tacerus If that question was directed at me then I have to disappoint you. I have abandoned this ingress a long time ago. |
I suppose it was, but my setup has since magically started to work fine! |
I managed to get it working for using a gRPC backend service, but I had to configure TLS on the ingress and set the backend-protocol to |
I'm sorry to reply to this old issue. When configuring an ingress object you have to specify your hostnames as lowercase. The Ingress-Objects enforces this. But wenn you try e.g. with the For example:
Also a question if someone can answer it: Is this intended behaviour or a bug? |
Is this a request for help? Yes
What keywords did you search in NGINX Ingress controller issues before filing this one? grpc ssl-passthrough ingress
Is this a BUG REPORT or FEATURE REQUEST? bug?
NGINX Ingress controller version: 0.10.0
Kubernetes version (use
kubectl version
):Environment:
What happened:
openssl s_client
returns cert default ingress certWhat you expected to happen:
openssl s_client
returns cert from applicationHow to reproduce it (as minimally and precisely as possible):
Ingress controller, there is another ingress that does not use
ssl-passthrough
that comes after this one, there is no overlap in thehost
sService for this. The application's gRPC server is listening on 443 as well (previosuly this service forwarded 443 to 10000, changed the gRPC listening port to tes if that was the issue)
To test that the application and service were set up right, I set the service to
type: LoadBalancer
and ranopenssl s_client
against the service's IP directly and the correct cert was returnedThe text was updated successfully, but these errors were encountered: