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 in Puppet by liana
16 views

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.

Setup:

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 by Sirajul
• 25,700 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 in Puppet by Jason
115 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Create a Custom function in puppet.

All the custom functions are implemented as ...READ MORE

answered Jul 29 in Puppet by Sirajul
• 25,700 points
33 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
2,173 views
+3 votes
1 answer
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 in Puppet by Sirajul
• 25,700 points
21 views