Created
December 24, 2020 01:46
-
-
Save neilkuan/b8de7ec141a4bc225448cbac939d6e43 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # get daemonset image name. | |
| $ kubectl get ds ${DS_NAME} -o json -n kube-system | jq -r .spec.template.spec.containers[].image | sort -u | |
| # get specify pod image name. | |
| $ kubectl get pod -n kube-system | grep ${Pod_Name} | awk '{print $1}' | while read x; do kubectl get pod $x -o json -n kube-system | jq -r .spec.containers[].image; done | |
| # force delete pod | |
| $ kubectl delete pods ${Pod_Name} --grace-period=0 --force | |
| # get all namespace pod image name | |
| kubectl get po --all-namespaces -o json | jq -r .items[].spec.containers[].image | sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment