Skip to content

qjoly/GitOps

Repository files navigation

Helm LOGO
Typing SVG

Blog Kubernetes Linux

HomeLab

Homelab setup based on Omni and Talos.

Overview

This repository contains the configuration files for my homelab. The homelab is a collection of servers and services that I run at home or in the cloud. The homelab is used for learning, testing, and hosting projects.

Stack

To avoid headaches and to keep things simple, I use Talos to manage the Kubernetes cluster (don't hesitate to check a little article I wrote about it). To be more specific, I have a self-hosted Omni instance to manage all clusters with a single endpoint and secure them with SSO.

Core Components

Cluster

Talos Kubernetes   Age Uptime-Days Node-Count Pod-Count CPU-Usage Memory-Usage

Talos Kubernetes   Age Uptime-Days Node-Count Pod-Count CPU-Usage Memory-Usage

  • Turing : A cluster based on small devices (ARM and x86) at home. This cluster is used for local hosting and testing. (Prometheus not yet available)

Talos Kubernetes   Age Uptime-Days Node-Count Pod-Count CPU-Usage Memory-Usage

About the 'Kubevirt' Virtual Cluster

While this repository primarily contains three physical clusters (mocha, cortado, and turing), a fourth cluster configuration exists in the kubevirt directory. This is a virtual cluster that runs as workloads on top of another cluster (primarily hosted on mocha due to its greater resource capacity).

This virtual cluster is provisioned using Kubevirt technology integrated with the Omni Infrastructure provider. For a detailed exploration of this setup, you can read my article about Omni and Kubevirt integration.

Why Use a Virtual Cluster?

There are two primary motivations behind maintaining a separate virtual cluster:

  1. Network Isolation: It allows for different pod CIDR and service CIDR ranges than the host cluster, preventing network overlaps that could cause routing issues.

  2. Configuration Testing: It provides an isolated environment that mirrors my production clusters with the same core components (metrics server, ArgoCD, ApplicationSet, etc.), making it perfect for testing configurations and upgrades safely.

Usage

To use this repository, you need to have the Omni CLI installed. You can find the installation instructions here.

Download the omniconfig file from the Omni instance and merge it with the one in your home directory.

omnictl config merge ./omniconfig.yaml

Then, you can deploy the cluster based on the MachineClass you have configured.

cd lungo
omnictl cluster template sync -f template.yaml

This will create a new cluster based on the configuration you have set in the template.yaml file. You can download the kubeconfig file using the following command:

omnictl kubeconfig --cluster lungo
Example of kubeconfig file
apiVersion: v1
kind: Config
clusters:
  - cluster:
      server: https://omni.home.une-tasse-de.cafe:8100/
    name: omni-lungo
contexts:
  - context:
      cluster: omni-lungo
      namespace: default
      user: [email protected]
    name: omni-lungo
current-context: omni-lungo
users:
- name: [email protected]
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
        - oidc-login
        - get-token
        - --oidc-issuer-url=https://omni.home.une-tasse-de.cafe/oidc
        - --oidc-client-id=native
        - --oidc-extra-scope=cluster:lungo
      command: kubectl
      env: null
      provideClusterInfo: false

About

Homelab setup based on Omni and Talos.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •