使用kubeadm安装master节点
1.基本配置准备
# swapoff-关闭swap
swapoff -a
sed -ri "/swap/s@(.*)@#/&@g" /etc/fstab
# Firewall limit-开放默认iptables规则
echo -e "net.bridge.bridge-nf-call-ip6tables = 1\nnet.bridge.bridge-nf-call-iptables = 1\nnet.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sysctl -p
#disabled selinux-关闭selinux
echo "SELINUX=disabled" > /etc/selinux/config
2.安装dokcer
#install-docker
apt update && apt-get -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common && curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" && apt-get update && apt update && apt-get -y install docker-ce=17.06.0~ce-0~debian
3.安装 kube工具
#install kubectl kubelet kubeadm 版本为 1.12.2
apt-get update && apt-get install -y apt-transport-https curl && curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg |apt-key add - && echo "