1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| cat <<EOF | kubectl apply -f - apiVersion: apps/v1 kind: Deployment metadata: name: monolith spec: replicas: 3 strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 selector: matchLabels: app: monolith template: metadata: labels: app: monolith spec: containers: - name: monolith image: gcr.io/${GOOGLE_CLOUD_PROJECT}/monolith:2.0.0 ports: - containerPort: 8080 EOF
kubectl get deployment monolith -o yaml
kubectl edit deployment monolith
kubectl patch deployment monolith \ -p '{"spec":{"template":{"spec":{"containers":[{"name":"monolith","image":"gcr.io/PROJECT/monolith:3.0.0"}]}}}}'
|