`static pod` does not show in the pixie
Describe the bug
The issue is original come from #392 , since the title of that issue is about kubeadm, it will lead some misunderstanding, so I open a new issue to clarify the issue.
The problem is there is no any information of static pods in pixie. on matter with script http_data or pods.
I cannot found kube-apiserver, kube-controller-manager, etcd or kube-scheduler in the ns kube-system in pixie.
That's not make sense, from my point of view, the kube-apiserver should be very import in the monitor of a k8s cluster.
Additional context As @aimichelle mentioned here: https://github.com/pixie-io/pixie/issues/392#issuecomment-1023761764
The cgroup path of static pod is different with normal pods.
I check some code in kubelet, for static pod, the uid is generator by kubelet not kube-apiserver(still not existed), see here:
https://github.com/kubernetes/kubernetes/blob/807cee8ad204af0e32d8bc41e6277cc1dd88a222/pkg/kubelet/config/common.go#L68
and annotation: kubernetes.io/config.hash been assigned by the uid, see
https://github.com/kubernetes/kubernetes/blob/807cee8ad204af0e32d8bc41e6277cc1dd88a222/pkg/kubelet/config/common.go#L87
That's means the cgroup path of the static pod is correct, since the rule is /sys/fs/cgroup/cpu,cpuacct/kubepods/pod<Pod UID>
But the problem is when kubelet try to create mirror pod for these static pods, something changed, I mean some meta data(UID) is updated. see here:
https://github.com/kubernetes/kubernetes/blob/807cee8ad204af0e32d8bc41e6277cc1dd88a222/pkg/kubelet/pod/pod_manager.go#L43
seems it's by design that the mirror pod has different UID with its its static counterpart.
I have no idea why but I guess we have to adopt annotation kubernetes.io/config.hash for static pod tracing.
Any process for the issue @@aimichelle