Kubernetes

cat /lib/systemd/system/kubelet.service

Setup required sysctl params, these persist across reboots.

cat > /etc/sysctl.d/99-kubernetes-cri.conf <<EOF net.bridge.bridge-nf-call-iptables = 1 net.ipv4.ip_forward = 1 net.bridge.bridge-nf-call-ip6tables = 1 EOF

sysctl --system


* cri

apt-get update apt-get upgrade add-apt-repository ppa:projectatomic/ppa apt-get update apt-get install cri-o-1.12 systemctl enable crio.service


* commands

kubeadm config images pull --cri-socket="/var/run/crio/crio.sock" kubeadm init --cri-socket="/var/run/crio/crio.sock" kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-cert-extra-sans={{ external_ip }}

mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config

export KUBECONFIG=$HOME/.kube/config

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml kubectl taint nodes --all node-role.kubernetes.io/master-



systemctl list-unit-files
journalctl -u kubelet
journalctl --vacuum-time=2d

apply network

FYI, I ran into the same issue and the following worked:

#re-deploy weave network (in my case)
export kubever=$(kubectl version | base64 | tr -d '\n')
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$kubever"
..then..
systemctl restart docker && systemctl restart kubelet

kubectl create namespace registry
docker run --rm --entrypoint htpasswd registry:2 -Bbn USER PASSWORD > registry_htpasswd
kubectl create secret generic registry --from-file registry_htpasswd --namespace=registry
kubectl create secret docker-registry registry-credentials --docker-server=registry3.rhrn.ru --docker-username=docker --docker-password=Tf2OfgCvDYsMYYjrFyWk8jy7EImEQkpM8i9qaPq/+dU= --docker-email=me@rhrn.ru