• Stars
    star
    506
  • Rank 87,236 (Top 2 %)
  • Language HCL
  • License
    GNU General Publi...
  • Created about 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Enable enthusiasts and administrators alike to easily provision highly available and production-ready Kubernetes clusters on Proxmox VE.

TKS

Warning: You must clone this repositiory with recursion in order to pull the submodules.


Summary

As infrastructure becomes more and more abstracted from the user, it becomes both easier to work with and harder to manage. Hypervisors, containers, orchestration platforms, etc. Cloud providers today manage to automate this complexity at scale for millions of enterprise customers. TKS is a collection of projects aiming to provide a similar experience with bare metal.

Each component of TKS is broken out into a dedicated subproject. The is that each component should be able to be used interchangeably with other platforms. For example, TKS-Deploy_Kubernetes_Apps is collection of Kubernetes manifests, Kustomizations, and Ansible projects that should allow you to deploy applications to any Kubernetes cluster.

Combining all of the components together will produce a platform that leverages:

Technology Description
Proxmox VE Type 1 Hypervisor
ZFS Block storage for VMs and file storage for containers
Kubernetes Container Orchestration Platform
HAProxy Virtual Load Balancer for Kubernetes Control Plane nodes
Grafana Stack Federated monitoring platform
Vault Encrypted & decentralized secrets management
Gitlab Source Control & Continuous Integration
ArgoCD Continuous Delivery
Harbor Container Image Registry

When possible, automation is leveraged using common tooling like Terraform, Ansible, Cloud Init, and Kustomize. When configuration is necessary, options are exposed through environment variables and defaults are configured as appropriate.


Requirements

Hardware

TKS requires a server, some storage, and an understanding of how to network everything together. You don't need much compute, I ran all of this on a 2008 Mac Pro for years. You could even re-purpose this to run on a cloud platform like AWS. TKS-Bootstrap_Proxmox provides instructions for getting started with a Bootable USB Flash Drive or Dell iDRAC.

Today I develop this on a Dell PowerEdge R730xd with 384GB of DDR4 ECC memory and 32 Xeon E5-2640 v3 cores. My storage is broken into four pieces:

Software

I'm able to use all of the tooling here from both MacOS and Arch Linux. It will probably work on Windows too. An understanding of how to use the following tools will be helpful, but hopefully not necessary with the documentation.


Getting Started

Clone this repository to retrieve the submodules below. This repository is treated like a Release and each Submodule should reflect the most current stable commit from each project. You can review the master branch for each project for additional unstable updates if desired. Detailed instructions for how to use each project is located in the respective README.

The ./inventory.yml file at the root of this repository is used for Ansible in each of the submodules. Be sure to modify it as per your environment before starting.

Name Description
TKS-Bootstrap_Proxmox * Prepare iDRAC or a Bootable USB Device
* Provision and Configure Proxmox VE
* Initialize Storage & Clustering
TKS-Build_Template * Build a VM template with Ansible
TKS-Bootstrap_Kubernetes * Deploy HAProxy with Terraform to load balance K8s
* Deploy Kubernetes Cluster with Terraform
* Deploy Calico CNI Plugin
TKS-Deploy_Kubernetes_Apps * Deploy Kubernetes apps like MetalLB, Istio, etc.
* Deploy enterprise apps like Jira, OpenVPN, etc.
* Deploy homelab apps like Plex, ruTorrent, Sonarr, etc.

* Leverage Kustomize when possible, Ansible when not
* Support for Istio, External Secrets, resource management, etc.
* Lean on NFS & ZFS for Persistent Volumes
TKS-Deploy_Harbor * Deploy Harbor with Terraform
* Leverage LetsEncrypt to receive a valid SSL Certificate
* Integrate with Kubernetes to self host container images
TKS-Deploy_Grafana * Deploy Grafana with Terraform
* Configure Kubernetes to ship logs
* Configure other apps to ship logs
TKS-Deploy_Vault * Deploy Vault with Terraform
* Configure Vault to act as a secret store for Kubernetes
TKS-Deploy_Argo * Deploy Argo with Terraform
* Configure Argo to perform continuous delivery for Kubernetes
TKS-Deploy_Gitlab * Deploy Gitlab with Terraform
* Configure Gitlab to manage continuous integration for Kubernetes

