I have created a kubernetes service name is test-backend and set is replicas: 3
so It will create 3 podname such as
test-backend-deployment-664c7d6f7f-4tnhc 1/1 Running 0 1h
test-backend-deployment-664c7d6f7f-595dc 1/1 Running 0 1h
test-backend-deployment-664c7d6f7f-dndlt 1/1 Running 0 1h
So how I can identify which pod is active currently ? because If I try each one like :kubectl logs test-backend-deployment-664c7d6f7f-4tnhc
then I can identify which is active so Question is there is another way we can identify ?
I just want to verify which is the current pods is serving so I identify that hostname is same as podname. Thanks I got the solution.
Unless i'm misunderstanding your question, all three pods are active. The service will round robin requests to all 3 instances (by default).