Oleksandr Onopriienko
Oleksandr Onopriienko

Reputation: 139

Make a direct call to Kubernetes pod

I have several pods running inside the Kubernetes cluster. How I can make http call to a specific Pod, without calling LoadBalancer service?

Upvotes: 1

Views: 3308

Answers (1)

gohm'c
gohm'c

Reputation: 15528

...make http call to a specific Pod, without calling LoadBalancer service?

There are several ways, try kubectl port-forward <pod name> 8080:80, then open another terminal and you can now do curl localhost:8080 which will forward your request to the pod. More details here.

Upvotes: 3

Related Questions