All Projects → onedr0p → k3s-homeops-ansible

onedr0p / k3s-homeops-ansible

Licence: other
Bootstrap a k3s cluster on top of Ubuntu 20.04

Programming Languages

HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to k3s-homeops-ansible

packer-FreeBSD
Build a FreeBSD VM for Vagrant using packer
Stars: ✭ 23 (-51.06%)
Mutual labels:  vagrant, virtualbox
kubernetes the easy way
Automating Kubernetes the hard way with Vagrant and scripts
Stars: ✭ 22 (-53.19%)
Mutual labels:  vagrant, virtualbox
ansible-vbox-vagrant-kubernetes
Building a Kubernetes Cluster with Vagrant and Ansible
Stars: ✭ 70 (+48.94%)
Mutual labels:  vagrant, virtualbox
vagrant-pebble-sdk
This repo contains allows you to quickly and easily create a Virtual Machine with a working Pebble SDK install using Vagrant and Virtualbox
Stars: ✭ 13 (-72.34%)
Mutual labels:  vagrant, virtualbox
Book k8sInfra
< 컨테이너 인프라 환경 구축을 위한 쿠버네티스/도커 >
Stars: ✭ 176 (+274.47%)
Mutual labels:  vagrant, gitops
htk8s
HTPC services running on Kubernetes
Stars: ✭ 69 (+46.81%)
Mutual labels:  gitops, k3s
opnsense-starterkit
Try opnsense, build opnsense images or start development
Stars: ✭ 18 (-61.7%)
Mutual labels:  vagrant, virtualbox
upstream-institute-virtual-environment
A Vagrant-based image creator for OpenStack Upstream Training sessions
Stars: ✭ 18 (-61.7%)
Mutual labels:  vagrant, virtualbox
gitops-playground
Reproducible infrastructure to showcase GitOps workflows and evaluate different GitOps Operators on Kubernetes
Stars: ✭ 77 (+63.83%)
Mutual labels:  gitops, k3s
junos-orchestration-with-vagrant
How to orchestrate and provision Junos virtual machines with Vagrant
Stars: ✭ 14 (-70.21%)
Mutual labels:  vagrant, virtualbox
rails-development-environment
Development environment for Ruby on Rails based on Vagrant, VirtualBox and Ubuntu 16.04 LTS (Xenial Xerus).
Stars: ✭ 50 (+6.38%)
Mutual labels:  vagrant, virtualbox
docker-hands-on-guide
Hands on guide for docker, k8s cluster lightweight virtualization.
Stars: ✭ 25 (-46.81%)
Mutual labels:  vagrant, virtualbox
k8s-gitops
No description or website provided.
Stars: ✭ 23 (-51.06%)
Mutual labels:  gitops, k3s
paas-templates
Bosh, CFAR, CFCR and OSB services templates for use with COA (cf-ops-automation) framework
Stars: ✭ 16 (-65.96%)
Mutual labels:  gitops, k3s
packer-windows
Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
Stars: ✭ 1,116 (+2274.47%)
Mutual labels:  vagrant, virtualbox
acquia-cloud-vm
VirtualBox/Vagrant-based VM to closely match Acquia Cloud environment.
Stars: ✭ 20 (-57.45%)
Mutual labels:  vagrant, virtualbox
iosxrv-x64-vbox
IOS XR VirtualBox Vagrant Image Generation tools
Stars: ✭ 72 (+53.19%)
Mutual labels:  vagrant, virtualbox
nodejs-dev-vm
DEPRECATED Simple Node.js Development VM using Vagrant + VirtualBox + Ansible
Stars: ✭ 25 (-46.81%)
Mutual labels:  vagrant, virtualbox
TYPOTry
A small Vagrant box to try out the most recent TYPO3 release
Stars: ✭ 21 (-55.32%)
Mutual labels:  vagrant, virtualbox
k8s-gitops
Homelab GitOps repository. Cluster definition state via code.
Stars: ✭ 47 (+0%)
Mutual labels:  gitops, k3s

k3s-homeops-ansible

This is an opinionated way to provision Ubuntu 20.04 and install k3s on top.

Prerequisites

There's a couple things that will need to be done before you get starting running with Ansible.

  1. Install Ansible >= 2.10.0 on your local machine
  2. Install a supported OS on each of your nodes
  3. Set static IP for each node on the OS or in your router (you can use the IP assigned via DHCP, but it's not recommended)
  4. Copy your local public ssh key with ssh-copy-id to each node
  5. Optional review playbooks and roles to understand what these Ansible script will do

After that we're ready to continue with Ansible...

Ansible

Get started by cloning this repository and copying the hosts and config into a new directory.

# clone this repo
git clone https://github.com/onedr0p/k3s-homeops-ansible
# change into the directory
cd k3s-homeops-ansible
# copy the hosts and config to a new folder
cp -r ./inventory/local ./inventory/custom

Update the Ansible config files

Note: This project uses PyratLabs/ansible-role-k3s for installing k3s. Configuration options can be viewed in their README.

After you have copied over the configuration files you will need to update the configuration in the files:

  • ./inventory/custom/hosts.yml: Host definitions
  • ./inventory/custom/host_vars/*.yml: Host IP and host level variables
  • ./inventory/custom/group_vars/*.yml: Global variables for all hosts

Each file it carefully documented.

Get Ansible dependencies

ansible-galaxy install -r requirements.yml

Run the playbooks

# This playbook will prepare your nodes for Kubernetes
ansible-playbook -i ./inventory/custom/hosts.yml ./playbooks/os-build.yml
# This playbook will install k3s
ansible-playbook -i ./inventory/custom/hosts.yml ./playbooks/cluster-build.yml

Verify the cluster is up and running

kubectl --kubeconfig ./kubeconfig get nodes -o wide
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].