On my worker node top command found that PID: 222906 using a lot of memory.
From this PID, I need to know the pod and namespace name.
Normal “crictl ps” output didn’t show mush information,So I need a simple script.
#!/bin/bashPIX=$(cat /proc/$1/mountinfo |grep hosts |awk -F / {'print $5'})
crictl ps --output json | jq '.[][] | select (.labels["io.kubernetes.pod.uid"] == "'$PIX'")'
get “io.kubernetes.pod.uid” from mountinfo and match it on “crictl ps — output json”.
./podinfo.sh 222906
This is all.