Frequently Asked Questions

Q: Where did the older Ansible/QEMU based project go?

I retired that project in favor of TKS. You can find the code here, however.

Q: Why did you choose Debian instead of X?

  • Debian is stable and easy to configure
  • I tried to use Flatcar first unsuccessfully
  • CentOS is enterprisey
  • If you're still opposed, consider adding a PR with support for another OS? :)

Q: Why did you expose configuration through environment variables?

IaC and CaC tooling usually expose configuration through variables files, so I understand why you might ask that. My goal in exposing configuration through environment variables was to better support CI/CD with this tooling.

Q: Why didn't you use X? Why aren't you using Y?

Consider opening an issue informing me why you think that.

Q: Why do you make things so complicated?

It's fun. TKS is developed as a hobby.

Q: I found an issue! How should I notify you?

Please file a GitHub issue under the respective subproject. Please do not email me for support until you have initiated the issue process on GitHub. Pull requests are also welcome and encouraged. :)

Q: What are some ways that I can contribute?

  • Add support for additional types of storage
  • Add support for multiple Proxmox nodes
  • Add support for alternative network configurations
  • Improve Terraform & Ansible code quality
  • Submit your Kustomize overlays as an example for others

More Repositories

1

Kubernetes-Manifests

A collection of my Kubernetes Manifests managed by Kustomize & ArgoCD
Jinja
103
star
2

Bootstrap-Kubernetes-with-QEMU

Bootstrap Kubernetes on Proxmox using QEMU, Ansible, and Debian
HTML
76
star
3

LibreNMS-Example-Alerts

Collection of my custom LibreNMS alerts & templates
72
star
4

Network-Diagram

A collection of my homelab diagrams throughout time.
43
star
5

Bootstrap-Kubernetes-with-LXC

Proxmox + LXC + Ansible + Debian = K8s
22
star
6

Personal-Website-With-JS-Terminal-Emulator

Resume website with built in terminal emulator to query health metrics of internal servers
JavaScript
20
star
7

NGINX-Reverse-Proxy-Config

Configuration file used by my NGINX Reverse Proxy.
15
star
8

Bootstrap-Kubernetes

HCL
14
star
9

Bootstrap-Proxmox

Jinja
12
star
10

i3wm-Configuration

A collection of files pertaining to my i3wm configuration.
Shell
8
star
11

Strava-Heatmap-String-Builder

Generate Strava Heatmap URLs that are compatible with Caltopo's Custom Map Layers
Python
6
star
12

Better-Lighter-Pack

CLI tool to parse backpacking gear lists into useful information
Python
3
star
13

Bare-Metal-Kubeadm

BMK is an Ansible-driven solution for provisioning and configuring bare metal Kubernetes clusters.
3
star
14

Odroid-Scripts

Collection of shell scripts used with my Odroid XU4Qs
Shell
3
star
15

Homelab-Configs

Collection of configs for my Proxmox/Docker based homelab.
Shell
2
star
16

Bootstrap-Kubernetes-With-Talos

Build a Talos Linux-based Kubernetes Cluster on Proxmox with Terraform and Ansible
HCL
2
star
17

VMware-vRealize-Operations-Hacks

Several shell scripts written to hack/modify vROps in a few different ways.
Shell
2
star
18

Bootstrap-Arch-Linux

Install & Configure Arch Linux _mostly_ using Ansible
2
star
19

Credit-Card-Database

A simple CC database written in JAVA
Java
1
star
20

Deploy-Grafana

HCL
1
star
21

Siren-Thing-Arduino-Project

Arduino project that emits a siren noise and flashes LEDs while the button is held down.
C++
1
star
22

Dotfiles

A collection of my dotfiles that aren't significant enough to warrant their own repo.
Shell
1
star