-
Notifications
You must be signed in to change notification settings - Fork 5
/
3-busyboxes
executable file
·15 lines (11 loc) · 1.04 KB
/
3-busyboxes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
kubectl run --expose=true --port=8000 --image=crccheck/hello-world --labels='app=busybox' --namespace default busybox
kubectl run --expose=true --port=8000 --image=crccheck/hello-world --labels='app=busybox' --namespace dev busybox
kubectl run --expose=true --port=8000 --image=crccheck/hello-world --labels='app=busybox' --namespace prod busybox
kubectl patch svc busybox -n default --type json -p '[{"op": "replace", "path": "/spec/ports/0", "value": {"protocol": "TCP", "port": 80, "targetPort": 8000}}]'
kubectl patch svc busybox -n dev --type json -p '[{"op": "replace", "path": "/spec/ports/0", "value": {"protocol": "TCP", "port": 80, "targetPort": 8000}}]'
kubectl patch svc busybox -n prod --type json -p '[{"op": "replace", "path": "/spec/ports/0", "value": {"protocol": "TCP", "port": 80, "targetPort": 8000}}]'
kubectl scale --replicas=3 deploy -l app=busybox -n dev
kubectl scale --replicas=3 deploy -l app=busybox -n prod
kubectl scale --replicas=3 deploy -l app=busybox -n default
# kubectl get pods -l app=busybox --all-namespaces