我正在尝试使用存储在 Codefresh 上的图像通过 kubectl 部署应用程序。当我将图像放在公共注册表上时,它可以完美运行。
问题是当我应用 deployment.yaml 时,我在 pod 上收到“ImagePullBackOff”错误。我假设,我认为是正确的,这是因为我需要一个秘密才能访问我的 Codefresh 图像。
这是我当前的 deployment.yaml 的容器部分:
spec:
containers:
- name: dockapp
#States the image that will be put inside the pod. Secret to get access is declared below
#registry.hub.docker.com/jamiedovu/dockapp:latest
image: r.cfcr.io/jamiew87/my-app-image:master
ports:
- containerPort: 8080
name: http
imagePullSecrets:
- name: regcred
我的问题是,我需要将什么放入秘密“regcred”中才能连接到这个私人注册表。Kubernetes 文档只演示了如何为 docker 做一个。