How do I attach an aws classic load balancer to th...
# general
w
How do I attach an aws classic load balancer to the cluster node group?
Copy code
const cluster = new eks.Cluster(...)
const nodeGroup = cluster.createNodeGroup(...)
const nodeLoadBalancer = new aws.elb.LoadBalancer(...)
const nodeAutoScalingGroup = nodeGroup.autoScalingGroupName.apply(name => aws.autoscaling.getGroup({ name: name }));
nodeAutoScalingGroup.loadBalancers...? // readonly
w
I don’t exactly have understand the question. The load balancer will be associated with some service, not directly with the node group. You can either create it in your vpc in Pulumi and use its id as input to a Service in Kubernetes, or let Kubernetes create it for you as part of a Service of type LoadBalancer.
w
In our current devops stack, which I'm trying to partially port to Pulumi, we specify the load balancers at the time we create the node ASG.
I've already filed an issue to cover that option: https://github.com/pulumi/pulumi-eks/issues/257
Failing that, I need to attach the ELB to the ASG, like specified at https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html
For whatever reason, we're currently explicitly creating the ELB that's running outside the cluster, rather than letting k8s do it. We also have NGINX ingress controller running inside the cluster.
Eventually I want to try to replace both with the AWS ALB ingress controller, but for now I want to integrate with our existing infra.
@white-balloon-205 so is there a way I can do this, or am I stuck until either the node group options are surfaced or the escape hatch is implemented?