Add only specified nodes under LKE load balancer
Hello,
I have a LKE cluster, with a Linode load balancer in front of it, to handle and distribute incoming load.
It's all working ok, but I'd like to keep only specified backend nodes assigned to the load balancer. Let's say only a specific node pool, that would be great.
What I have right now is all the nodes registered under the load balancer, all nodes deployed with an ingress-nginx, thanks to its DaemonSet.
Only solution I see right now is to simply switch to k8s Deployment for the ingress-nginx and configure it with affinity to the specific node pool id. That will keep ingress-nginx pods where I want only.
Those nodes without ingress-nginx pod deployed will fail the load balancer health check and traffic will not be sent there, is that correct?
It's not pretty, but it might work. Or is there a better solution to this?
1 Reply
To ensure your cluster is up to date, there are times when LKE Nodes must be recycled. With this in mind, we cannot guarantee a specific node will be assigned to a specific NodeBalancer.
You said,
"Only solution I see right now is to simply switch to k8s Deployment for the ingress-nginx and configure it with affinity to the specific node pool id. That will keep ingress-nginx pods where I want only."
You do have the ability to assign pods to specific nodes using a few different methods which are compatible with LKE. However, if those nodes need to be recycled, the pod may fail to schedule due to these configurations.
You also asked,
"Those nodes without ingress-nginx pod deployed will fail the load balancer health check and traffic will not be sent there, is that correct?"
Nodes or pods that are not exposed with a service will likely fail any health checks sent their way. Additionally, no public traffic will be sent there.