Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hartfordfive/2cd190f1e1cd2ecdf04bfee57b34c464 to your computer and use it in GitHub Desktop.
Save hartfordfive/2cd190f1e1cd2ecdf04bfee57b34c464 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