Forge Home

kubernetes

Early implementation to setup a kubernetes master and minion

8,614 downloads

7,633 latest version

4.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.3.0 (latest)
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Jan 6th 2016

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'chmjs-kubernetes', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add chmjs-kubernetes
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install chmjs-kubernetes --version 0.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

chmjs/kubernetes — version 0.3.0 Jan 6th 2016

kubernetes

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with kubernetes
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module at present install a kubernetes master and minion. it is still heavily in development as at present should only be used on CentOS 7 unless one wishes to add their own repos

Module Description

Will add a basic minion/master on a series of CentOS 7 Boxes

Setup

Example master setup

node 'master'{

    class {'kubernetes::master':
      master_name => '173.16.32.11', #can be hostname if dns setup
      minion_name => ['173.16.32.12','173.16.32.12'], #can be hostname if dns setup
    }
    contain 'kubernetes'
}

Example minion setup

node 'minion'{

    class {'kubernetes::minion':
      master_name => '173.16.32.11', #can be hostname if dns setup
      minion_name => '173.16.32.12', #can be hostname if dns setup
    }
    contain 'kubernetes'
}

These values can also be specified in hiera

For a master

---
  kubernetes::master_name: '173.16.32.11'
  kubernetes::minion_name:  ['173.16.32.12']

For minions

---
  kubernetes::master_name: '173.16.32.11'
  kubernetes::minion_name:  '173.16.32.12'

What kubernetes affects

kubernetes will install a kube master if kubernetes::master class is called, else it will add a minion if kubernetes::minion is called

Setup Requirements OPTIONAL

Be sure epel is enabled, if you do not have epel you will need to yum install epel-release none as yet but std lib will be needed soon

Beginning with kubernetes

I have tested this on CentOS 7 since epel has all of the rpms you will need (once epel is enabled), no additional packages should be needed. As yet I have not tied down the ordering , this will follow.

Usage

Example master setup

node 'master'{

    class {'kubernetes::master':
      master_name => '173.16.32.11', #can be hostname if dns setup
      minion_name => ['173.16.32.12','173.16.32.12'], #can be hostname if dns setup
    }
    contain 'kubernetes'
}

Example minion setup

node 'minion'{

    class {'kubernetes::minion':
      master_name => '173.16.32.11', #can be hostname if dns setup
      minion_name => '173.16.32.12', #can be hostname if dns setup
    }
    contain 'kubernetes'
}

Reference

classes as follows:

kubernetes
kubernetes::master
kubernetes::minion

Limitations

This should not be considered a production release it is far too young and undeveloped. Nonetheless it can be used as a guide. I would suggest testing this with vagrant.

Development

I welcome any input since we have very few kubernetes modules