背景:有台opensuse 15.4 Leap系统的物理机需要接入原k8s集群
opensuse提供的kubelet默认采用crio,抛弃了dockershim,kubeadm加入集群后发现几个问题:
- kubeproxy的镜像拉不下来,因为内网非https镜像配置的方式和docker不一样。需要修改/etc/crio/crio.conf.d/00-default.conf中insecure_registries,加入内网镜像配置;
- 加入集群后get pods和get nodes看来状态正常,但是该节点的pod和其它pod网络不通,经排查为flannel操作iptables报权限不足。需要修改flannel的daemonset配置,securityContext – privileged 配置改为true,重启该节点flannel后正常工作;
securityContext:
capabilities:
add:
- NET_ADMIN
privileged: true
3. 部分使用到ping等功能的pod工作不正常,因为docker默认有NET_RAW配置,crio中默认已移除此配置,需要修改该pod对应的securityContext,capabilities – add: NET_RAW
securityContext:
capabilities:
add:
- NET_RAW
4. 如需在节点上查看pod状态,管理镜像等操作,需要使用crictl,如crictl ps、crictl images
0 条评论。