Skip to content

Instantly share code, notes, and snippets.

@joshes
Created July 2, 2019 21:16
Show Gist options
  • Save joshes/986db8526b9ff0240c28ab8723081b5c to your computer and use it in GitHub Desktop.
Save joshes/986db8526b9ff0240c28ab8723081b5c to your computer and use it in GitHub Desktop.
# Example of using etcdctl w/TLS
kubectl exec -it -n kube-system $(kubectl get pods -n kube-system | grep etcd-manager-main | awk '{print $1}') bash
CLUSTER=my-cluster.k8s.local
cd /opt/etcd-v3.2.18-linux-amd64
ETCDCTL_API=3 ./etcdctl \
--key /rootfs/etc/kubernetes/pki/kube-apiserver/etcd-client.key \
--cert /rootfs/etc/kubernetes/pki/kube-apiserver/etcd-client.crt \
--cacert /rootfs/etc/kubernetes/pki/kube-apiserver/etcd-ca.crt \
--endpoints "https://etcd-c.internal.${CLUSTER}:4001,https://etcd-d.internal.${CLUSTER}:4001,https://etcd-a.internal.${CLUSTER}:4001" endpoint health
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment