24 lines
954 B
Bash
24 lines
954 B
Bash
#!/bin/bash
|
|
|
|
|
|
kubectl scale deployment --all --replicas=0 -n uavcloud-dev
|
|
kubectl scale statefulset --all --replicas=0 -n uavcloud-dev
|
|
|
|
kubectl scale deployment --all --replicas=0 -n uavcloud-devflight
|
|
kubectl scale statefulset --all --replicas=0 -n uavcloud-devflight
|
|
|
|
|
|
kubectl scale deployment --all --replicas=0 -n uavcloud-devoperation
|
|
kubectl scale statefulset --all --replicas=0 -n uavcloud-devoperation
|
|
|
|
export name_space=uavcloud-devflight
|
|
export name_space=uavcloud-devoperation
|
|
export name_space=uavcloud-dev
|
|
|
|
kubectl delete pods -n $name_space --field-selector status.phase!=Running --force
|
|
|
|
kubectl get pods -n $name_space -o json | jq -r '.items[] | select(.status.containerStatuses[0].ready == false) | .metadata.name' | xargs -r kubectl delete pod -n $name_space --force
|
|
|
|
|
|
|
|
/var/lib/docker/containers/8380daef87f894cdc0ba98f0b528c39945f6d5c603129fe68fd7f00132d89001/8380daef87f894cdc0ba98f0b528c39945f6d5c603129fe68fd7f00132d89001-json.log |