我正在尝试使用存储在Codefresh上的映像通过kubectl部署应用程序。当我将映像放置在公共注册表上时,它运行得很好。
问题是,当我应用Deployment.yaml时,豆荚上出现“ 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做一个。
答案 0 :(得分:1)
我认为it's explained in the docs。
adb
答案 1 :(得分:0)
对于将来有问题的人, codefresh存储库是一个实际的docker存储库。不知道这给我带来了问题。 因此,在docker-username等位置放置了codefresh凭据,而不是密码,而是在codefresh中生成了一个秘密。这使您可以访问r.cfcr.io存储库。