Where is better to store the data in the custom Kubernetes resource

4/28/2020

I have a question about where is better to store the data in the custom Kubernetes resource. As I know, I can store data (maybe a big size data) in the annotation, or store in the status of the resource. So where is better for performance or better to store? If I store a big data in annotation or status, will it take more space in etcd?

Thanks a lot!

-- user13220731
etcd
kubernetes

1 Answer

4/28/2020

Both of the locations you've suggested seem like the wrong place to store large pieces of data.
For configuration related data that needs to be shared between a few resources, use a configmap.
If the data is specific to each pod, use volumes.

-- Yaron Idan
Source: StackOverflow