镜像管理

部署时需要准备两类容器镜像:

  1. Alluxio 镜像(由 Alluxio 销售代表提供)

  2. 第三方组件可公开访问的镜像

这些镜像必须通过 Kubernetes 集群可访问的镜像仓库提供。

对于 Alluxio 镜像,通常需要用户将其上传至自己管理的镜像仓库。

镜像仓库是集中存储和共享容器镜像的地方,可以是公开的也可以是私有的。许多云服务厂商都提供镜像仓库服务,例如: Amazon Elastic Container Registry(ECR)arrow-up-right, Azure Container Registry (ACR)arrow-up-right, 和 Google Container Registry (GCR)arrow-up-right. 私有镜像仓库也可部署于本地系统或组织内网环境中。

Alluxio 镜像

Alluxio 提供以下镜像文件:

  • alluxio-operator-3.2.1-docker.tar :Alluxio Operator 各组件的 Docker 镜像

  • alluxio-enterprise-AI-3.6-12.0.2-docker.tar :Alluxio coordinator和worker 的 Docker 镜像

此外,也可能提供以下镜像(可选):

  • alluxio-gateway-AI-3.6-12.0.2-docker.tar :Alluxio API 网关的 Docker 镜像

  • alluxio-dashboard-AI-3.6-12.0.2-docker.tar :Alluxio 管理控制台的 Docker 镜像

如何上传 Alluxio Operator 镜像的示例如下:

# 加载镜像至本地
$ docker load -i alluxio-operator-3.2.1-docker.tar
$ docker load -i alluxio-enterprise-AI-3.6-12.0.2-docker.tar

# 为镜像重新标记私有仓库标签
$ docker tag alluxio/operator:3.2.1 <PRIVATE_REGISTRY>/alluxio-operator:3.2.1
$ docker tag alluxio/alluxio-enterprise:AI-3.6-12.0.2 <PRIVATE_REGISTRY>/alluxio-enterprise:AI-3.6-12.0.2

# 将镜像推送至远程仓库
$ docker push <PRIVATE_REGISTRY>/alluxio-operator:3.2.1
$ docker push <PRIVATE_REGISTRY>/alluxio-enterprise:AI-3.6-12.0.2

无法访问公共镜像仓库

当Kubernetes集群无法连接公共网络时,通常从公共镜像仓库获取的镜像将无法下载。

要成功部署Alluxio,必须将这些镜像上传至集群可访问的私有镜像仓库。

如果您的网络环境无法连接公共镜像仓库,在拉取镜像时将出现超时错误:

您可能会注意到,cluster controllerufs controllercollectinfo controller已成功启动,但csi controllercsi nodeplugin仍处于ContainerCreating状态。这是由于拉取依赖镜像超时导致。

通过 kubectl describe pod 命令查看详细信息,将会看到类似如下的错误信息:

第三方依赖镜像

组件
镜像名称
版本
目的

operator CSI

registry.k8s.io/sig-storage/csi-node-driver-registrar

v2.0.0

csi 驱动注册依赖项

operator CSI

registry.k8s.io/sig-storage/csi-provisioner

v2.0.5

csi 资源调配器依赖项

集群 ETCD

docker.io/bitnami/etcd

3.5.9-debian-11-r24

etcd 依赖项

集群 ETCD

docker.io/bitnami/os-shell

11-debian-11-r2

os-shell 依赖项

集群监控

grafana/grafana

10.4.5

监控仪表盘

集群监控

prom/prometheus

v2.52.0

指标采集

以下是拉取 Docker 镜像并上传至私有镜像仓库的命令,确保设置与 Kubernetes 集群环境相匹配的平台(例如 linux/amd64):

修改 alluxio-operator.yaml 文件

请修改 alluxio-operator/alluxio-operator.yaml 文件中的镜像地址, 并添加 provisioner 和 driverRegistrar 的镜像地址:

修改 alluxio-cluster.yaml 文件

请相应地修改 alluxio-operator/alluxio-cluster.yaml 文件中的镜像地址。

Last updated