BreadcrumbHomeResourcesBlog How To Install and Configure Kubernetes With The Puppet Kubernetes Module April 5, 2019 How to Install and Configure Kubernetes with the Puppet Kubernetes ModuleEcosystems & IntegrationsHow to & Use CasesBy Davin HanlonContainerization has immense potential for development, particularly in cloud environments. The benefits of virtualizing a portable computing environment are attractive for any organization to make their DevOps approach faster and more flexible.This blog provides a quick overview of how Puppet and Kubernetes work and how to use the Puppet Kubernetes module to install, bootstrap, and configure Kubernetes using Puppet.Table of Contents:How Do Puppet and Kubernetes Work?What the Puppet Kubernetes Module DoesTry Out the Puppet Kubernetes SandboxHow Install and Configure Kubernetes with PuppetHow Do Puppet and Kubernetes Work?Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications (containers that make up an application are grouped into logical units). Puppet's configuration management capabilities can be used to solve several problems within Kubernetes, including identification, control, status accounting and verification, and audit.What the Puppet Kubernetes Module DoesThe Kubernetes module for Puppet is used to install and configure Kubernetes. Puppet is a certified Kubernetes installer by the Cloud Native Computing Foundation.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.OSP vs. Puppet EnterpriseIs it time to switch?GET EBOOKUsing this module will help you deploy Kubernetes quicker, using the Puppet Desired State Language (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.Try Out the Puppet Kubernetes SandboxIf you're new to Kubernetes and want get a basic cluster running with a controller and two workers, you're in luck. Kubernetes Rules Everything Around Me (KREAM) is a development environment for the Puppet Kubernetes module that can help you get up to speed.Watch the below video for a tutorial on installing and configuring a Kubernetes cluster:How Install and Configure Kubernetes with PuppetInstall the Puppet Kubernetes ModuleStart by downloading the Puppet Kubernetes 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 Configuration Files to HieraNext, add the configuration files generated by the kubetool to Hiera. Each cluster can be allocated its own configuration.Configure Your Controller or Worker NodesNow it's time to configure the nodes. There can be controller and worker nodes. A node be either controller or worker, but not both.To configure a controller note, add the following code to a manifest:class {'kubernetes': controller => true, }To configure a worker note, add this code instead:class {'kubernetes': worker => true, }Using the module in this way will keep your Kubernetes installation consistently enforced based on the manifests used for its creation, and Puppet will prevent any drift. Keep in mind that the module does not control any containerized applications deployed to the Kubernetes cluster.GET A FREE TRIAL OF PUPPET Learn MoreLearn about The Future of Kubernetes.The benefits of version range support when managing packages with Puppet.Read about the challenges of container configuration and how to overcome them.
Davin Hanlon Product Manager, Puppet by Perforce Davin Hanlon is a product manager at Puppet. He works with the modules and network automation teams building solutions that help customers manage their infrastructure with Puppet. He's based in Belfast.