Skip to content

Instantly share code, notes, and snippets.

@gordyt
Created April 24, 2020 19:39
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 gordyt/9b85e39c058b0be343dbcdc8a8e41a99 to your computer and use it in GitHub Desktop.
Save gordyt/9b85e39c058b0be343dbcdc8a8e41a99 to your computer and use it in GitHub Desktop.
tiny script to get the k8s ip address of the specified service
#!/bin/bash
name=$1
namespace=${2:-default}
kubectl -n $namespace get services | grep $name | awk '{print $3}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment