Cheat Sheet

Kubeadm tips and tricks

Get join command

kubeadm token create --print-join-command

Reset cluster

kubeadm reset
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X

Install kubeadm, kubectl and kubelet

Setup repository

apt-get update && apt-get install -y apt-transport-https curl
curl -s | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb kubernetes-xenial main
apt-get update


apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl

Specific version

apt-get install \
  kubelet=1.14.2-00 \
  kubeadm=1.14.2-00 \
  kubectl=1.14.2-00 \
apt-mark hold kubelet kubeadm kubectl

Get kubeadm dependencies versions

kubelet --version
kubeadm version
kubectl version
dpkg --list |grep kubernetes-cni


Get Pod and Service CIDRs

kubeadm config view | grep Subnet

Last updated