etcd-operator icon indicating copy to clipboard operation
etcd-operator copied to clipboard

always set ETCDCTL_API=3 in pods

Open philips opened this issue 5 years ago • 2 comments

For the discovery.etcd.io service I wanted a one-liner to debug via etcdctl and came up with this:

kubectl exec -it $(kubectl get pods -l app=etcd -o jsonpath='{.items[0].metadata.name}')  -- /usr/local/bin/etcdctl watch '' --prefix

However, it doesn't quite work because ETCDCTL_API=3 isn't set and needs to be on the entire pod. I suggest we make that the default. The hack I have implemented here works:

https://github.com/etcd-io/discovery.etcd.io/blob/master/discovery-etcd-cluster.yaml#L12

philips avatar Apr 12 '19 06:04 philips

@philips that link does not work.

dperique avatar Jun 02 '19 23:06 dperique

The file was renamed. See it here: https://github.com/etcd-io/discovery.etcd.io/blob/master/etcd-cluster.yaml#L14

philips avatar Jun 03 '19 05:06 philips