Node Balancer always switches back to TCP from HTTPS after a while
Hi, I have setup my kubernetes cluster with nginx ingress controller to redirect traffic to my services. Also set up certificate and applied it to the nodebalancer created for the nginx ingress. However the nodebalancer always switch back to tcp and I have to set it up again and re apply the certificates. How can this be made permanent at least till my certificate expires and I need update it
1 Reply
tlambert
Linode Staff
In order to use HTTPS you'll need to instruct the NodeBalancer service to what to do using annotations in your configuration files. The Configuring TLS within a Service section of our "Getting Started With LoadBalancing on LKE" guide has some example code snippets like this one you should be able to use to get started:
...
metadata:
annotations:
service.beta.kubernetes.io/linode-loadbalancer-default-protocol: http
service.beta.kubernetes.io/linode-loadbalancer-port-443: '{ "tls-secret-name": "example-secret", "protocol": "https" }'
...
Good luck!