This solution can be used in both Dockerhub or other private/public image repositories/registries. The following example takes Dockerhub as an example,
DOCKER_REGISTRY_SERVER=<URL of Dockerhub>
DOCKER_USER=<username of registry>
DOCKER_EMAIL=<email of registry>
DOCKER_PASSWORD=<password of registry>
kubectl create secret docker-registry myregistrykey \
--docker-server=$DOCKER_REGISTRY_SERVER \
--docker-username=$DOCKER_USER \
--docker-password=$DOCKER_PASSWORD \
--docker-email=$DOCKER_EMAIL
-n <namespace>
Note that the secret will only take effect when the namespace is the same with the corresponding production resources.
Note: The URL of Dockerhub is:https://index.docker.io/v1/
Make sure the secrete is created in the same namespace going to deploy FATE, add it in the imagePullSecrets
of cluster.yaml
as following:
imagePullSecrets:
- name: myregistrykey
Adding account information to registry can solve the problem of traffic limitation by Dockerhub