External ip pending Kubernetes Load balancer
Asked Answered
I

1

14

Hi Installed Kubernetes using kubeadm in centos When i create the deployment using type Load Balancer in yaml file the External Ip is Pending for Kubernetes LB it is stuck in Pending state

NAME         TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes   ClusterIP      10.96.0.1       <none>        443/TCP        13m
service    LoadBalancer   10.101.168.76   <pending>     80:32225/TCP   4m52s
Idiographic answered 1/10, 2019 at 10:21 Comment(6)
What? I don't understand what you are asking...Oden
is this a bare metal installation or are you using some cloud kubernetes provider? if bare metal, you will probably have to set the external ip in your service spec.Embree
Thaq Markus Dresh it is not running in cloud it is installed in Centos using kubeadmIdiographic
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 13m service LoadBalancer 10.101.168.76 <pending> 80:32225/TCP 4m52sIdiographic
@MarkusDresch Can you provide an example ?Reformed
when running on locally, your computer does not know how to provide such ips. you either need to move it to the cloud for the automation to take place, or use tools specific for local work. i know that with minikube you'd need to install the ingress controller, then call minikube tunnel. with kubeadm i suspect there should be something similiar?Cleanup
M
9

Please try to run:

kubectl describe svc <service-name>

And check for errors / warnings.

An example of a possible error is described under the events field in the example output below - (SyncLoadBalancerFailed - could not find any suitable subnets for creating the ELB):

Name:                     some-service
Namespace:                default
Labels:                   <none>
Annotations:              kubectl.kubernetes.io/last-applied-configuration:
                            {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"some-service","namespace":"default"},"spec":{"ports":[{"port":80,...
Selector:                 app=some
Type:                     LoadBalancer
IP:                       10.100.91.19
Port:                     <unset>  80/TCP
TargetPort:               5000/TCP
NodePort:                 <unset>  31022/TCP
Endpoints:                <none>
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type     Reason                  Age                From                Message
  ----     ------                  ----               ----                -------
  Normal   EnsuringLoadBalancer    68s (x8 over 11m)  service-controller  Ensuring load balancer
  Warning  SyncLoadBalancerFailed  67s (x8 over 11m)  service-controller  Error syncing load balancer: failed to ensure load balancer: could not find any suitable subnets for creating the ELB
Metencephalon answered 26/7, 2020 at 21:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.