title: How to access kubernetes keys in etcd
body: <h1>Question</h1>
  
  <p>How to get the Kubernetes related keys from etcd? Tried to list keys in etcd but could not see related keys. Also where is etcdctl installed?</p>
  
  <pre><code>$ etcdctl
  bash: etcdctl: command not found..
  
  $ sudo netstat -tnlp
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
  tcp        0      0 127.0.0.1:2379          0.0.0.0:*               LISTEN      386/etcd            
  tcp        0      0 127.0.0.1:2380          0.0.0.0:*               LISTEN      386/etcd            
  
  $ curl -s http://localhost:2379/v2/keys | python -m json.tool
  {
      "action": "get",
      "node": {
          "dir": true
      }
  }
  </code></pre>
  
  <h1>Background</h1>
  
  <p>Installed Kubernetes 1.8.5 by following <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="noreferrer">Using kubeadm to Create a Cluster</a> on CentOS 7. When I looked at <a href="https://coreos.com/etcd/docs/latest/getting-started-with-etcd.html" rel="noreferrer">Getting started with etcd</a>, v2/keys looks to be the end point.</p>