4

I am deploying a k8s cluster locally using Kind. The image gets deployed ok and when I view the list of services I see the following

enter image description here

the service I'm trying to access is chatt-service and if you notice the EXTERNAL-IP is pending. I know minikube has a command which makes this accessible, but how do I do it on a Kind cluster ?

Saurabh
  • 5,176
  • 4
  • 32
  • 46
tmp dev
  • 8,043
  • 16
  • 53
  • 108

2 Answers2

9

for Loadbalancer service type you will not able to get public ip because you're running it locally and you will need to run it in a cloud provider which will provide the LB for you like ALB in aws or LoadBalancer in Digital ocean. however, you can access this service locally using the Kubectl proxy tool.

.

kubectl port-forward service/chatt-service 3002:3002
sameh Ammar
  • 609
  • 4
  • 3
3

There are some additional options to work on LoadBalancer under Kind cluster. (While the port forwarding is the simplest way).

https://kind.sigs.k8s.io/docs/user/loadbalancer/

First way:

You can also expose pods and services using extra port mappings this mean manually set ports in cluster-config.yaml

And maybe second way (but not actually the solution on LoadBalancer):

You may want to check out the Ingress Guide as a cross-platform workaround

Mikhail_Sam
  • 10,602
  • 11
  • 66
  • 102