Example k8s clusters using kind
, put into a Makefile.
kubectl get nodes -o=jsonpath='{range .items[*]}{"ip route add "}{.spec.podCIDR}{" via "}{.status.addresses[?(@.type=="InternalIP")].address}{"\n"}{end}'
#!/bin/bash
ENDPOINTS='127.0.0.1:2379'
ETCDCTL_API=3 etcdctl \
--endpoints=${ENDPOINTS} \
--cacert="/etc/kubernetes/pki/etcd/ca.crt" \
--cert="/etc/kubernetes/pki/apiserver-etcd-client.crt" \
--key="/etc/kubernetes/pki/apiserver-etcd-client.key" \
${@}
Example usage:
etcdctl.sh get /registry/secrets/default/default-token-th4rf
make calico
make cert-manager-v1.19
kubectl exec -it node-starter-deploy-7d7b887466-gvrb7 -- /bin/sh
docker exec -it kind-worker /bin/bash
docker exec -it kind-control-plane /bin/bash
# See tools below, for tools you'll need.
https://github.com/prometheus-operator/kube-prometheus
apt-get update
apt-get install net-tools
apt install bridge-utils
apt-get install -y tshark