Skip to content

Instantly share code, notes, and snippets.

gcloud compute instance-groups unmanaged create taiwan \
--zone asia-east1-a
gcloud compute instance-groups unmanaged add-instances taiwan \
--instances $(kubectl get nodes \
--context taiwan \
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \
--zone asia-east1-a
gcloud compute instance-groups set-named-ports taiwan \
7003 gcloud compute instances list
7004 gcloud auth login
8152 gcloud compute instances stop instance-2
8153 gcloud config set project dark-caldron-89709
8154 gcloud components update
8155 gcloud compute instances stop instance-2
8156 gcloud compute instances list
8157 gcloud compute instances start instance-2
8189 gcloud compute forwarding-rules list
8190 gcloud compute networks describe default --format json
# kubectl patch service blue-green-service -p '{"spec":{"selector":{"app":"green"}}}'
apiVersion: apps/v1
kind: Deployment
metadata:
name: blue-deployment
spec:
replicas: 4
strategy:
type: RollingUpdate