Search code examples
kubernetesetcd

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


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!


Solution

  • 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.