How can I make the NodeBalancer use different ports with LKE?
so I've got a NodeBalancer with LKE, all good so far… I ran the following and it created it:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx
(Linode docs are wrong for this… https://www.linode.com/docs/guides/how-to-configure-load-balancing-with-tls-encryption-on-a-kubernetes-cluster/)
So now I have it listening on port 80/443 which is great, but I also need a few more ports. I'm aware I can simply create a NodePort service on a high port and point to it by modifying the configuration in my NodeBalancer
But there must be a more kubernetes friendly way to do this, right?
1 Reply
Okay… a slight update, I figured I could add LB into services like this with annotations:
service.beta.kubernetes.io/linode-loadbalancer-port-25: |
{
"protocol": "tcp"
}
service.beta.kubernetes.io/linode-loadbalancer-proxy-protocol: "v2"
However it now creates me a whole new NodeBalancer… which isn't what I want as it's costing me :(
Also, if I add them manually a service account comes in and wipes them every few days… so that's a no go as well.