Kubernetes 版 MySQL Operator 发行说明
MySQL Shell
MySQL Router
与 第 6.3 节“使用 Docker 将镜像复制到私有注册表”类似,但您可以使用 Skopeo。 Skopeo 是一个容器实用程序,也可以作为容器运行。以下示例将 Operator 镜像从 Oracle 容器注册表 (OCR) 复制到私有注册表。它需要在具有 Docker 或 Podman 并且可以访问 OCR 和您的私有注册表的主机上运行。更改变量名以适合您的环境,如果使用 Podman,则将 docker 更改为 podman。 OPERATOR_VERSION
是 Kubernetes 版 MySQL Operator 的版本,例如 9.0.0-2.2.0
。
export REGISTRY="..." # for example 192.168.20.199:5000
export REPOSITORY="..." # for example mysql
export OPERATOR_VERSION=$(grep appVersion helm/mysql-operator/Chart.yaml | cut -d '"' -f2)
docker run --rm quay.io/skopeo/stable copy docker://container-registry.oracle.com/mysql/community-operator:$OPERATOR_VERSION docker://$REGISTRY/$REPOSITORY/mysql-operator:$OPERATOR_VERSION
对于经过身份验证的私有注册表,请将 --dest-creds user:pass
附加到 skopeo 命令。如果它不使用 TLS,还要附加 --dest-tls-verify=false
。