centos7 安装k8s kubectl 客户端

1、 配置k8s的kubelet 管理客户端

1 cat <<EOF > /etc/yum.repos.d/kubernetes.repo
2 [kubernetes]
3 name=Kubernetes
4 baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
5 enabled=1
6 gpgcheck=1
7 repo_gpgcheck=1
8 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
9 EOF

2、安装k8s kubectl 客户端

[root@k8s-master01 yum.repos.d]# yum install -y kubectl kubelet kubeadm

3、配置k8s kubectl 客户端开机启动

[root@k8s-master01 yum.repos.d]# systemctl enable kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.

4、启动kubectl 客户端

[root@k8s-master01 yum.repos.d]# systemctl start kubelet

  

上一篇:虚拟机Virtualbox网络设置HostOnly模式连接外网配置CentOS7的阿里云yum源


下一篇:centos7更换yum源