Access built-in etcd within kubernetes pod container

3/8/2016

I don't want to setup another etcd cluster.

How can I access the built-in etcd from kubernetes pod?

I suppose first I need create a service account and use this account to launch the pod.

Then how can the container in this pod discover the URI of built-in etcd?

Thank you

-- Mr.Wang from Next Door
kubernetes

1 Answer

3/8/2016

The etcd instance used by the Kubernetes apiserver is generally treated as an implementation detail of the apiserver and is not designed to be reused by user applications. By default it is installed to only listen for connections on localhost and run on a machine where no user applications are scheduled.

It isn't difficult to run a second etcd instance for your own use. For example, the DNS cluster add-on includes a private instance of etcd that is separate from the etcd used by the apiserver.

-- Robert Bailey
Source: StackOverflow