DEV Community

Maxime Guilbert
Maxime Guilbert

Posted on • Edited on

Kubernetes - Argument error : too long

While deploying pods on a Kubernetes cluster, we can saw some "weird" errors and generally a quick research helps us to understand what's going on.

But not this time.


While starting a pod in Kubernetes, we saw the following error



standard_init_linux.go:228: exec user process caused: argument list too long


Enter fullscreen mode Exit fullscreen mode

It was the first time we saw it. It was weird, we describe the pod, edit the yaml to check all its values... and we saw nothing.

So at that point we prayed to find something on StackOverFlow to help us, but nothing too. (This error message appears for several other tool but not Kubernetes at this moment)

Then we review every secret, configmap ... to find something... And we saw it. In a secret containing a certificate (which is injected from a secrets management tool in an environment variable), the value wasn't correctly setup and had the certificate multiple times in it.

Once corrected, the pod started correctly!


So, if you have a similar issue, don't forget to check all your environment variables (especially all the ones which are injected from a secret or a configmap)!


I hope it will help you! 🍺

Don’t hesitate to give me feedback here, on twitter or by LinkedIn, I will be glad to read it. You can use the same links if you want to contact me or want to collaborate with me.


You want to support me?

Buy Me A Coffee

Top comments (1)

Collapse
 
thatkit profile image
Nikita

Thanks for the take! I've recently encountered the error in my k8s cluster but this time it was due to exceeding number of Service resources in the cluster. They kept spawning too many and I didn't notice. Quite a nightmare was it to finally debug the problem