Skip to content

Instantly share code, notes, and snippets.

@mattmattox
Created March 10, 2022 08:57
Show Gist options
  • Save mattmattox/599a5467cdccf6dfed132c8c51c81b49 to your computer and use it in GitHub Desktop.
Save mattmattox/599a5467cdccf6dfed132c8c51c81b49 to your computer and use it in GitHub Desktop.
grab-rke2-bootstrap.sh
/var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml exec -it $(/var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml get po -l component=etcd -n kube-system \
-o jsonpath='{.items[0].metadata.name}') -n kube-system -- /bin/bash -c "ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 \
--cacert=/var/lib/rancher/rke2/server/tls/etcd/server-ca.crt \
--cert=/var/lib/rancher/rke2/server/tls/etcd/server-client.crt \
--key=/var/lib/rancher/rke2/server/tls/etcd/server-client.key \
get /bootstrap --prefix "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment