Skip to content
标签
欢迎扫码关注公众号

TKE 1.28 节点安装 docker 命令

最近升级 TKE 集群,之前是 1.22,趁着数据库迁移的机会也将 TKE 迁移到了最新的 1.28。

这边项目中打包项目时使用了 TKE 节点作为打包服务器,结果迁移后构建时报了 docker: command not found 的错误。

Kubernetes 1.24 通过 Dockershim 对 Docker 的支持已移除,1.28 版本的 Kubernetes 只能选择 containerd 运行时组件。

节点加入到 TKE 集群时会自动重装系统,默认看样子是不包含 Docker 组件了。

由于构建中还是要用到 docker 命令的,所以只能手动在 TKE 节点的云服务器上安装 Docker 组件了。

TKE 中节点默认的操作系统是 TencentOS Server,可以当做是 CentOS 来操作。

具体步骤如下:

  1. 安装软件包

    bash
    yum install docker-ce docker-ce-cli containerd.io
  2. 启动 Docker

    bash
    systemctl start docker
  3. 验证安装

    bash
    docker --version
    systemctl status docker

安装后再次构建就没有问题了。

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.