docker / compose-on-kubernetes

Deploy applications described in Compose onto Kubernetes clusters
Apache License 2.0
1.42k stars 159 forks source link

How To Pass A K8s Secret To The 'docker deploy stack' Command #165

Closed jm241825 closed 3 years ago

jm241825 commented 4 years ago

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.

chris-crone commented 3 years ago

Hi! Thanks for your feedback. Unfortunately we're no longer maintaining this repository so I will close this issue.