Puppet kubernetes How do I describe a Kubernetes Pod in Puppet DSL

0 votes
I am using puppetlabs/kubernetes module to configure my kubernetes cluster using puppet. I'm stuck as to how do I describe my pod in puppet DSL. Please help!
Aug 21, 2019 in Puppet by Karan
• 19,610 points
960 views

1 answer to this question.

0 votes

The Puppet Kubernetes module currently assumes you already have a Kubernetes cluster up and running. Its focus is on managing the resources in Kubernetes, like Pods, Replication Controllers and Services, not (yet) on managing the underlying kubelet or etcd services. Here’s a quick snippet of code describing a Pod in Puppet’s DSL.

kubernetes_pod { 'sample-pod':
  ensure => present,
  metadata => {
    namespace => 'default',
  },
  spec => {
    containers => [{
      name => 'container-name',
      image => 'nginx',
    }]
  },

Running the above code, assuming we save it as pod.pp, is as simple as:

puppet apply pod.pp

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

Related Questions In Puppet

0 votes
1 answer

Puppet+Kubernetes: How do I use kubetool and what is it's significance in using kubernetes with puppet?

The module puppetlabs/kubernetes has Kubetool, which is ...READ MORE

answered Aug 21, 2019 in Puppet by Sirajul
• 59,230 points
1,174 views
0 votes
1 answer

How do I start a puppet server?

Hey if you're using Ubuntu, you can ...READ MORE

answered Feb 21, 2019 in Puppet by Kavyashri
735 views
0 votes
1 answer

How do I enable puppet collection repository in puppet if I am using Puppet 6.7?

In Puppet6.7 you have to enable Puppet ...READ MORE

answered Jul 31, 2019 in Puppet by Sirajul
• 59,230 points
1,276 views
0 votes
1 answer

Puppet: How do i setup puppet module behind a proxy?

To use the puppet module command behind a proxy, ...READ MORE

answered Aug 9, 2019 in Puppet by Sirajul
• 59,230 points
3,339 views
+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
15,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
0 votes
1 answer

Puppet in Docker: How do I query PuppetDB API in a container setup?

PuppetDB exposes a dashboard, showing various operational ...READ MORE

answered Aug 20, 2019 in Puppet by Sirajul
• 59,230 points
1,096 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP