Generated POD is not listing. How to check logs

Hi Team,
I am not receiving any error while creating POD using definition file; but the POD is not coming in the output of “kubectl get pods”. I performed following steps.

  • Created a Deployment of NGINX image
  • Tried to edit one of the POD part of “Deployment” to change the Container name which created a file in /tmp folder.
  • Deleted the Deployment; which resulted in the deletion of all the PODs.
  • Now creating a single POD with the file stored at /tmp folder. There is no error, but the POD is not listing.

Attaching the snapshot for the reference.

My question is that what could be the reason and how to troubleshoot it. I tried to see the logs of “kubeSheduler POD” but I can see only the following PODs are listed in namespace “kube-system”

controlplane ~ ➜ kubectl get pods --namespace kube-system
NAME READY STATUS RESTARTS AGE
helm-install-traefik-crd–1-gl7ss 0/1 Completed 0 61m
helm-install-traefik–1-bltjq 0/1 Completed 0 61m
local-path-provisioner-64ffb68fd-mpz6w 1/1 Running 0 61m
metrics-server-9cf544f65-77fwg 1/1 Running 0 61m
coredns-85cb69466-cpjq4 1/1 Running 0 61m
svclb-traefik-sb4xc 2/2 Running 0 61m
traefik-74dd4975f9-bwl6j 1/1 Running 0 61m

Regards
Arun Seetha

Hello, @seethaarun82
Can you please list the deployment as well?

kubectl get deployment

This lab is based on k3s so you will not see kube-scheduler and other controlplane components.

Hi Tej,
Thanks for your support.

As I mentioned that I deleted the Deployment subsequently, it was not there. So, basically at the end, it was a simple task to create a POD using a POD definition YAML file which is there at /tmp folder.

Regards
Arun

Yeah, I noticed. I tested and it’s happening because of ownerReferences field. Please remove it then try to deploy it again.

Yes, it’s working now. Thanks for good help.

Ideally, it should generate error referring it; but it did not.

May I know that how did you found it; is there any ways to troubleshoot such scenarios/logs as there many be many such occurrences where there is no hint or clue to dig further.

Once again, thanks for all help.

Regards