即使在CD管道中添加了ImagePullSecret,也会出现图像拉错误(身份验证) [英] Image Pull Error (Authentication) even though ImagePullSecret was added in CD pipeline

查看:99
本文介绍了即使在CD管道中添加了ImagePullSecret,也会出现图像拉错误(身份验证)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Azure DevOps中,我通过"其他"部分添加了一个Docker注册服务连接。选项(用户名和密码)。

In my Azure DevOps I added a Docker Registry Service Connection via the "Other" option (username and password).

当通过docker撰写推送图像时,此服务连接在我的CI管道中工作。

This service connection works in my CI pipeline when push images via docker compose.

但在我的CD中(发布) )当我将Deploy的Secrets部分中的Docker Registry Service Connection添加到Kubernetes任务时。

But in my CD (Release) pipeline, when I add the Docker Registry Service Connection in the Secrets section of my Deploy to Kubernetes Task.

在Azure DevOps中,Deploy to Kubernetes Task已成功处理。但是在群集中,我的Azure容器注册表中的图像的pod显示以下错误:

In Azure DevOps the Deploy to Kubernetes Task was processed successfully. But in the cluster the pods for the images from my Azure Container Registry show following error:

无法提取图像"xxx.azurecr.io/service.api:latest":[rpc错误:code = Unknown desc =来自守护程序的错误响应:获取https://xxx.azurecr.io/v2/service.api/manifests/latest:
未授权:需要验证,rpc错误:代码=未知desc =来自守护程序的错误响应:获取https:// xxx .azurecr.io / v2 / service.api / manifests / latest:未经授权:需要验证]

推荐答案

您好,

您需要将秘密与部署一起传递或

You need to pass the secret along with the deployment or

创建一个docker注册表机密并在部署中引用该机密。

create a docker registry secret and refer to that secret in the deployment.

您是否可以共享您为创建该kubernetes任务而遵循的文档?

Can you share the document which you are following for creating that kubernetes task?

链接,它将帮助您添加秘密。如果您已经这样做,请告诉我。

Link which will help you to add the secret. Let me know if you have already done this.


这篇关于即使在CD管道中添加了ImagePullSecret,也会出现图像拉错误(身份验证)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