alloc-static-ips.sh 451 B

123456789101112131415
  1. #!/bin/bash
  2. # Customize these next 2 for the region of your GKE cluster,
  3. # and your GCP project ID
  4. REGION=us-central1
  5. PROJECT=neo4j-helm
  6. for idx in 0 1 2 ; do
  7. gcloud compute addresses create \
  8. neo4j-static-ip-$idx --project=$PROJECT \
  9. --network-tier=PREMIUM --region=$REGION
  10. echo "IP$idx:"
  11. gcloud compute addresses describe neo4j-static-ip-$idx \
  12. --region=$REGION --project=$PROJECT --format=json | jq -r '.address'
  13. done