注册k8s到rancher时 agent pods一直处于containercreating状态
cattle-system cattle-cluster-agent-5dfcdff98b-7b2br 0/1 ContainerCreating 0 13m <none> localhost.localdomain <none> <none>
使用describe命令查看日志,发现是网络问题
---- ------ ---- ---- ------- Normal Scheduled 7m4s default-scheduler Successfully assigned cattle-system/cattle-cluster-agent-5dfcdff98b-7b2br to localhost.localdomain Warning NetworkNotReady 2m2s (x152 over 7m4s) kubelet, localhost.localdomain network is not ready: runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
原来是安装k8s时没有安装fannal
使用命令启动fannal容器
kubectl apply -f kube-fannal.yml