k8s-route

by shlomi.ben.david

Helm chartv1.0.6App 0.0.4MITVerified publisher

A Helm chart for k8s-route component

About this chart

K8S-ROUTE

K8S-ROUTE used to route specific pods traffic through dedicated routers.

This chart bootstraps a k8s-route daemonset on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Install helm
  • Add the helm repo
helm repo add shlomibendavid https://shlomibendavid.github.io/helm-charts

Configuring

  • Create an override-values.yaml file
pods_namespace: "development"
pods_label: "app=webapp"
routers:
- name: router1
  internal_ip: "10.0.2.1"
  external_ip: "1.2.3.1"
- name: router2
  internal_ip: "10.0.2.2"
  external_ip: "1.2.3.2"
switch_cycle: 5
cycle_time: 60

NOTES:

  • Both pods_namespace and pods_label can be added and used, but either one of them is required.
  • The app supports up to two routers, for resilience.
  • You should use the name router1 for first router and router2 for the second router.
  • All pods from the development namespace with the app=webapp label will be routed through the specified router.
# Helm 3
helm show values .

Template Generation

# Helm 3
helm template k8s-route --values override-values.yaml .

Installation

To install the helm chart

helm install k8s-route shlomibendavid/k8s-route --values override-values.yaml

Deploy k8s-route with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has k8s-route on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartk8s-route is pinned at v1.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply