Unable to add custom application using ICP private image registry

7/10/2018

I'm trying to deploy a custom application using a custom chart and IBM Cloud Private (ICP) local image registry. I followed the documentation on how to create the custom chart: https://www.ibm.com/support/knowledgecenter/en/SSBS6K_2.1.0.2/app_center/add_package.html and how to push the custom image: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.2/manage_images/using_docker_cli.html

I am able to push my custom Docker image to ICP private image registry, and when I log to ICP web console I see it under the Images menu. I was also able to package and import the custom helm chart to the internal repository and initiate the deployment. However, the pod creation fails with this error:

Failed to pull image "default/trade:0.1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for default/trade, repository does not exist or may require 'docker login'

My values.yaml references the image as follows:

image: repository: default/trade tag: 0.1 pullPolicy: IfNotPresent

Has anyone come across an issue like this or been able to deploy a custom image to ICP? Any idea what am I missing?

-- JPHernandez
ibm-cloud-private
kubernetes-helm

2 Answers

7/11/2018

Do you push your docker image trade:0.1 into default namespace? If the docker image in different namespace, you must create and specify the imagePullSecrets to push the image.

To create and use the imagePullSecrets, you can refer below ICP KC link: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.2/manage_images/imagepullsecret.html

-- AsirXing
Source: StackOverflow

7/11/2018

I pushed the image using the following command:

docker push mycluster.icp:8500/default/trade:0.1

My mistake was that in the values.yaml the repository value should be the same, in this case:

repository: mycluster.icp:8500/default/trade

After updating the chart the deployment was successfull.

-- JPHernandez
Source: StackOverflow