I'm trying to deploy an application onto a Kubernetes Cluster with images that are stored in a private DockerHub registry. When I run the command:
docker stack deploy --orchestrator=kubernetes -c docker-compose.yml <stack-name> --namespace <Kubernetes-namespace>
I get error messages that the image(s) cannot be pulled for 3 of the 5 containers that are being deployed.
I've created a K8s Secret within the namespace which should allow the images to be accessed and pulled from the private registry (I've tried this manually, so I know the Secret is correct).
How can I instruct the docker stack deploy command to use this Secret to pull the images?
I've tried patching the service account running in that namespace, so that it knows to use the Secret as well, but I haven't had any luck.
I'm trying to deploy an application onto a Kubernetes Cluster with images that are stored in a private DockerHub registry. When I run the command:
docker stack deploy --orchestrator=kubernetes -c docker-compose.yml <stack-name> --namespace <Kubernetes-namespace>
I get error messages that the image(s) cannot be pulled for 3 of the 5 containers that are being deployed.I've created a K8s Secret within the namespace which should allow the images to be accessed and pulled from the private registry (I've tried this manually, so I know the Secret is correct).
How can I instruct the
docker stack deploy
command to use this Secret to pull the images?I've tried patching the service account running in that namespace, so that it knows to use the Secret as well, but I haven't had any luck.
Any help with this would be greatly appreciated.