Failure to pull from organizational repo

I am attempting to pull a docker container from a private organizational repo into a kubernetes setup, k8s 1.28 on rhel 9. I am using the address docker is telling me in the repo, docker.io/organization/repo:latest, however it is failing. If it is setup as private I get a permissions denied error message despite having a secret for my login credentials stored in the same k8s namespace. if I set it as public I get an error that it does not exist. Using this address as a private repo works fine for my github workflow. If I set it to use my own public repo as docker.io/user/repo:latest however it works perfectly fine. Any thoughts on what I am doing wrong?

apiVersion: apps/v1
kind: Deployment
metadata:
  name: failover
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app: failover
  template:
    metadata:
      labels:
        app: failover
    spec:
      containers:
      - image: docker.io/organization/failover:latest
        name: failover
        ports:
        - containerPort: 80

Well, you will not succeed. You can only pull an image :slight_smile: Sorry, I’m sure it was just chosing the wrong word and you know the difference between image and container if you work with Kubernetes :slight_smile:

Regarding the first error: You haven’t defined the secret in the manifest file:

https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret

Quote from the documentation:

apiVersion: v1
kind: Pod
metadata:
  name: private-reg
spec:
  containers:
  - name: private-reg-container
    image: <your-private-image>
  imagePullSecrets:
  - name: regcred

If you get “does not exist” when trying to pull an image from a public repo, that is probably true and the reference is wrong, If you can share the exact error messages, we may be able to tell you more.

Thank you for the reply, yes I meant image, my bad. I figured out my issues

  1. I was not pushing the latest tag I assumed it was dynamic
  2. as your example shows I did not have my creds nested properly under spec.

I corrected both of these and now my only issue is I cannot seem to push 2 tags at once. It is only a single tag, latest, or it updates every single tag ever used.