Configuration

Customize your k8s-provisioner cluster

k8s-provisioner uses two configuration files:

FileWhat it controls
config.yamlKubernetes and component versions, networks, lab domain, timezone, component toggles, Vault, AI
vagrant/settings.yamlThe VMs: box, name, IP, memory, CPUs, role

config.yaml is the single source of truth: every image version lives under versions:, and the node IPs come from nodes: (the control plane IP and the Vault address are derived from them). It is validated before anything runs, so a typo such as prometheus_stack fails loudly instead of silently skipping a component.

config.yaml

# Lab DNS: CoreDNS + etcd on the storage node serve <name>.<domain>
dns:
  domain: "lab.internal"          # grafana.lab.internal, keycloak.lab.internal, ...

cluster:
  name: "k8s-lab"
  pod_cidr: "10.244.0.0/16"
  service_cidr: "10.96.0.0/12"
  timezone: "America/Sao_Paulo"   # IANA name, every node (incl. storage) and Grafana. Empty = UTC

versions:
  kubernetes: "1.37"
  crio: "v1.37"
  calico: "3.33.0"
  metallb: "0.16.0"
  istio: "1.31.3"
  cert_manager: "v1.21.2"
  external_dns: "v0.23.0"
  keycloak: "26.8.1"
  grafana: "13.2.4"
  prometheus: "v3.15.1"
  loki: "3.7.9"
  tempo: "3.1.1"
  # ... every other component (see config.yaml in the repository)

network:
  interface: "eth1"
  metallb_range: "192.168.56.200-192.168.56.250"
  # controlplane_ip is derived from the controlplane node below; set it only to override

storage:
  nfs_server: "storage"
  nfs_path: "/exports/k8s-volumes"
  default_dynamic: true           # nfs-dynamic is the default StorageClass

nodes:                            # IPs must match vagrant/settings.yaml
  - name: "storage"
    ip: "192.168.56.20"
    role: "storage"
  - name: "controlplane"
    ip: "192.168.56.10"
    role: "controlplane"
  - name: "node01"
    ip: "192.168.56.11"
    role: "worker"
  - name: "node02"
    ip: "192.168.56.12"
    role: "worker"

components:
  cni: "calico"
  load_balancer: "metallb"
  service_mesh: "istio"
  monitoring: "prometheus-stack"  # prometheus-stack | none
  logging: "loki"                 # loki | none (requires monitoring)
  tracing: "otel-tempo"           # otel-tempo | none (requires monitoring)
  keycloak: "enabled"             # enabled | none
  vpa: "enabled"                  # enabled | none
  keda: "enabled"                 # enabled | none
  external_dns: "enabled"         # enabled | none (requires the storage node)
  karpor: "none"                  # enabled | none (~1.5 CPU, ~2 GB RAM)

# HashiCorp Vault on the storage node, outside the cluster
vault:
  enabled: true
  addr: ""      # empty = https://<storage-node-ip>:8200
  token: ""     # env K8S_PROV_VAULT_TOKEN; empty = read from vault-init.json
  ca_cert: ""   # env VAULT_CACERT; empty = /etc/k8s-provisioner/vault-ca.crt

# Node-to-node SSH (copies Vault init data and the ExternalDNS etcd certificate)
provisioning:
  ssh_user: ""       # default: vagrant
  ssh_password: ""   # env K8S_PROV_SSH_PASSWORD; prefer ssh_key_path
  ssh_key_path: ""

# Karpor AI (requires karpor: "enabled")
karpor_ai:
  enabled: false
  backend: "ollama"               # openai | azureopenai | huggingface | ollama
  auth_token: ""                  # env KARPOR_AUTH_TOKEN; not needed for local Ollama
  base_url: ""                    # empty = in-cluster Ollama
  model: "llama3.2:3b"

# Ollama cloud models only
ollama:
  api_key: ""                     # env OLLAMA_API_KEY

Secrets

Never commit real secrets to config.yaml. Use environment variables, which override the file: K8S_PROV_VAULT_TOKEN, K8S_PROV_SSH_PASSWORD, KARPOR_AUTH_TOKEN and OLLAMA_API_KEY. After the first deploy, keep API keys in Vault (secret/k8s-provisioner/api-keys) and leave the fields empty.

Options

KeyValuesNotes
dns.domainany DNS nameEnds up in TLS certificates, the Keycloak issuer and the Vault certificate: change it before vagrant up, and recreate an existing lab
cluster.timezoneIANA nameApplied to every node and to Grafana; empty = UTC
storage.default_dynamictrue / falsetrue makes nfs-dynamic the default StorageClass
components.service_meshistio / noneEvery web UI goes through the Istio ingress gateway; without Istio they are not published
components.external_dnsenabled / noneNeeds a storage node; with none, lab hostnames are not published
components.karpor + karpor_ai.enabledOllama is installed only when both are on and the backend is ollama
vault.enabledtrue / falseWithout Vault, Grafana and Keycloak credentials are generated randomly and written to /etc/k8s-provisioner/*-credentials.txt (mode 0600) on the controlplane

AI models

Local models (run inside the cluster on node01):

ModelRAM RequiredQuality
llama3.2:1b~2 GBBasic
llama3.2:3b~4 GBGood (default)
qwen2.5-coder:7b~8 GBExcellent for code
llama3.1:8b~10 GBExcellent

Cloud models (require ollama.api_key): minimax-m2.5:cloud, qwen3-coder:480b-cloud, glm-4.7:cloud. See Karpor and Ollama.

vagrant/settings.yaml

box_name: "bento/debian-13"
vm:
# Storage VM (NFS, Vault, lab DNS) - must be created first
- name: "storage"
  ip: "192.168.56.20"
  memory: "2048"
  cpus: "1"
  role: "storage"
# Kubernetes VMs
- name: "controlplane"
  ip: "192.168.56.10"
  memory: "6144"
  cpus: "4"
  role: "controlplane"
- name: "node01"
  ip: "192.168.56.11"
  memory: "8192"    # room for Ollama, if enabled
  cpus: "2"
  role: "worker"
- name: "node02"
  ip: "192.168.56.12"
  memory: "4096"
  cpus: "2"
  role: "worker"

The Vagrantfile reads dns.domain, cluster.timezone and the CoreDNS/etcd versions from config.yaml, so the storage node (which the Go binary does not provision) follows the same settings.

VM Resource Allocation

VMMemoryCPUsPurpose
storage2 GB1NFS, HashiCorp Vault, lab DNS
controlplane6 GB4Kubernetes control plane
node018 GB2Worker (+ Ollama when enabled)
node024 GB2Worker
Total20 GB9

Smaller Footprint

Karpor and Ollama are already off by default. If you will not enable them, you can lower node01 to 4 GB in vagrant/settings.yaml. To trim more, turn off what you do not need:

components:
  tracing: "none"
  keda: "none"
  vpa: "none"