一、概述
官方安装链接:https://kubernetes.io/docs/getting-started-guides/kubeadm/
之前使用是yum直接安装组件,现由kubeadm来自动安装配置;
二、安装(centos7为例)
1 yum update 2 cat <<EOF > /etc/yum.repos.d/kubernetes.repo 3 [kubernetes] 4 name=Kubernetes 5 baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64 6 enabled=1 7 gpgcheck=1 8 repo_gpgcheck=1 9 gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg 10 https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg 11 EOF 12 setenforce 0 13 yum install -y docker kubelet kubeadm kubectl kubernetes-cni 14 systemctl enable docker && systemctl start docker 15 systemctl enable kubelet && systemctl start kubelet