wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.14/cri-dockerd-0.3.14.amd64.tgz
tar xzvf cri-dockerd-0.3.14.amd64.tgz
生成systemd配置文件
[root@fxm ~]# cd cri-dockerd/[root@fxm cri-dockerd]# mkdir systemd[root@fxm cri-dockerd]# cd systemd[root@fxm systemd]# vi cri-docker.service[root@fxm systemd]# vi cri-docker.socket
cri-docker.service
[Unit]Description=CRI Interface for Docker Application Container Engine
Documentation=https://docs.mirantis.com
After=network-online.target firewalld.service docker.service
Wants=network-online.target
Requires=cri-docker.socket
[Service]Type=notify
ExecStart=/usr/local/bin/cri-dockerd --container-runtime-endpoint fd://
ExecReload=/bin/kill -s HUP $MAINPIDTimeoutSec=0RestartSec=2Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.# Both the old, and new location are accepted by systemd 229 and up, so using the old location# to make them work for either version of systemd.StartLimitBurst=3# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make# this option work for either version of systemd.StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead# in the kernel. We recommend using cgroups to do container-local accounting.LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not support it.# Only systemd 226 and above support this option.TasksMax=infinity
Delegate=yes
KillMode=process
[Install]WantedBy=multi-user.target
cri-docker.socket
[Unit]Description=CRI Docker Socket for the API
PartOf=cri-docker.service
[Socket]ListenStream=%t/cri-dockerd.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]WantedBy=sockets.target
安装k8s
安装三大组件-kubeadm、kubelet、kubectl
kubeadm:用来初始化k8s集群的指令。
kubelet:在集群的每个节点上用来启动 Pod 和容器等。
kubectl:用来与k8s集群通信的命令行工具,查看、创建、更新和删除各种资源。
安装kubeadmin、kubelet、kubernetes-master
sudo dnf install-y kubelet kubeadm kubectl --disableexcludes=kubernetes
# 查看是否安装成功
kubelet --version
kubectl version
kubeadm version