一、背景
如二、描述所示pods频繁地重启,导致听云的探针收集规则文件占用大量的空间,需要查询"063915dd-c5b8-4137-9e9c-119488992b56"对应的是哪个pod
听云data下存储的探针收集规则:
二、对应pod查询
kubectl get po -A -o json | \ pipe> jq --arg pod_uuid 063915dd-c5b8-4137-9e9c-119488992b56 -r '.items[] | select(.metadata.uid == $pod_uuid) | "uuid \($pod_uuid) is \(.metadata.name)"' uuid 063915dd-c5b8-4137-9e9c-119488992b56 is fp-mission-api-7bfcd67589-2txkk
三、对应查询听云探针版本
#直接看该deployment的名字xx-mission-api的yaml详细配置看不到听云探针,因为是注入的,所以需要用describe去看 ❯ kubectl -n dev describe pods xx-mission-api-7bfcd67589-2txkk Name: xx-mission-api-7bfcd67589-2txkk ...... Init Containers: ....... Container ID: docker://3d73d4ae6c60d805a84130324f1d62628381dbfa65b8ff775f18b2412cb1c2ad Image: harbor.xxx.com/base/oneagent:2.2.1.0 #听云探针版本 Image ID: docker-pullable://harbor.xxx.com/base/oneagent@sha256:e509daef42976e9baf43ad19a21743298faac9a9024a86c350fd50b688903d0a Port: <none> Host Port: <none> Command: sh Args: -c tar -xzf oneagent.tar.gz -C /oneagent && /oneagent/bin/init
四、听云V2.3.0.0对以上问题的修复
Reference: https://stackoverflow.com/questions/69871895/how-to-map-the-guids-under-var-lib-kubelet-pods-to-the-actual-pods
标签:004k8s,uuid,oneagent,探针,volumes,听云,pod,pods From: https://www.cnblogs.com/itcomputer/p/16999667.html