tls / ingress #9223
Replies: 1 comment
-
I have solved the ingress issue It was an oversight in the values file. I should have checked what the helm chart called my ingressclass before editing the values file.
So based on this, the wrong name was in the values.yaml file and all I needed to do was change the line here:
to
The ingress is now working with my cert. For people who are not sure what to do. Here is small guide. I hope it helps. Note: This is purely a test environment that I using to work things out and now also demonstrating with. this is my test cluster setup
from this point you need to start with creating an ingressclass - note the helm chart here creates the ingressclass as nginx
create the secret from your own certs
Next grab the values.yaml change the following lines in the values file:
To whatever you fancy. Then in the ingress section around line 94 at the time of writing.. change enabled to hash out # Add a line directly below local host with the host name in FQDN format: Next - on the secretName line, type your secret name between the quotes: secretName: "kubernetes-dashboard-certs" so the ingress section will look similar to this:
save your values file and simply re-run the helm chart
You should see the IP address assigned via nginx ingress here:
If you don't see this ingress in the kubernetes-dashboard namespace, make sure the name of your ingressclass correct in the yaml file. Now you can check and test that it works. (my cert is invalid so I still need the -k )
And you can see the certificate here: ( you can see the subject is *.mshome.net which is the self signed, albeit invalid cert I created to test that this works, if you see the fake cert it is not working)
|
Beta Was this translation helpful? Give feedback.
-
Struggling with my onprem BareMetal k8s cluster
Kubectl 1.28.11
Calico v3.28.0
MetallB v0.14.5
I have setup nginx as follows
Version: helm.sh/chart: ingress-nginx-4.11.0
helm install ingress-nginx ingress-nginx/ingress-nginx --set controller.replicaCount=2 --set controller.service.type=LoadBalancer --set defaultBackend.nodeSelector."beta\.kubernetes\.io/os"=linux
I first grabbed a copy of the values.yaml from git.
here is my ingress section:
In the test of the ingress I am still seeing the "Kubernetes Ingress Controller Fake Certificate" despite having secret declared
First question:
Which namespace should this be in
I have tried default / kubernetes-dashboard / kube-system and now I am out of ideas?
its ignoring it and putting the fake cert there instead
I think sub question to that question is:
If I navigate to https://dashboard-ing.mshome.net using a web browser. I actrually get "not secure" message, if I choose to continue anyway or curl -k on the command line,
I hit a 404 not found - nginx
This tells me the ingress is working. But what needs fixing adding or tweaking is beyond my skills!
Second Question:
If I prefer to use a LoadBalancer IP instead of ingress to expose the dashboard, how would I define the TLS in the values file? Or do it post deployment?
Beta Was this translation helpful? Give feedback.
All reactions