Configuring a Namespace on IBM Container Registry (ICR)

You can use a namespace of IBM Container Registry to host Camel K images.

In order to push images to, you need to provide valid credentials (secret) to Camel K.

Creating a Namespace

The fast way to obtain a namespace on ICR is by IBM Command line tool:

  • Install IBM Command line tool:

    $ ibmcloud plugin install container-registry -r 'IBM Cloud'
  • Log in to your IBM Cloud account:

    $ ibmcloud login -a
  • Ensure that you’re targeting the correct IBM Cloud Container Registry region:

    $ ibmcloud cr region-set us-south
  • Choose a name for your namespace, and create that namespace:

    $ ibmcloud cr namespace-add <my_namespace>

Providing Registry Secret

Once you have a registry namespace, create a secret with the credentials in order for Camel K to access it.

Firstly, make sure to log in to ICR so that the local Docker config file has the credentials for it:

$ ibmcloud cr login

Then create a secret with the Docker config file $HOME/.docker/config.json (or in case of Podman, $XDG_RUNTIME_DIR/containers/auth.json):

$ kubectl create secret generic my-icr-secret --from-file=.dockerconfigjson=$HOME/.docker/config.json

Now you can proceed to install Camel K with the following command:

$ kamel install --registry <region> --organization <my_namespace> --registry-secret my-icr-secret