Troubleshooting¶
This page documents common issues you may encounter and their solutions.
Provisioning Issues¶
vagrant up hangs or times out¶
Symptoms: The terminal appears stuck during provisioning with no progress.
Solutions:
- Check your internet connection — packages are downloaded during first provisioning
- Ensure VirtualBox is not blocked by your firewall
- Ensure Hyper-V is disabled (Windows):
bcdedit /set hypervisorlaunchtype off - Try destroying and recreating:
vagrant destroy -f && vagrant up
kubeadm init fails with preflight errors¶
Symptoms: Provisioning fails during Phase 3 on the control plane.
Solutions:
- Ensure the control plane has at least 2 CPUs in
cluster.yaml - Ensure at least 2 GB RAM is allocated to the control plane
- Check that no other Kubernetes installation exists on the VM
Worker nodes fail to join¶
Symptoms: Workers time out waiting for join-command.sh.
Solutions:
- Verify the control plane provisioned successfully first
- Check that
/vagrantsynced folder is working:vagrant ssh node01 -c "ls /vagrant/" - If the join token expired (cluster older than 24 hours), regenerate it:
vagrant ssh controlplane
sudo kubeadm token create --print-join-command > /vagrant/join-command.sh
exit
vagrant provision node01
Runtime Issues¶
Nodes show NotReady after resume¶
Symptoms: After vagrant up (resuming from halt), nodes show NotReady.
Solution: Wait 30–60 seconds for kubelet and Calico to re-establish connections. If a node doesn't recover:
Pods stuck in ContainerCreating¶
Symptoms: Pods don't start, staying in ContainerCreating state.
Solutions:
- Check Calico status:
- If Calico pods are not running, check the Tigera operator:
- Restart Calico on the affected node:
kubectl connection refused¶
Symptoms: kubectl commands fail with "connection refused" on the control plane.
Solutions:
- Restart the API server and kubelet:
- Verify the API server is running:
- Check kubeconfig:
DNS resolution failures inside pods¶
Symptoms: Pods cannot resolve hostnames (e.g., nslookup kubernetes.default fails).
Solutions:
- Check CoreDNS pods:
- Restart CoreDNS:
VirtualBox Issues¶
VirtualBox kernel driver not installed¶
Symptoms: vagrant up fails with VirtualBox driver errors.
Solutions:
IP address conflict¶
Symptoms: VMs fail to start or cannot communicate.
Solutions:
- Check for conflicting VirtualBox host-only networks:
- Ensure no other VMs use the
192.168.56.xrange - Remove stale host-only networks from VirtualBox preferences
Getting More Help¶
Collect Diagnostic Information¶
If you need to report an issue, collect:
# Vagrant status
vagrant status
# VirtualBox version
VBoxManage --version
# Vagrant version
vagrant --version
# Node status (from control plane)
kubectl get nodes -o wide
kubectl get pods -A
kubectl get events --sort-by=.metadata.creationTimestamp
Report an Issue¶
Open an issue at github.com/Ruhanyat-994/kubeadm-automation/issues with:
- Your host OS and version
- VirtualBox and Vagrant versions
- The error message or unexpected behaviour
- Your
cluster.yamlcontent (with any sensitive data removed) - Diagnostic output from the commands above