Published on 11 January 2018 by

Two new Puppet Supported modules make it possible to install, start managing, and deploy applications to a Kubernetes cluster in about 15 minutes.

The modules –– puppetlabs/kubernetes and puppetlabs/helm –– turn the often harrowing job of deploying Kubernetes, an open source system for automating deployment, scaling, and management of containerized applications, into a straightforward task. Anyone beginning or continuing a container or microservice environment can use the modules with Puppet or Puppet Enterprise 2015.2 and above.

Supported Puppet modules are rigorously tested with Puppet Enterprise, maintained for the same lifecycle as Puppet Enterprise, and are compatible with multiple platforms.

To help you get started, Puppet has created Kream, a complete development environment to help you quickly deploy a Kubernetes cluster using Puppet code. Kream makes it simple to write and test Puppet code to manage your Kubernetes clusters so you can verify your changes before pushing them to your production cluster(s). It’s available on GitHub and runs on Ubuntu or CentOS platforms. Kream creates Kubernetes hosts, installs and runs Puppet on them, and adds classes from the puppetlabs/kubernetes module.

Kubernetes Development Environment

Helm makes deploying applications to Kubernetes as simple as running apt or yum package managers on Linux. The puppetlabs/kubernetes module includes kube_tool, which auto-generates a YAML file that contains all your security parameters, the bootstrap token, and other cluster configurations. You can use it to configure nodes as a bootstrap controller, controllers, or workers. The Puppet code classes are simple and straightforward:

class { 'kubernetes':
  controller           => true,
  bootstrap_controller => true,
}

Puppet code for Kubernetes

The puppetlabs/helm module installs the Helm package manager, which consists of the Helm client (Helm) and the Helm server (Tiller). It also manages Helm deployments, including charts, which describe Kubernetes resources such as users, load balancers, and other environmental resources.

helm::create { 'myapp':
  env        => $env,
  chart_path => '/tmp',
  chart_name => 'myapp',
  path       => $path,
}

Deploying an application such as MySQL from a Helm chart is then straightforward:

helm::chart { 'mysql':
  ensure        => present,
  chart         => 'stable/mysql',
  Env           => $env,
  path          => $path,
  release_name  => 'mysql',
}

Puppet is working on other Supported modules for managing the complexities of Kubernetes, including storage and networking. Look for announcements about those later this year. Head over to the Puppet Forge and explore the Kubernetes and Helm tools today.

John Tonello is a senior technical marketing manager at Puppet.

Learn more

Share via:

Add new comment

The content of this field is kept private and will not be shown publicly.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.