LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Containers (https://www.linuxquestions.org/questions/linux-containers-122/)
-   -   Naming resolution on Kubernetes (https://www.linuxquestions.org/questions/linux-containers-122/naming-resolution-on-kubernetes-4175707248/)

mileto 01-31-2022 07:22 PM

Naming resolution on Kubernetes
 
I have a Kubernetes cluster on 3 ubuntu 20.04 servers. Server and client kubernetes versions are v1.23.1
I deployed 2 kubernetes deployments with helm: backend and frontend apps. One app, called backend, has an headless service (with app selector for backend app).
I would like to use headless service name to let frontend to talk with backend.
I did some test but there is something wrong.
The only way to let frontend talk to backend is using such dns name: backend-service-hs.default.svc.cluster.local; if I use "backend-service-hs" (without the fully qualified name), it does not work.
Maybe a sort of DNS resolution problem.
How can I address this issue?

regards,
m.

divyashree 02-07-2022 09:46 AM

Headless service generally used with statefulset deployment. Are you using the headless service with a normal deployment ?

Can you paste your manifest of headless service and deployment ?

Is your headless service metadata.name matching exactly to the deployment spec.servicename.


All times are GMT -5. The time now is 01:54 AM.