Troubleshooting

Common issues and how to resolve them

MetalLB IP not reachable from host

Enable promiscuous mode on VirtualBox VMs:

# 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)

Remove the taint to allow scheduling on control plane:

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

NFS mount issues

# Check NFS server is running
vagrant ssh storage -c 'systemctl status nfs-kernel-server'

# Check exports
vagrant ssh storage -c 'exportfs -v'

# Test mount from node
vagrant ssh node01 -c 'showmount -e 192.168.56.20'

Cannot connect to cluster from host

# Copy kubeconfig
vagrant ssh controlplane -c 'sudo cat /etc/kubernetes/admin.conf' > ~/.kube/config-lab

# Use the config
export KUBECONFIG=~/.kube/config-lab

# Verify
kubectl get nodes

Clean install (reset everything)

cd vagrant

# Run cleanup script
./clean.sh

# Create cluster again
vagrant up

Check VirtualBox VMs

# List all VMs
k8s-provisioner vbox list

# Check promiscuous mode status
k8s-provisioner vbox status