0

I can't deploy pod using private image (ACR) using CLI and yaml file.

Deploying from registry directly using either az container or kubectl run does work however.

Pod status:

  "containers": [
    {

            "count": 3,
            "firstTimestamp": "2017-08-26T07:31:36+00:00",
            "lastTimestamp": "2017-08-26T07:32:20+00:00",
            "message": "Failed: Failed to pull image \"ucont01.azurecr.io/unreal-deb\": rpc error: code 2 desc Error: im age unreal-deb:latest not found",
            "type": "Warning"
          },
        ],
      },

Yaml file:

apiVersion: v1
kind: Pod
metadata:
  generateName: "game-"
  namespace: default
spec:
  nodeName: aci-connector
  dnsPolicy: ClusterFirst
  restartPolicy: Never
  containers:
    - name: unreal-dev-server
      image: ucont01.azurecr.io/unreal-deb
      imagePullPolicy: Always
      ports:
      - containerPort: 7777
        protocol: UDP
  imagePullSecrets:
    - name: registrykey

3 Answers 3

3

Unfortunately the aci-connector-k8s doesn't currently support images from private repositories. There is an issue open to add support but it's not currently implemented.

https://github.com/Azure/aci-connector-k8s/issues/35

Sign up to request clarification or add additional context in comments.

Comments

1

According to your description, could you please check your repositories via Azure portal, like this:

enter image description here

Use your YAML, it work for me:

apiVersion: v1
kind: Pod
metadata:
  generateName: "game-"
  namespace: default
spec:
  nodeName: k8s-agent-379980cb-0
  dnsPolicy: ClusterFirst
  restartPolicy: Never
  containers:
    - name: unreal-dev-server
      image: jasontest.azurecr.io/samples/nginx
      imagePullPolicy: Always
      ports:
      - containerPort: 7777
        protocol: TCP
  imagePullSecrets:
    - name: secret1

Here is the screenshot:

enter image description here

Here is my secret:

jason@k8s-master-379980CB-0:~$ kubectl get secret
NAME                  TYPE                                  DATA      AGE
default-token-865dj   kubernetes.io/service-account-token   3         1h
secret1               kubernetes.io/dockercfg               1         47m

1 Comment

Does that work for you? please let me know if you need more help:)
0

If the credentials (corresponding to registrykey) are incorrect, you may get 'image not found' error, though the image exists. you may want to verify the registrykey credentials again..

1 Comment

I added another secret point to the same registry and it still doesn't work. I can run images from the same registry using kubectl run --image=. I'm fairly positive that credentials are ok then.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.