Configure Your Development Host and Kubernetes Cluster

Let's choose container-registry.visioncorp.com/repo for the registry and repository of your choice.

  1. On your development host, use the docker login command to log in to your container-registry.visioncorp.com container registry. At the prompt, enter your credentials for your container registry.
    docker login container-registry.visioncorp.com

    If you are using docker, the docker login operation creates or updates the $HOME/.docker/config.json file with the auth token you provided when you were prompted for your password.

    If you are using podman, the credentials may be stored in a different location. See https://docs.podman.io/en/v4.3/markdown/podman-login.1.html

  2. On your development host, create an image pull secret.

    A Kubernetes Secret takes a copy of your credentials from the docker login command and makes them available to your Kubernetes cluster.

    This example creates a Secret called sekret. You can use any name.

    kubectl create secret generic sekret \
    --from-file=.dockerconfigjson=$HOME/.docker/config.json \
    --type=kubernetes.io/dockerconfigjson

    For more information, see Pulling Images from Registry during Deployment in the Kubernetes documentation.

  3. Save the name of the image pull secret. You need it later.