Skip to content

Instantly share code, notes, and snippets.

@h-sakano
Last active December 28, 2017 07:35
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 h-sakano/a06f9bca89dfe22b6234f068971a8f1a to your computer and use it in GitHub Desktop.
Save h-sakano/a06f9bca89dfe22b6234f068971a8f1a to your computer and use it in GitHub Desktop.
GCPのHTTP(S)ロードバランサでセッションアフィニティを設定する ref: https://qiita.com/h-sakano/items/de23e1d6d4a3e6ce925a
backend_list=(`gcloud compute backend-services list | awk -v ORS=" " '!/NAME/{gsub("\n"," ",$1); print $1 }'`)
for v in "${backend_list[@]}"
do
gcloud compute backend-services update "$v" --session-affinity client_ip --global
done
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: eccube-ingress
namespace:
annotations:
kubernetes.io/ingress.class: "gce"
.
.
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment