How do you access the etcd that is being used by the OpenShift started by oc cluster up or using minishift.

If you are using minishift then get docker environment access of the minishift VM by running following commands.

eval $(minishift docker-env) && eval $(minishift oc-env)

Exec into the container named origin that runs OpenShift and all the needed services.

$ docker exec -it origin bash

First install the etcdctl needed to talk to etcd.

[root@surajd origin]$ yum -y install etcd

Get into the directory where all the certs and keys are available.

[root@surajd origin]$ cd /var/lib/origin/openshift.local.config/master

Now run following to connect to the etcd.

[root@surajd master]$ export ETCDCTL_API=3
[root@surajd master]$ etcdctl --cacert ./ca.crt --cert ./master.etcd-client.crt \
 --key ./master.etcd-client.key \
 --endpoints=[] \
 get --prefix --keys-only=true /





Now you can try to read about a specific object by looking at a specific key.

[root@surajd master]$ etcdctl --cacert ./ca.crt --cert ./master.etcd-client.crt --key ./master.etcd-client.key --endpoints=[] get --prefix  /

This is a rpc binary data. You can use tools like protoc to decode it. There is some discussion about decoding this data.