Welcome to the Linux Foundation Forum!

3.5 / 5) Access from Outside the Cluster

Options
lyrad
lyrad Posts: 2
edited November 2023 in LFS258 Class Forum

Create the service again, but this time pass theLoadBalancertype. Check to see the status and note the external portsmentioned. The output will show theExternal-IPaspending. Unless a provider responds with a load balancer it will continue to show as pending.

=> Using AWS, it's staying as pending forever for me...
Anyone experiencing the same issue?
I guess there must be some config to make on the vpc/subnet... Not easy to find resources since most of the internet assume we are using an EKS cluster...

Comments

  • chrispokorni
    chrispokorni Posts: 2,188
    edited November 2023
    Options

    Hi @lyrad,

    On cloud managed Kubernetes clusters or managed Kubernetes platforms the load balancer is seamlessly created for the service. On premises or self managed clusters it is more challenging, but doable.
    I found a short demo on itnext.io that outlines how to run a local load balancer service on premises, that may work on cloud VMs as well.
    Hope this helps.

    Regards,
    -Chris

  • lyrad
    lyrad Posts: 2
    Options

    Hi Chris,

    For AWS, in addition to setting up two EC2 instances in an open security group, you need to set up the "The AWS cloud provider" to allow the k8s cluster to "communicate" with AWS, and create external resources such as an ELB...
    It makes sense, it would be strange if a cluster deployed on some instance in a basic security group with no additional specific IAM roles or policies would be allowed to create and play with resources :).
    Maybe I missed the info in the course, if no that could be added (if using AWS also do this...).

    https://stackoverflow.com/questions/62854796/k8s-expose-loadbalancer-service-giving-external-ip-pending

    https://cloud-provider-aws.sigs.k8s.io/

    I guess using EKS rather than doing a "native" installation on an instance would also work, will try it if I have further issues.

    Thanks!

Categories

Upcoming Training