Forum Topic

Thanks for your participation and contribution.


Back to Kubernetes

AWK Commands

Post a reply
256 views
i90runner1
i90runner1

https://kubernetes.io/docs/reference/kubectl/cheatsheet/#scaling-resources

$ kubectl get pods --all-namespaces | awk '/v3-13-6-1/{print $2}'| xargs kubectl describe pod -n namespace-kubernetes-develop

# Delete all pods matching the awk pattern1 or pattern2
kubectl get pods  -n mynamespace --no-headers=true | awk '/pattern1|pattern2/{print $1}' | xargs  kubectl delete -n mynamespace pod

Last updated

1-1 of 1

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.