Troubleshooting

Common issues and how to resolve them

Browser can’t open a lab URL

Match the error to the cause (setup steps in Host Setup):

SymptomCauseFix
no such host / ERR_NAME_NOT_RESOLVED (also the kubectl OIDC login: lookup keycloak.lab.internal: no such host)The host does not send lab.internal to the lab DNSAdd the resolver rule. Compare dig @192.168.56.20 grafana.lab.internal +short (server) with dscacheutil -q host -a name grafana.lab.internal (macOS)
Same, but only in one browserThe browser’s Secure DNS (DNS-over-HTTPS) bypasses the system resolverTurn off Use secure DNS (Brave/Chrome: …://settings/security)
ERR_ADDRESS_UNREACHABLE, no route to host (macOS), while Safari worksmacOS Local Network privacy blocks the appSystem Settings → Privacy & Security → Local Network → enable the app, then restart it
NET::ERR_CERT_AUTHORITY_INVALID with no “proceed” linkCA not trusted (HSTS forbids bypassing), or the lab was recreated and the CA changedTrust the CAs from vagrant/certs/; after a rebuild the host setup commands remove the old ones first
404 on one site right after visiting anotherHTTP/2 connection reused across Gateways that share a certificateEvery Gateway needs its own certificate (see Lab DNS); clear stale connections with brave://net-internals/#sockets → Flush socket pools, or restart the browser

Quick checks from the host:

dig @192.168.56.20 keycloak.lab.internal +short      # lab DNS answers → 192.168.56.200
curl -sI https://grafana.lab.internal | head -1      # DNS + TLS trust + routing in one go

kubectl OIDC login fails with an x509 error

ErrorCauseFix
x509: certificate signed by unknown authority after recreating the labThe OIDC kubeconfig embeds the old lab CAFetch kubeconfig-oidc from Vault again (steps)
x509: ECDSA verification failure (macOS)Several copies of k8s-lab-ca in the System keychainRe-run the host setup commands: they delete every copy by hash before trusting the new CA

Grafana shows “No data” or an empty data source

SymptomCauseFix
Every Prometheus/Tempo panel empty, Data source dropdown blank, log Could not find plugin definition for data sourceGrafana tried to auto-update its bundled plugins on the read-only root filesystem and lost themThe installer sets GF_PLUGINS_PREINSTALL_AUTO_UPDATE=false; on an older install: kubectl set env deploy/grafana -n monitoring GF_PLUGINS_PREINSTALL_AUTO_UPDATE=false
k8s-lab Resources row empty for a workloadIt needs a few minutes of cAdvisor historyWait, or pick a workload that has been running longer; check up{job="kubelet"}
A Certificates or DNS stat says “No data” / “down”The scrape target is downPrometheus → Status → Targets: jobs blackbox, kube-dns, external-dns, lab-dns

Vault is sealed

Vault seals itself whenever the storage node restarts:

vagrant ssh controlplane -c 'sudo k8s-provisioner vault unseal'
vagrant ssh controlplane -c 'sudo k8s-provisioner vault status'

MetalLB IP not reachable from host

# Using the CLI tool
./build/k8s-provisioner-darwin-arm64 vbox promisc

# Or manually
VBoxManage controlvm "Storage" nicpromisc2 allow-all
VBoxManage controlvm "Master" nicpromisc2 allow-all
VBoxManage controlvm "Node01" nicpromisc2 allow-all
VBoxManage controlvm "Node02" nicpromisc2 allow-all

Pods stuck in Pending (control-plane taint)

kubectl taint nodes controlplane node-role.kubernetes.io/control-plane:NoSchedule-

NFS mount issues

vagrant ssh storage -c 'systemctl status nfs-kernel-server'
vagrant ssh storage -c 'exportfs -v'
vagrant ssh node01 -c 'showmount -e 192.168.56.20'

Lab DNS

vagrant ssh storage -c 'systemctl status etcd coredns --no-pager'
kubectl -n external-dns logs deploy/external-dns

More in Lab DNS → Troubleshooting.

Cluster provisioning fails

vagrant ssh controlplane
sudo journalctl -u kubelet -n 100 --no-pager

Preview the commands a step runs, or run it with verbose output:

sudo k8s-provisioner provision workloads -v
sudo k8s-provisioner provision workloads --dry-run

Check VirtualBox VMs

./build/k8s-provisioner-darwin-arm64 vbox list
./build/k8s-provisioner-darwin-arm64 vbox status

Clean install (reset everything)

cd vagrant
./clean.sh     # destroys the VMs, removes .vagrant metadata, cleans orphan VMs
vagrant up

After a clean install, redo the host setup: the CAs and kubeconfigs are new.