containerd安装

在这里插入图片描述

containerd is available as a daemon for Linux and Windows. It manages the complete container lifecycle of its host system, from image transfer and storage to container execution and supervision to low-level storage to network attachments and beyond.

参考资料

k8s官方教程

containerd

安装教程

前置准备

root@ubuntu0:~/kubernetes/deploy# tree
├── cni-plugins-linux-arm64-v1.5.1.tgz //cni网络管理工具包  
├── containerd-1.7.22-linux-arm64.tar.gz //容器管理工具  
├── containerd.service //containerd启用文件  
└── runc.arm64 //底层容器管理工具      

以上4个文件均可点击去下载

containerd.service

# Copyright The containerd Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target

[Service]
ExecStartPre=-/sbin/modprobe overlay
# 这里已实际本地为准,一般不改
ExecStart=/usr/local/bin/containerd

Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5

# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity

# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target

Installing containerd

点击去下载

  • 解压containerd-1.6.2-linux-amd64.tar.gz
# containerd-1.6.2-linux-amd64.tar.gz这是上面下载的
$ tar Cxzvf /usr/local containerd-1.6.2-linux-amd64.tar.gz
bin/
bin/containerd-shim-runc-v2
bin/containerd-shim
bin/ctr
bin/containerd-shim-runc-v1
bin/containerd
bin/containerd-stress
mkdir -p /usr/local/lib/systemd/system/
# 将下载的containerd.service文件创建到:/usr/local/lib/systemd/system/containerd.service
  • 启动containerd
systemctl daemon-reload
systemctl enable --now containerd # 开机自启并现在也启动

Installing runc

上面的runc文件,大家根据实际部署服务器的架构支持来定。
其他比如说还有:
libseccomp-2.5.5.tar.gz
libseccomp-2.5.5.tar.gz.asc
runc.386
runc.386.asc
runc.amd64
runc.amd64.asc
runc.arm64
runc.arm64.asc
runc.armel
runc.armel.asc
  • 安装runc
#runc.amd64是上面下载的具体文件
install -m 755 runc.amd64 /usr/local/sbin/runc

Installing CNI plugins

#cni-plugins-linux-amd64-v1.1.1.tgz上面下载的具体文件
$ mkdir -p /opt/cni/bin
$ tar Cxzvf /opt/cni/bin cni-plugins-linux-amd64-v1.1.1.tgz
./
./macvlan
./static
./vlan
./portmap
./host-local
./vrf
./bridge
./tuning
./firewall
./host-device
./sbr
./loopback
./dhcp
./ptp
./ipvlan
./bandwidth

至此以上就安装完成containerd了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值