Is there a way to let docker/kubelet to log the labels of a pod in the log? What is the configuration?
For now, we can only get the labels of a running pod, if a pod is gone, you cannot use kubectl/docker describe to get the metadata of a pod.
I am trying to get the metadata especially the labels of a pod that already diminished
I think that I found the answer by myself.
There is no direct way to log the metadata for a pod in the log. Based on the documents in K8s, there are 2 ways