Git Product home page Git Product logo

ansible_role_microk8s's Introduction

Ansible Role: microk8s

Role to download and install microk8s the smallest, simplest, pure production K8s.

Requirements

  • Ansible >= 2.7
  • Linux Distribution
    • Debian Family
      • Ubuntu
        • Xenial (16.04)
        • Bionic (18.04)
    • Arch Linux (untested)

License

MIT

Usage

Role Variables

Some variables available in this role are listed here. The full set is defined in [defaults/main.yml](defaults/main.yml).

  • microk8s_version: Version to use, defaults to 1.19/stable.
  • microk8s_plugin_*_enable: Enable/disable various plugins.
  • microk8s_enable_HA: Enable/disable high-availability.
  • microk8s_group_HA: Hostgroup whose members will form HA cluster.
  • microk8s_csr_template: If defined, will cause a custom CSR to be used in generating certificates.

Basic playbook

- hosts: servers
  roles:
    - role: istvano.microk8s

Custom certificate request template

It might be useful to customize the certificate request template used by MicroK8s in generating cluster certificates. For example, additional SANs can be added to the certificates such that the MicroK8s certificates validate when addressed from outside the cluster, such as through a reverse proxy.

To generate a CSR template, the easiest is probably to use the role without a template, and then copy the CSR in /var/snap/microk8s/current/certs/csr.conf.template to your playbook's templates directory, make the edits and set the microk8s_csr_template variable accordingly, and re-run the playbook.

Testing

Using Molecule wrapper and system Python

  • ./moleculew lint
  • ./moleculew create
  • ./moleculew list
  • ./moleculew check
  • ./moleculew test

Using Python virtual environment

  • Set up virtual environment
    $ python3 -m venv venv
    
  • Activate the environment
    $ . venv/bin/activate
    
  • Install Molecule with lint and Docker options
    $ pip install 'molecule[lint,docker]'
    
  • Install up-to-date Ansible package if necessary
    $ pip install ansible
    
  • Run the test commands:
    • molecule lint
    • molecule create
    • molecule list
    • molecule check
    • molecule test

ansible_role_microk8s's People

Contributors

defilan avatar ericpardee avatar eshikhov avatar istvano avatar markmywords avatar turiok avatar vondowntown avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.