0

Unable to connect to Zalenium service from my Kubernetes cluster:

I am trying to get the external IP of the zalenium service that I have created via my Kubernetes cluster. I am getting the following :

$ kubectl get services --namespace zalenium
NAME       TYPE       CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
zalenium   NodePort   172.21.187.0   <none>        80:30190/TCP   58m

Can anyone help me how to get the EXTERNAL-IP please?

Shudipta Sharma
  • 5,178
  • 3
  • 19
  • 33
Sayom
  • 147
  • 1
  • 2
  • 7
  • 1
    Which cluster are you using or trying? Is it minikube cluster or GKE or Azure or AWS or something others? – Shudipta Sharma Oct 12 '19 at 08:45
  • 1
    I agree with @ShudiptaSharma and you should also post the output of `kubectl -n zalenium -o yaml svc` because (for clarity) a `Service` of type `NodePort` will not acquire an external IP -- only a `Service` of type `LoadBalancer` will do that – mdaniel Oct 12 '19 at 16:23
  • @ShudiptaSharma I am using IKS cluster – Sayom Oct 14 '19 at 06:18
  • Hi @MatthewLDaniel, I am posting you the output of the yaml of the Zalenium service for your easy reference purpose:"spec": { "ports": [ { "name": "hub", "protocol": "TCP", "port": 80, "targetPort": 4444, "nodePort": 30190 } ], "selector": { "app.kubernetes.io/instance": "zalenium", "app.kubernetes.io/name": "zalenium" }, "clusterIP": "172.21.187.0", "type": "NodePort", "sessionAffinity": "None", "externalTrafficPolicy": "Cluster" }, "status": { "loadBalancer": {} } – Sayom Oct 14 '19 at 06:38
  • Hi @MatthewLDaniel, can you please what changes I need to do here please so that I can get the External-IP....thanks – Sayom Oct 14 '19 at 06:40
  • Don't post code in the comments, use [the edit link](https://stackoverflow.com/posts/58351510/edit) to update your post. As I mentioned, `NodePort` services do not assign themselves any external IP because that's not their job. If you want an external IP, use a service of type `LoadBalancer`. Right now, **every** Node in your cluster is listening on port 30190 and forwarding traffic to every Pod that matches that selector – mdaniel Oct 14 '19 at 07:28
  • Hi @mdaniel, can you kindly show with some example please how to achieve the same? Tnx. – Sayom Oct 14 '19 at 09:02
  • @Sayom please provide output of `kubectl get svc zalenium -n zalenium -o yaml` and add it to your question. Also did you use `kubectl expose` or just used yaml? – PjoterS Oct 14 '19 at 14:16
  • Hi @PjoterS, here is the output: spec: clusterIP: 172.21.187.0 externalTrafficPolicy: Cluster ports: - name: hub nodePort: 30190 port: 80 protocol: TCP targetPort: 4444 selector: app.kubernetes.io/instance: zalenium app.kubernetes.io/name: zalenium sessionAffinity: None type: NodePort status: loadBalancer: {} – Sayom Oct 15 '19 at 06:40
  • Hi @PjoterS, any updates on this please? – Sayom Oct 17 '19 at 09:23
  • Hi All,Any update on this issue please? – Sayom Oct 18 '19 at 08:02

0 Answers0