Private Docker registry

Configuring kubectl

Follow the instructions here.

Setting credentials

DOCKER_USERNAME=***
DOCKER_PASSWORD=***
kubectl create secret docker-registry registry-credentials \
--namespace default \
--docker-username=$DOCKER_USERNAME \
--docker-password=$DOCKER_PASSWORD
kubectl patch serviceaccount default --namespace default \
-p "{\"imagePullSecrets\": [{\"name\": \"registry-credentials\"}]}"

Deleting credentials

kubectl delete secret --namespace default registry-credentials
kubectl patch serviceaccount default --namespace default \
-p "{\"imagePullSecrets\": []}"