Skip to content

mikeyGlitz/k3s-home-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kuberentes Cluster Provisioner

This Project contains a configuration-as-code set up which utilizes Ansible to provision a Kubernetes cluster using k3s.

Setting up Ansible

Make sure that python3 and pip are installed.

# Debian/Ubuntu
sudo apt-get update && sudo apt-get install -y python3 python3-pip
# Mac
brew install python3

Install Ansible using pip

pip3 install ansible

ℹ If you're using Visual Studio Remote Containers for VS Code, installing the tools will have already been completed during the container Installation procedures (see the files in .devcontainer)

Running the Ansible Scripts

This script is designed to be run in two steps:

# First Run
ansible-playbook --ask-pass playbook.yml --skip-tags=media
# Last Run
ansible-playbook --ask-pass playbook.yml --tags=media --extra-vars="plex_token=<plex_claim_token>"

You can obtain a plex token by visiting https://plex.tv/claim Plex tokens are only valid for 4 minutes. This playbook takes longer than 4 minutes to run which is why the media role needs to be executed separately.

Variables

A set of variables are defined within this playbook. The values can be overridden using the Ansible --extra-vars argument.

The full variables list is detailed below:

Variable Default Description
terraform_version 0.13.1 Version of Terraform to install
kubectl_version 1.6.2 Version of Terraform kubectl provider
domain haus.net Domain name
ip_addresses [] List of IP addresses for k8s cluster
keycloak_user manager Default Admin user for Keycloak
keycloak_password p@$$w0rd! Default Admin password for Keycloak
ldap_password p@$$w0rd! Default password for LDAP admin acct
plex_token "" Plex claim token for new plex server
files_user manager Default Admin user for Owncloud
files_password p@$$w0rd! Default Admin password for Owncloud
openfaas_password p@$$w0rd! Default password for OpenFaaS

References

About

Sets up a Kubernetes cluster using Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published