Kubernetes client access the etcd


#1

Hi,

I want to store certain data which I want to be persistent and kubernetes already uses ETCD as storage so I want to know if I can use the same etcd to store my data.

I have started working with kubernetes, I wanted to know if the kube api-server provide apis to allow access to the ETCD so that kubernetes-clients ( nodejs ) can connect to ETCD to store key value pairs.

I was going through some of the kubernetes clients but could not find any specific API which can be used to access ETCD


#2

As far as I know, it is not possible. The API server does not provide any way to access plain etcd.

I haven’t tried, but I guess nothing good comes from sharing the etcd storage with your custom data. Kubernetes uses extensively, and particular versions are supported, some configurations are recommended, etc. Again, I haven’t tried it nor looked at it in detail, but my guess is that avoiding it you will be happier.

If you want to store persistent data, there are plenty of options. But I’d not share the etcd storage with k8s :-/