Created
December 18, 2018 09:06
-
-
Save gengen1988/10335fe2d38fbc0f31f5514114c394f9 to your computer and use it in GitHub Desktop.
install kubeadm on aliyun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update && apt-get upgrade -y && apt-get install -y socat ebtables docker.io nfs-common | |
# enable modules | |
echo ip_vs_rr >> /etc/modules-load.d/modules.conf | |
echo ip_vs_wrr >> /etc/modules-load.d/modules.conf | |
echo ip_vs_sh >> /etc/modules-load.d/modules.conf | |
echo ip_vs >> /etc/modules-load.d/modules.conf | |
# override dhcp dnc client | |
echo 'supersede domain-name-servers 172.16.0.138;' >> /etc/dhcp/dhclient.conf | |
service networking restart | |
# install kubeadm | |
apt-get update && apt-get install -y apt-transport-https curl | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
apt-get update && apt-get install -y kubelet kubeadm kubectl | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment