Kubernetes project created the kubeadm tools to setup the cluster. As for now this tool in beta status. But kubeadm
is good tool to setup the experimental cluster.
[Install Kubeadm on your nodes] (https://kubernetes.io/docs/setup/independent/install-kubeadm/) Configure Cluster using kubeadm
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/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 epel-release
yum makecache fast
yum remove -y kubelet kubectl kubernetes-cni kubeadm
yum install -y kubelet kubectl kubernetes-cni kubeadm
kubeadm init --pod-network-cidr=10.244.0.0/16 --kubernetes-version=v1.7.2 --token-ttl 0
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml
kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
curl -k https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml |sed 's/subnet-mgr"/subnet-mgr", "--iface=eth1"/' |kubectl apply -f -
kubectl get nodes
NAME STATUS AGE VERSION
k8s17-01 Ready 5m v1.7.2
While joining worker nodes to master, We noticed kubernetes version 1.7.1 & 1.7.2 giving error in pre-flight check. You may need to skip the pre-flight check steps.
kubeadm join --skip-preflight-checks --token 189518.c21306e71082d6ec 192.168.15.91:6443