Skip to content

Instantly share code, notes, and snippets.

@0xAhmed
Last active October 10, 2017 13:19
Show Gist options
  • Save 0xAhmed/42bfad01ae9b191b5c8006447eaee72d to your computer and use it in GitHub Desktop.
Save 0xAhmed/42bfad01ae9b191b5c8006447eaee72d to your computer and use it in GitHub Desktop.
Get k8s Service IP Address
$ export SERVICE_IP=$(kubectl --namespace=production get service/app-lb --output=json | jq -r '.status.loadBalancer.ingress[0].ip')
$ curl http://$SERVICE_IP/
Congratulations! Version 1.0 of your application is running on Kubernetes.
$ curl http://$SERVICE_IP/version
1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment