为什么使用kubeadm安装k8s需要关闭selinux
在使用kubeadm安装k8s集群的时候,准备工作里有一项要求关闭selinux,说是如果不关闭会导致k8s安装失败。但是都没有提到为什么会失败。
# 关闭Selinux
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
在使用kubeadm安装k8s集群的时候,准备工作里有一项要求关闭selinux,说是如果不关闭会导致k8s安装失败。但是都没有提到为什么会失败。
# 关闭Selinux
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
1 回答1.4k 阅读
1.3k 阅读
1.1k 阅读
参考官方文档:https://kubernetes.io/docs/se...
Setting SELinux in permissive mode by running
setenforce 0
andsed ...
effectively disables it. This is required to allow containers to access the host filesystem, which is needed by pod networks for example. You have to do this until SELinux support is improved in the kubelet.