Centos7下k8s安装1:kubelet kubeadm kubectl

kubelet运行在Cluster所有节点上,负责启动Pod和容器。

kubeadm用于初始化Cluster。

kubectl是Kubernetes命令行工具。通过kubectl可以部署和管理应用,查看各种资源,创建、删除和更新各种组件。


使用阿里镜像:

vi /etc/yum.repos.d/kubernetes.repo

文件内容:

[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg

安装:

yum install -y kubelet kubeadm kubectl


如安装时,出现

Error: Package: kubelet-1.19.2-0.x86_64 (kubernetes)
                          Requires: conntrack
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

找对应的epel/base阿里镜像:阿里云的repo包下载地址http://mirrors.aliyun.com/repo/

cd /etc/yum.repos.d/
wget http://mirrors.aliyun.com/repo/epel-7.repo
wget http://mirrors.aliyun.com/repo/Centos-7.repo

安装依赖包

yum install epel-release
yum install conntrack-tools

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。