/ansible-role-kubernetes

Ansible role for installing Kubernetes

Primary LanguagePythonMIT LicenseMIT

Ansible Role: Kubernetes

Build Status Ansible Galaxy License

Role to install the Kubernetes container cluster manager.

Requirements

  • Ansible >= 2.3

  • Linux Distribution

    • Debian Family

      • Ubuntu

        • Xenial (16.04)

Role Variables

The following variables will change the behavior of this role (default values are shown below):

# Node type: determines what features are installed.
# - worker:
#     - kubelet
#     - kubernetes-cni
# - master:
#     - kubelet
#     - kubectl
#     - kubernetes-cni
# - admin:
#     - kubelet
#     - kubectl
#     - kubeadm
#     - kubernetes-cni
kubernetes_node_type: worker

# The ID of the APT key for the Kubernetes repository
kubernetes_apt_key_id: 6A030B21BA07F4FB

Example Playbook

- hosts: servers
  roles:
    - role: gantsign.kubernetes
      kubernetes_node_type: worker

More Roles From GantSign

You can find more roles from GantSign on Ansible Galaxy.

Development & Testing

This project uses Molecule to aid in the development and testing; the role is unit tested using Testinfra and pytest.

To develop or test you'll need to have installed the following:

To run the role (i.e. the tests/test.yml playbook), and test the results (tests/test_role.py), execute the following command from the project root (i.e. the directory with molecule.yml in it):

molecule test

License

MIT

Author Information

John Freeman

GantSign Ltd. Company No. 06109112 (registered in England)