Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using the Puppet docker module to manage Docker configuration, for private registry? #46

Closed
gigi-at-zymergen opened this issue Jan 24, 2018 · 2 comments

Comments

@gigi-at-zymergen
Copy link

gigi-at-zymergen commented Jan 24, 2018

We are already heavy Puppet users and are getting going with trying to use this module to run our own Kubernetes cluster on ec2.

We have a private docker registry and have previously used the Puppet Docker module to configure Docker on nodes with the docker::registry config

I get the following error when I tried to use our standard Docker configuration :

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Apt::Source[docker] is already declared in file /etc/puppetlabs/code/environments/INFRA_866_kubernetes/modules/docker/manifests/repos.pp:19; cannot redeclare at /etc/puppetlabs/code/environments/INFRA_866_kubernetes/modules/kubernetes/manifests/repos.pp:23 at /etc/puppetlabs/code/environments/INFRA_866_kubernetes/modules/kubernetes/manifests/repos.pp:23:11 on node k8-bootstrap-controller

It appears that the Kubernetes module adds the docker apt source here :

apt::source { 'docker':
leading to the conflict.

Wondering what my best options are for managing the Docker config through Puppet; private registries etc. I can probably define and slam in place a Docker config.json. I could also use some guidance on the docker and kubernetes service user configs as well. Would I put that in a kubernetes user home ~/.docker/config.json ? What linux users does the kubernetes module create/expect and run the processes under ?

@gigi-at-zymergen
Copy link
Author

I just realized that trying to manage the private registry at the Docker level may be the wrong approach. I should probably add the registry through kubectl per : https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/. Would it generally be the best practice to not try and manage any Docker config through puppet and look for kubectl ways to configure?

@scotty-c
Copy link
Contributor

@gigi-at-zymergen you should definitely add the registry through kubectl. So there is no Docker configuration Kubernetes needs that the module does not already contain. You can still model the kubernetes commands in Puppet DSL

lionce pushed a commit to lionce/puppetlabs-kubernetes that referenced this issue Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants