Skip to content

Instantly share code, notes, and snippets.

@tonmanna
Last active January 2, 2023 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonmanna/27b9de00df0a0b07cd6cce69efed54a2 to your computer and use it in GitHub Desktop.
Save tonmanna/27b9de00df0a0b07cd6cce69efed54a2 to your computer and use it in GitHub Desktop.
Flannel can't start POD
Flannel not start
edit /etc/kubernetes/manifests/kube-controller-manager.yaml
at command ,add
--allocate-node-cidrs=true
--cluster-cidr=10.244.0.0/16
then,reload kubelet from flannel
https://github.com/coredns/deployment/issues/87
https://github.com/flannel-io/flannel/issues/728
docker rmi -f $(docker images -a -q)
kubectl drain <node name>
kubectl uncordon <node name
apt-cache policy kubelet
apt-get install -qy kubeadm=1.17.0-00
apt-get install -qy kubelet=1.17.0-00 --allow-downgrades
apt-get install -qy docker-ce=5:18.09.9~3-0~ubuntu-xenial
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
Master node schedule
https://gist.github.com/rkaramandi/44c7cea91501e735ea99e356e9ae7883
kubectl taint nodes --all node-role.kubernetes.io/master-
@tonmanna
Copy link
Author

Unsure if this helps, but I had the same and realised I was using the old setup guide, copying /etc/kubernetes/admin.conf into ~/.kube/admin.conf and setting $KUBECONFIG=$HOME/.kube/admin.conf. I cleared the environment variable and kubectl defaults back to using ~/.kube/config.

@tonmanna
Copy link
Author

tonmanna commented Jan 2, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment