一、环境准备
服务器操作系统 centos 7.4
关闭firewalld
关闭selinux
下载对应的yum源至/etc/yum.repos.d/下面
wget ftp://ftp.rhce.cc/k8s/*
二、容器介绍
1、docker基础
管理容器的软件:runtime (运行时)
运行时分为两大类:高级别运行时、低级别运行时
低级别运行时:runc、lxc、gvisor、kata (但是的管理容器:创建、删除等,不能管理镜像)
高级别运行时:docker、containerd、podman。。。。。。(不仅可以管理容器,也可以管理镜像)
k8s会调用高级别运行时,然后再调用低级别运行时
2、安装docker
yum -y install docker-ce
3、重启docker服务
systemctl enable docker --now #等于enable+restart
4、查看docker属性
docker info
5、查看镜像
docker images
6、为缓解镜像拉取慢的问题,所以需配置加速器
vim /etc/docker/daemon.json
{
“registry-mirrors”: [“https://4hse4uqa.mirror.aliyuncs.com”]
}
systemctl daemon-reload
systemctl restart docker #重启docker