Puppet+Kubernetes : Can I use already existing kubrernetes YAML files while using the kubernetes module?

0 votes
I already have YAML files describing my Kubernetes resources, Is there any way that I can reuse it while using puppetlabs/kubernetes module?

Should I re-write all those as per the constraints of the puppetlabs/kubernetes  module? What's the way forward?
Aug 22 in Puppet by Karan
• 5,700 points
36 views

1 answer to this question.

0 votes

Yes, you could re-use them.

You may already have YAML files describing your Kubernetes resources,In this case the module includes an experimental puppet kubernetes convert command for just this situation.

puppet kubernetes convert examples/guestbook.yaml

The above command will output to stdout the Puppet equivalent to the YAML description of Kubernetes resources, including correctly handling multi-document files like the example guestbook.

puppet kubernetes convert examples/guestbook.yaml > guestbook.pp
puppet apply --test guestbook.pp

If you want to then use that Puppet file the simplest way to do so is to redirect the output to a file and then run it with Puppet as shown above.

answered Aug 22 by Sirajul
• 38,420 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer

Puppet+Kubernetes : How do i install the kubernetes module via Bolt?

In order to get started with using ...READ MORE

answered Aug 23 in Puppet by Sirajul
• 38,420 points
33 views
0 votes
1 answer

How do i start using the kubernetes module if i'm using r10k for code management?

Add this declaration to your Puppetfile: mod 'puppetlabs-kubernetes', ...READ MORE

answered Aug 23 in Puppet by Sirajul
• 38,420 points
30 views
0 votes
1 answer
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
3,060 views
+3 votes
1 answer
0 votes
1 answer

Docker with puppet: Can I validate the puppetlabs/docker module?

Yes, you can! This module is compliant with ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 38,420 points
22 views
0 votes
1 answer