In order to reliably run Kubernetes and connect to the SLATE federation, a few changes are needed to the base CentOS 7 install. The following prerequisite steps will need to be applied to all SLATE nodes in your cluster.
First, you will need to disable SELinux as this generally conflicts with Kubernetes:
setenforce 0 && \
sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
Swap must be disabled for Kubernetes to run effectively. Swap is typically enabled in a default CentOS 7 installation where automatic partitioning has been selected. To disable swap:
swapoff -a && \
sed -e '/swap/s/^/#/g' -i /etc/fstab
In order to properly communicate with other devices within the cluster, firewalld
must be disabled:
systemctl disable --now firewalld
Optionally disable root
login over SSH.
sed -i --follow-symlinks 's/#PermitRootLogin yes/PermitRootLogin no/g' /etc/ssh/sshd_config
Ensure that bridged network traffic goes through iptables
.
cat <<EOF > /etc/sysctl.d/iptables-bridge.conf
EOF
sysctl --system
cat <<EOF > /etc/sysctl.d/ip-forward.conf
net.ipv4.ip_forward = 1
EOF
sysctl --system