Skip to content

Instantly share code, notes, and snippets.

@Daenyth
Created August 29, 2023 15:03
Show Gist options
  • 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