Skip to content

Ansible Playbook to deploy Rancher on a Kubernetes cluster

Notifications You must be signed in to change notification settings

TimGrt/rancher-installation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rancher Deployment

Ansible Playbook to deploy Rancher on a Kubernetes cluster.

Ansible Lint CodeFactor

The playbook installs Helm on the Ansible Master node, appropriate sudo permissions must be available. The Rancher deployment needs certificates, cert-manager is therefor installed on the Kubernetes cluster by the playbook. Necessary kube config is read from the Kubernetes master node.
The Rancher stable release is installed by default, to install the latest release, change the default variable in the rancher role.
Tested with self-hosted k3s cluster on Raspberry Pi's, but should also work with other Kubernetes distributions. The Master node was x86 with Ubuntu.

Requirements

Minimum Ansible requirements:

ansible-base (2.10.0 or higher)

or

ansible-core (2.11.0 or higher)

The following Ansible Collections are necessary:

  • ansible.posix
  • community.general
  • community.kubernetes

Missing collections can be installed with the provided requirements.yml file.

ansible-galaxy collection install -r requirements.yml

The following Python packages are necessary:

  • openshift
  • yaml

Missing collections can be installed with the provided requirements.yml file.

pip3 install -r requirements.txt

The playbook expects a running Kubernetes cluster, at least the Kubernetes master node must be reachable to get the kube config file, all tasks are then executed on localhost.

Execution

Execute the playbook:

ansible-playbook -i hosts main.yml

Author

Created 2021 by Tim Grützmacher

About

Ansible Playbook to deploy Rancher on a Kubernetes cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages