SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. echo "Kubernetes Context: $1"
  4. echo "-- LOADBALANCERS --"
  5.  
  6. LOADBALANCERS=`kubectl get svc --context $1 | grep LoadBalancer | awk '{print $1}'`
  7.  
  8. for LOADBALANCER in $LOADBALANCERS; do
  9.   echo $LOADBALANCER
  10.   PRIVATE=`kubectl get svc --context $1 $LOADBALANCER -o jsonpath='{.metadata.annotations.service\.beta\.kubernetes\.io\/aws-load-balancer-internal}'`
  11.   if [ -z "$PRIVATE" ]; then
  12.     echo "NOT PRIVATE!"
  13.   fi
  14. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top