homebloginstalling kubernetes certified puppet kubernetes module

Installing Kubernetes with the (certified!) Puppet Kubernetes module

Puppet has a Kubernetes module that can be used to install and configure Kubernetes — and we're pleased to let you know that it was recently certified with CNCF as a Kubernetes Installer.

The module installs and configures Kubernetes, allowing the deployment of Kubernetes clusters to be managed using either open source Puppet or Puppet Enterprise. Puppet will maintain the state of your Kubernetes cluster automatically. Using this module will help you deploy Kubernetes quicker, using the Puppet DSL to define the state. It is fully open source and community contributions are welcome. The module uses the kubeadm toolkit to bootstrap the Kubernetes cluster.

Getting started with the module

  • Start by installing the module from the Puppet Forge.

  • The module comes with a kubetool which will generate the yaml configuration for your Kubernetes deployment. The files produced for each member of the etcd cluster contain certificate information to bootstrap an initial etcd cluster.

  • Add the generated configuration files to Hiera. Each cluster can be allocated its own configuration.

  • Now it's possible to configure the nodes. There can be controller and worker nodes. A node be either controller or worker, but not both.

  • Add the following code to a manifest to make it a controller:

and the following code will made a node a worker:

Using the module in this way will keep your Kubernetes installation consistently enforced based on the manifests used for its creation — Puppet will prevent any drift. It should be noted that the module does not control any containerized applications deployed to the Kubernetes cluster.

We hope you enjoy using the module and that it simplifies using Puppet and Kubernetes together. If you are new to Kubernetes and want get a basic cluster running with a controller and two workers, try using the Puppet Kubernetes sandbox.

For any other questions, join the discussion in the Puppet Community Slack or see the questions from other users on the GitHub repo here.

Davin Hanlon is a senior product manager at Puppet.

Learn more

  • The Puppet Kubernetes module
  • CNCF listing
  • PuppetConf 2017 talk on using the Kubernetes module
  • Video on how to set up a Kubernetes cluster using Puppet and Kream