kubectl
kubectl copied to clipboard
`kubectl logs -f` Is there a reason `-f` still errors when a pod is in state `ContainerCreating`? Can it wait?
As Kubernetes developers, we often find ourselves repeatedly hitting the UpArrow + Enter combo in the terminal while waiting for a pod to start, to ensure we don’t miss any log output.
I am recommending a change which enhances the -f flag to wait until the pod is fully initialized during ContainerCreating
status instead of erroring, making the development process smoother and more efficient.
The error in particular I'm referring to is the following, when kubectl logs -f [POD_ID]
is invoked on a pod with status ContainerCreating
:
Error from server (BadRequest): container "pod-name" in pod "pod-id" is waiting to start: ContainerCreating
I am happy to submit a PR for this change, if approved.