kubectl get pod names code example
Example: kubectl get only pod name
kubectl get pods --template '{{range .items}}{{.metadata.name}}{{end}}' --selector=app=<CONTAINER-NAME>
//replace <CONTAINER-NAME> with your service container name
kubectl get pods --template '{{range .items}}{{.metadata.name}}{{end}}' --selector=app=<CONTAINER-NAME>
//replace <CONTAINER-NAME> with your service container name