Hacker News new | ask | show | jobs
by nsxwolf 1809 days ago
I’d love to know the easiest way to answer this question: “what IP address and port is the microservice pod the CI server just deployed listening on?”
2 comments

Why wouldn't that be determinstic? You should be using a service for that.

    kubectl get svc -l app=<your-app-name>
For the port is trivial: `kubectl get pod <yourpod> --output jsonpath={.spec.ports[*].port}` or if you don't remember the json path just `k get pod <yourpod> |grep Port`.

For the IP address, why do you need that? with k8s dns you can easily find anything by name.