Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

476
Views
LoadBalancer external-ip stuck in pending

I've created a Kubernetes cluster with AWS ec2 instances using kubeadm but when I try to create a service with type LoadBalancer I get an EXTERNAL-IP pending status

NAME         TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)         AGE
kubernetes   ClusterIP      10.96.0.1       <none>        443/TCP         123m
nginx        LoadBalancer   10.107.199.170  <pending>     8080:31579/TCP  45m52s

My create command is

kubectl expose deployment nginx --port 8080 --target-port 80 --type=LoadBalancer

I'm not sure what I'm doing wrong.

What I expect to see is an EXTERNAL-IP address given for the load balancer.

Has anyone had this and successfully solved it, please?

Thanks.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You need to setup the interface between k8s and AWS which is aws-cloud-provider-controller.

apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
nodeRegistration:
  kubeletExtraArgs:
    cloud-provider: aws

More details can be found:

  • https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/
  • https://blog.heptio.com/setting-up-the-kubernetes-aws-cloud-provider-6f0349b512bd
  • https://blog.scottlowe.org/2019/02/18/kubernetes-kubeadm-and-the-aws-cloud-provider/
  • https://itnext.io/kubernetes-part-2-a-cluster-set-up-on-aws-with-aws-cloud-provider-and-aws-loadbalancer-f02c3509f2c2

Once you finish this setup, you will have the luxury to control not only the creation of AWS LB for each k8s service with type LoadBalancer.. But also , you will be able to control many things using annotations.

apiVersion: v1
kind: Service
metadata:
  name: example
  namespace: kube-system
  labels:
    run: example
  annotations:
     service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:xx-xxxx-x:xxxxxxxxx:xxxxxxx/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx #replace this value
     service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
spec:
  type: LoadBalancer
  ports:
  - port: 443
    targetPort: 5556
    protocol: TCP
  selector:
    app: example

Different settings can be applied to a load balancer service in AWS using annotations.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!