k8s使用Harbor机器人账户问题

Gitlab Runner 使用私有Harbor仓库中的镜像 遇到的问题: gitlabCI K8s Runner 中, 无法从私有仓库下载私有镜像. 创建secret 1 2 3 4 5 kubectl create secret docker-registry harbor-redstarclouds-secret \ --namespace redstarclouds-ci \ --docker-server=https://harbor.redstarclouds.com \ --docker-username="harbor$ci" \ --docker-password="xxxxxxx" 配置gitlab Runner 1 2 3 4 5 6 7 8 9 10 11 12 13 14 gitlabUrl: http://xxxxx:xxx runnerRegistrationToken: xxxxx rbac: create: true runners: imagePullSecrets: ["harbor-redstarclouds-secret"] privileged: true config: | [[runners]] name = "arch-k8s-runner" executor = "kubernetes" [runners.kubernetes] allowed_pull_policies = ["always", "if-not-present"] 报错如下 问题复现 创建Harbor机器人账户,创建后,Harbor会自动添加前缀 ‘harbor$’ 例如: 新建账户名称为ci,则最后使用账户名称为harbor$ci 创建k8s secret 1 2 3 4 5 kubectl create secret docker-registry harbor-redstarclouds-secret \ --namespace redstarclouds-ci \ --docker-server=https://harbor....

October 23, 2022 · 1 min · BlackChen