Last active 4 months ago

Пример evict'а подов

botanikanet revised this gist 4 months ago. Go to revision

No changes

botanikanet revised this gist 1 year ago. Go to revision

1 file changed, 3 insertions

evict_pod.sh(file created)

@@ -0,0 +1,3 @@
1 + kubectl get pods --field-selector=spec.nodeName=ip-172-25-23-26.eu-west-1.compute.internal --all-namespaces
2 + kubectl drain ip-172-25-23-26.eu-west-1.compute.internal --delete-emptydir-data --pod-selector=app.kubernetes.io/component=admission-controller
3 + for NODE in $(kubectl get nodes --no-headers=true | awk '{print $1}'); do echo "${NODE} $(kubectl get node ${NODE} --show-labels | grep -Eo node_type=[a-z_]+)"; done
Newer Older