Search…
Private docker registry
Until #1459 is addressed, you can use a private docker registry for your Predictor images by following this guide.

Local

When running Cortex locally, you can use private Docker images by running docker login and then docker pull <your_image>. The Docker image will be present on your machine, and will be accessible by Cortex the next time you run cortex deploy.

Cluster

Step 1

Install and configure kubectl (instructions).

Step 2

Set the following environment variables, replacing the placeholders with your docker username and password:
1
DOCKER_USERNAME=***
2
DOCKER_PASSWORD=***
Copied!
Run the following commands:
1
kubectl create secret docker-registry registry-credentials \
2
--namespace default \
3
--docker-username=$DOCKER_USERNAME \
4
--docker-password=$DOCKER_PASSWORD
5
6
kubectl patch serviceaccount default --namespace default \
7
-p "{\"imagePullSecrets\": [{\"name\": \"registry-credentials\"}]}"
Copied!

Updating your credentials

First remove your old docker credentials from the cluster:
1
kubectl delete secret --namespace default registry-credentials
Copied!
Then repeat step 2 above with your updated credentials.

Removing your credentials

To remove your docker credentials from the cluster, run the following commands:
1
kubectl delete secret --namespace default registry-credentials
2
3
kubectl patch serviceaccount default --namespace default \
4
-p "{\"imagePullSecrets\": []}"
Copied!
Last modified 10mo ago