Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is taken directly from Jorgen Dahle Naess' work to open the machine config daemon log for a certain host,
#!/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