question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

service/elasticsearch-master Type LoadBalancer stuck in <pending>

See original GitHub issue

Hi,

When deploying with --set service.type=LoadBalancer, the service/elasticsearch-master is stuck in <pending> state for External-IP.

# helm install elasticsearch elastic/elasticsearch   --set service.type=LoadBalancer,antiAffinity="soft"
NAME: elasticsearch
LAST DEPLOYED: Fri May 29 10:29:44 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Watch all cluster members come up.
  $ kubectl get pods --namespace=default -l app=elasticsearch-master -w
2. Test cluster health using Helm test.
  $ helm test elasticsearch --cleanup
# kubectl get all
NAME                         READY   STATUS    RESTARTS   AGE
pod/elasticsearch-master-0   1/1     Running   0          29m
pod/elasticsearch-master-1   1/1     Running   0          29m
pod/elasticsearch-master-2   1/1     Running   0          29m

NAME                                    TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                         AGE
service/elasticsearch-master            LoadBalancer   10.43.169.130   <pending>     9200:30470/TCP,9300:30571/TCP   29m
service/elasticsearch-master-headless   ClusterIP      None            <none>        9200/TCP,9300/TCP               29m
service/kubernetes                      ClusterIP      10.43.0.1       <none>        443/TCP                         23h

NAME                                    READY   AGE
statefulset.apps/elasticsearch-master   3/3     29m

Elasticsearch version is 7.7.0 :

# helm list
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
elasticsearch   default         1               2020-05-29 10:29:44.676001708 -0400 EDT deployed        elasticsearch-7.7.0     7.7.0      

My setup is single node with Rancher:latest as a cluster.

# kubectl get nodes
NAME       STATUS   ROLES                      AGE   VERSION
xxxxxxxx   Ready    controlplane,etcd,worker   23h   v1.17.5

My repo is :

# helm repo list
NAME    URL                    
elastic https://helm.elastic.co
# helm version
version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}

Thank you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
erouvincommented, Jun 3, 2020

Thank you @jmlrt I gave it a shot with NodePort and the behavior is similar to LoadBalancer except that the deployment controls the port number to connect to from outside using the baremetal IP. But in the end, no more <pending> printout. I was using service.type wrong. NodePort fits better to my case.

0reactions
jmlrtcommented, Jun 3, 2020

Service type LoadBalancer is supported only on some cloud providers to allow provisioning an external Load Balancer in the cloud infrastructure (example provisioning ELB when using K8S on AWS). I supposed that this not something which is possible on K8S bare metal. If you only need to access your Elasticsearch cluster from inside K8S, you should use ClusterIP type. If you need to access it from resources outside K8S, you should use NodePort type (more details here).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kubernetes LoadBalancer IP Stuck in Pending | by Paul Boone
The most common solution is to manually assign an external IP to the Service. This can be done in the Service's YAML configuration....
Read more >
LoadBalancer service stuck in pending state while creating a ...
This issue occurs when you reach the virtual server limit on the LB. if the cluster is using SMALL LB, then limit is...
Read more >
elastic/elasticsearch: pods stuck in pending state with ...
Installation is successful, but now pods are stuck in pending state ... Type Status PodScheduled False Volumes: elasticsearch-master: Type: ...
Read more >
Making configuration changes in Amazon OpenSearch Service
Changing instance type. Enabling fine-grained access control. Performing service software updates. If your domain doesn't have dedicated master nodes, ...
Read more >
Create an External Load Balancer - Kubernetes
In usual case, the correlating load balancer resources in cloud provider should be cleaned up soon after a LoadBalancer type Service is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found