Skip to content

Instantly share code, notes, and snippets.

@Daenyth
Created August 29, 2023 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Daenyth/e33eaec4799a966d0b76cce484ea2661 to your computer and use it in GitHub Desktop.
Save Daenyth/e33eaec4799a966d0b76cce484ea2661 to your computer and use it in GitHub Desktop.
Get exposed port for a kubernetes service
kubectl get svc SERVICENAME --namespace NAMESPACE -o jsonpath='{.spec.ports[?(@.nodePort)].nodePort}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment