Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created January 23, 2019 20:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ipedrazas/403df2ed30ea8682e2b709ddc1c24bcf to your computer and use it in GitHub Desktop.
Save ipedrazas/403df2ed30ea8682e2b709ddc1c24bcf to your computer and use it in GitHub Desktop.
curl internal service kubernetes kubectl proxy
# To call from outside the cluster a service type `ClusterIP`
# We use `kubectl proxy`
kubectl proxy
# Then, the service can be accessed by calling:
curl http://localhost:8001/api/v1/namespaces/status/services/x01-kstatus-api:5000/proxy/api/jobs
# This is
# curl http://localhost:8001/api/v1/namespaces/[NAMESPACE]/services/[SERVICE:PORT]/proxy/[QUERY_STRING]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment