================================
K8S安装
添加kuberenetes.repo 文件,内容如下(/etc/yum.repos.d/kubernetes.repo)
[kubernetes]
name=Kubernetes
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
#http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
下载安装
yum install -y kubelet kubeadm kubectl
systemctl enable kubelet
开启
systemctl start kubelet
状态查看
systemctl status kubelet
================================
k8s 卸载
依次执行下列命令即可
kubeadm reset -f
rm -rf ~/.kube/
rm -rf /etc/kubernetes/
rm -rf /etc/systemd/system/kubelet.service.d
rm -rf /etc/systemd/system/kubelet.service
rm -rf /usr/bin/kube*
rm -rf /etc/cni
rm -rf /opt/cni
rm -rf /var/lib/etcd
rm -rf /var/etcd