I successfully setup my Kubernetes cluster on centos-release-7-3.1611.el7.centos.x86_64 by taking the following steps (I assume Docker is already installed):
- (from /etc/yum.repo.d/kubernetes.repo) baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64-unstable => To use the unstable repository for the latest Kubernetes 1.6.1
yum install -y kubelet kubeadm kubectl kubernetes-cni- (/etc/systemd/system/kubelet.service.d/10-kubeadm.conf) add "--cgroup-driver=systemd" at the end of the last line. => This is because Docker uses systemd for cgroup-driver while kubelet uses cgroupfs for cgroup-driver.
systemctl enable kubelet && systemctl start kubeletkubeadm init --pod-network-cidr 10.244.0.0/16=> If you used to add --api-advertise-addresses, you need to use --apiserver-advertise-address instead.cp /etc/kubernetes/admin.conf $HOME/sudo chown $(id -u):$(id -g) $HOME/admin.confexport KUBECONFIG=$HOME/admin.conf=> Without this step, you might get an error with kubectl get => I didn't do it with 1.5.2kubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml=> 1.6.0 introduces a role-based access control so you should add a ClusterRole and a ClusterRoleBinding before creating a Flannel daemonsetkubectl create -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml=> Create a Flannel daemonset- (on every slave node)
kubeadm join --token (your token) (ip):(port)=> as shown in the result of kubeadm init
All the above steps are a result of combining suggestions from various issues around Kubernetes-1.6.0, especially kubeadm.
Hope this will save your time.