This file contains 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
#!/bin/bash | |
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' jq|grep "install ok installed") | |
if [ "" == "$PKG_OK" ]; then | |
sudo apt-get --force-yes --yes install jq | |
fi | |
kubectl get pods --all-namespaces --show-all --output=json |\ | |
jq -r '.items[] | select(.metadata.labels.rmJobType == "preflight") | select(.status.phase == "Failed") | .metadata.namespace, .metadata.name ' |\ | |
xargs -n2 > pods.txt |
This file contains 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
#!/bin/bash | |
sudo apt-get install jq --assume-yes | |
# get namespace | |
PROXY_NS=$(kubectl get pods --all-namespaces --show-all --output=json | jq -r '.items[] | select(.metadata.name | contains("hsc-proxy")) | .metadata.namespace ' ) | |
# get pod name | |
PROXY_POD=$(kubectl get pods --all-namespaces --show-all --output=json | jq -r '.items[] | select(.metadata.name | contains("hsc-proxy")) | .metadata.name ' ) | |
echo Current state of /etc/resolv.conf on $PROXY_NS/$PROXY_POD |
NewerOlder