Where does ConfigMap data gets stored?

12/26/2018

I created ConfigMap using kubectl and I can also see it using:

kubectl get cm

I am just curious where kubernetes stores this data/information within the cluster? Does it store in etc? How do I view it, if it stored in etcd?

Does it store in any file/folder location or anywhere else?

I mean where kubernetes stores it internally?

-- Ramesh
configmap
etcd
kubernetes

1 Answer

12/26/2018

Yes etcd is used for storing ConfigMaps and other resources you deploy to the cluster. See https://matthewpalmer.net/kubernetes-app-developer/articles/how-does-kubernetes-use-etcd.html and note https://github.com/kubernetes/kubernetes/issues/19781#issuecomment-172553264

You view the content of the configmap with 'kubectl get cm -oyaml' i.e. through the k8s API directly as illustrated in https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/ You don't need to look inside etcd to see the content of a configmap.

-- Ryan Dawson
Source: StackOverflow