Pod http connection the best way kubernetes

11/22/2021

What is the best way to connect apps inside same namespace using http protc? I have several options like:

Url in DNS, proxing to ingress controller(then proxing to service): http://name.name.local/

Connect to service without namespace: http://name:5002/

Connect to service with namespace: http://name.namespace:5002

-- phmean21
kubernetes
kubernetes-ingress
kubernetes-pod

1 Answer

11/22/2021

For internal communications, just create the Service resources to make your applications discoverable. Then query them with their service name.

For example, if you create a Service "app" on port 80, you can query http://app:80.

-- Paul Rey
Source: StackOverflow