Change the size of the shared memory with Okteto


By default, the shared memory (shm) of pods created in Kubernetes is automatically set to 64 MiB in size and is mounted to the /dev/shm directory.

I’d like to increase the size of the shared memory in pod.
In pure Kubernetes, it is possible to modify the shm size of a pod by setting the sizeLimit parameter of an emptyDir volume whose storage media is memory and mounting the volume to the /dev/shm directory of the pod.

However, the Okteto manifest does not seem to allow this hack…
How can I change the shared memory size with Okteto?

Thanks in advance :slight_smile:

Hello @antigregory ,

Thank you for your inquiry.

Currently, adjusting the shared memory size directly through the Okteto manifest isn’t supported. If the shared memory volume was already defined in the original deployment, it should persist when using the Okteto CLI.

I’ll make a note of your suggestion for the product team to evaluate if it qualifies as a feature request.

Additionally, I successfully tested adding the snippet from the blog you shared to a deployment, which I later used with okteto up.

If you have any further questions or need assistance, feel free to ask.

Best regards,

Thank you for your prompt answer Javier.
It’s very clear.