Last active
May 28, 2020 13:59
-
-
Save TinyExplosions/6020d48c1347af116afee763451cdf89 to your computer and use it in GitHub Desktop.
This is taken directly from Jorgen Dahle Naess' work to open the machine config daemon log for a certain host,
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 | |
mcdlog(){ | |
host=$1 | |
ns=openshift-machine-config-operator | |
podname=$(oc get pods -o wide --no-headers -n ${ns}| grep ${host} | egrep ^machine-config-daemon | awk '{ print $1 }') | |
oc logs -f ${podname} -c machine-config-daemon -n ${ns} | |
} | |
mcslog(){ | |
host=$1 | |
ns=openshift-machine-config-operator | |
podname=$(oc get pods -o wide --no-headers -n ${ns}| grep ${host} | egrep ^machine-config-server | awk '{ print $1 }') | |
oc logs -f ${podname} -n ${ns} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment