一般情况都会先学docker,然后再学Kubernetes。所有会先安装docker,然后就是安装Kubernetes。然后Kubernetes中包含了docker。安装会报错
1.docker安装
依赖包
yum install -y yum-utils device-mapper-persistent-data lvm2
docker软件包
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装
yum install docker-ce
启动与停止
systemctl start docker
systemctl stop docker
systemctl enbale docker
查询安装情况
yum list installed | grep docker
containerd.io.x86_64 1.2.4-3.1.el7 @docker-ce-edge
docker-ce-cli.x86_64 1:18.09.3-3.el7 @docker-ce-edge
卸载
yum -y remove docker-ce-cli.x86_64
yum -y remove containerd.io.x86_64
删除镜像/容器等
rm -rf /var/lib/docker rm -rf /var/run/docker
安装kubernetes
yum install -y etcd kubernetes
所有评论(0)