Add support for describing containers
Is your feature request related to a problem? Please describe.
I have a pod that hit CreateContainerConfigError. I can see that status in k9s, and I can open the container, but there's no describe container.
There was no way I could find the problem from k9s.
Describe the solution you'd like
- There should be a describe option for containers
- It'd be nice if describe for pods included the container status information
Describe alternatives you've considered
Additional context
I was able to find the problem by doing kubectl get -o json pod/... and I eventually saw:
"containerStatuses": [
{
"image": ".../argocd:v2.5.6-...",
"imageID": "",
"lastState": {},
"name": "application-controller",
"ready": false,
"restartCount": 0,
"started": false,
"state": {
"waiting": {
"message": "container has runAsNonRoot and image has non-numeric user (argocd), cannot verify user is non-root (pod: \"argocd-application-controller-0_argocd(22444eb2-7a20-4c0f-a85f-ae29be2d7d04)\", container: application-controller)",
"reason": "CreateContainerConfigError"
}
}
}
],
which helped me figure out the problem.
@jsoref Thank you for this! I think if you yaml the pod it will show you the container statuses same as your json cmd. That is not included in the std describe either for kubectl nor k9s which uses the same call. Does this make sense?
Oh, I know it was a royal pita to figure out what was the cause of this problem.
A describe for the container would have made it obvious. And optionally providing more information than the normal describe, especially if the pod is in this state would be wonderful, but not strictly necessary.
Obviously once you know what the cause is / how to see it, doing the same thing to investigate the same problem again later isn't a big deal.
Yes, there's no meaningful difference between yaml/json. I was using json because the folding tends to work better in some of my tools...
Ran into a similar problem today, K9s is not able to describe the issue why container went into CreateContainerConfigError where as other IDEs like lens gives a better description.