-
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
Sharing TLS config between ingresses #4106
Comments
@itaysk that's correct. If one of the ingresses in the same hostname has a |
This is useful only when you have a wildcard SSL certificate valid for all the hosts you want/need SSL |
The way you describe it didn't work for me, perhaps you could help me troubleshoot? The workload ingress works on HTTP but for HTTPS logs:
The TLS secret must be valid because if I added a rule to the TLS ingress, that path would work on HTTPS. full manifests:TLS ingress: apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingtls
namespace: ingress-nginx
annotations:
kubernetes.io/ingress.class: "kubernetes-nginx"
spec:
tls:
- hosts:
- itaysk.test
secretName: nginx-kube-tls
backend:
serviceName: yo-itaysk-test
servicePort: 80 workload ingress: apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: kubernetes-nginx
name: yo-itaysk-test-kube
namespace: ingress-nginx
spec:
rules:
- host: itaysk.test
http:
paths:
- backend:
serviceName: yo-itaysk-test
servicePort: 80
path: /fff |
Please check the contents of the secret that contains the SSL certificate is valid. |
@aledbf as I mentioned above, the secret is valid and works for termination. If I just added a rule with a path to the |
How are you testing this?
No, because the error I posted in my previous comment if from openssl in nginx, not the ingress controller. Just in case, we have two parts here, we validate the contents of the secret in the controller (Go code) but actually, until you try to use in nginx, there is no way to validate is ok from nginx side. |
adding a rule with a path to the ingtls ingress, then I can access that path using HTTPS. |
Hi @aledbf , I am reproducing this in a fresh Kubernetes cluster, dummy simple workload, and latest version of ingress. not sure what's missing :
I can access the service via the ingress over http
also tried to create |
I was also able to reproduce this issue with 0.24.1. It works with 0.23.0. Seems like a regression. |
to add up on comment from Nitin: we had a integration testcase which was failing and while debugging we reached this ticket here. downgrading the ingress controller to 0.23.0 works. |
If someone can provide a failing e2e test or concrete kubectl commands that reproduces this issue, it would be appreciated. |
I created the issue on my minikube setup using the following steps.
|
I have a question: given this scenario: |
From my initial tests looks like this is fixed - Thanks!! |
I saw in a response to another issue that it's targeted for end of the week, thanks |
What is the answer to this question? |
Is this a request for help?: yes
What keywords did you search in NGINX Ingress controller issues before filing this one?: share tls secret
I have multiple ingress resources matching the same host, each matching a different path. I'm now trying to add TLS to the application, but wouldn't want to add the same TLS configuration to every ingress (that happen to be owned by different people in the organization).
Is there a way to share the TLS configuration between ingresses?
In my trial and error I did reach a state where one of my ingresses that didn't have TLS did HTTPS because another ingress rule for the same host existed with the correct TLS config (I confirmed that by deleting the other ingress observed my TLS-less ingress starts to fail on HTTPS). I though this is by design but couldn't reproduce this behavior, perhaps it worked only because the order of ingress creation worked for the benefit of that scenario.
I am aware of
--default-ssl-certificate
flag but would prefer a solution that didn't involve modifying the ingress controller deployment (for non-technical reasons - separation of duties within the organization)The text was updated successfully, but these errors were encountered: