No description
Find a file
2019-10-27 00:12:02 +01:00
defaults Added new options for Flannel interfaces, tested on openSUSE LEAP 15.1 2019-09-29 18:11:05 +01:00
handlers Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
meta Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
molecule/default Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
tasks Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
templates Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
vagrant Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
vars Add support for armv7l arch 2019-04-24 16:15:39 -07:00
.gitignore Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
.travis.yml Removed failing test, works in Vagrant but not docker. 2019-10-27 00:12:02 +01:00
.yamllint Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00
LICENSE Bugfix variable on Docker install, updated README.md and added LICENSE 2019-03-10 14:53:52 +00:00
README.md Updated for 0.10.0, adding molecule testing with Travis-CI 2019-10-26 22:23:17 +01:00

Ansible Role: k3s

Ansible role for installing Racher Labs k3s ("Lightweight Kubernetes") as either a standalone server or cluster.

Build Status

Requirements

This role has been tested on Ansible 2.6.0+ against the following Linux Distributions:

  • CentOS 7
  • Debian 9
  • Debian 10
  • openSUSE Leap 15
  • Ubuntu 18.04 LTS
  • Amazon Linux 2

Disclaimer

⚠️ Not suitable for production use.

Whilst Rancher Labs are awesome, k3s is a fairly new project and not yet a v1.0 release so extreme caution and operational rigor is recommended before using this role for any serious development.

Role Variables

Group Variables

Below are variables that are set against all of the play hosts for environment consistency.

Variable Description Default Value
k3s_release_version Use a specific version of k3s, eg. v0.2.0. Specify false for latest. false
k3s_github_url Set the GitHub URL to install k3s from. https://github.com/rancher/k3s
k3s_install_dir Installation directory for k3s. /usr/local/bin
k3s_control_workers Are control hosts also workers? true
k3s_ensure_docker_installed Use Docker rather than Containerd? false
k3s_no_flannel Do not use Flannel false

Important note about k3s_release_version

If you do not set a k3s_release_version the latest version of k3s will be installed. If you are developing against a specific version of k3s you must ensure this is set in your Ansible configuration, eg:

k3s_release_version: v0.2.0

Host Variables

Below are variables that are set against specific hosts in your inventory.

Variable Description Default Value
k3s_control_node Define the host as a control plane node, (True/False). false
k3s_flannel_interface Define the flannel proxy interface for this node.

Important note about k3s_control_node

Currently only one host can be defined as a control node, if multiple hosts are set to true the play will fail.

If you do not set a host as a control node, the role will automatically delegate the first play host as a control node.

Important note about k3s_flannel_interface

If you are running k3s on systems with multiple network interfaces, it is necessary to have the flannel interface on a network interface that is routable to the master node(s).

Dependencies

No dependencies on other roles.

Example Playbook

Example playbook:

- hosts: k3s_nodes
  roles:
     - { role: xanmanning.k3s, k3s_release_version: v0.2.0 }

License

BSD

Author Information

Xan Manning