Skip to content

Instantly share code, notes, and snippets.

@kroy-the-rabbit
kroy-the-rabbit / gist:d3241a03314f649f67c7e81b4e810e6f
Created July 11, 2024 06:05 — forked from ericbisme/gist:8bb09be3537d669d6ef34e784c90ad22
k3s/k3os Remove Master Node from embedded ETCD
https://github.com/k3s-io/k3s/issues/2732#issuecomment-749181797
Run pod with etcdctl:
kubectl run --rm --tty --stdin --image docker.io/bitnami/etcd:latest etcdctl --overrides='{"apiVersion":"v1","kind":"Pod","spec":{"hostNetwork":true,"restartPolicy":"Never","securityContext":{"runAsUser":0,"runAsGroup":0},"containers":[{"command":["/bin/bash"],"image":"docker.io/bitnami/etcd:latest","name":"etcdctl","stdin":true,"stdinOnce":true,"tty":true,"volumeMounts":[{"mountPath":"/var/lib/rancher","name":"var-lib-rancher"}]}],"volumes":[{"name":"var-lib-rancher","hostPath":{"path":"/var/lib/rancher","type":"Directory"}}]}}'
Remove member (must use hex ID):
./bin/etcdctl --key /var/lib/rancher/k3s/server/tls/etcd/client.key --cert /var/lib/rancher/k3s/server/tls/etcd/client.crt --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt member remove 327051268c526155
List Members:
#include <Usb.h>
USB Usb;
// Human Interface Device
#include <hidboot.h>
HIDBoot<HID_PROTOCOL_MOUSE> HidMouse(&Usb);
/* Pin where we received the RTS signal from pin 7 on DB9 */
#define RTS_PROBE 3
@kroy-the-rabbit
kroy-the-rabbit / LearnGoIn5mins.md
Created January 5, 2021 18:04 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins