Puppet Kubernetes Is there a way to create resources in Kubernetes using Puppet

0 votes
I want to create resources in Kubernetes using Puppet DSL. How can i achieve this?
Aug 23, 2019 in Puppet by liana

1 answer to this question.

0 votes

Yes, it is quite possible to create or manage resources in kubernetes using Puppet DSL. For this you would need to install a module called "garethr/kubernetes". It is actually designed for creating resources in Kubernetes.


Assuming you have a Kubernetes cluster up and running.

  • Installing the Kubernetes module:

Install the required gems with this command:

/opt/puppetlabs/puppet/bin/gem install activesupport -v 4.1.14
/opt/puppetlabs/puppet/bin/gem install kubeclient --no-ri --no-rdoc
  • Configuring credentials

You can provide the required information in a standard kubectl configuration file. Store this as kubernetes.conf in the relevant confdir.

If you have a working kubectl setup you can export the file using the following command:

kubectl config view --raw=true
  • Finally install the module with:
puppet module install garethr-kubernetes

For more info on creating and managing resources refer to: https://forge.puppet.com/garethr/kubernetes

answered Aug 23, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Is it possible to install puppet agent in a docker container on linux?

Hey @Janice, this is pretty simple. Create ...READ MORE

answered Mar 12, 2019 in Puppet by Jason
0 votes
1 answer
0 votes
1 answer

How to install a package if it is not installed using puppet conditions

You will need to write a puppet ...READ MORE

answered Mar 18, 2020 in Puppet by Sirajul
• 59,230 points
0 votes
1 answer
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,471 views
0 votes
1 answer

Is there a provision of on failure ability in puppet?

Not a built-in one, no.  They do log failures, of ...READ MORE

answered Aug 6, 2019 in Puppet by Sirajul
• 59,230 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP