Skip to content

Instantly share code, notes, and snippets.

@firestar
Last active March 28, 2024 16:13
Show Gist options
  • Save firestar/9e147e59f71977a594a906ddb3eba1a1 to your computer and use it in GitHub Desktop.
Save firestar/9e147e59f71977a594a906ddb3eba1a1 to your computer and use it in GitHub Desktop.
yum update -y
yum install -y epel-release
yum update -y
yum install -y containerd
systemctl enable --now containerd
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
systemctl enable --now kubelet
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
echo net.bridge.bridge-nf-call-ip6tables = 1 > /usr/lib/sysctl.d/10-ipv4-forwarding-on.conf
echo net.bridge.bridge-nf-call-iptables = 1 >> /usr/lib/sysctl.d/10-ipv4-forwarding-on.conf
echo net.ipv4.ip_forward=1 >> /usr/lib/sysctl.d/10-ipv4-forwarding-on.conf
echo br_netfilter > /etc/modules-load.d/brnet.conf
sysctl --system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment