Recently, services didn’t come back up again on vRA 8.6 single node installation after a power loss in my homelab.
The connection to Kubernetes was refused and failed with the following error while executing kubectl get pods
:
The connection to the server vra-k8s.local:6443 was refused - did you specify the right host or port?
I was finally able to fix it using the procedure described in VMware KB article 82378:
- Take a snapshot of the vRA VM.
- Locate an etcd backup at /data/etcd-backup/ and copy the selected backup to /root
- Reset Kubernetes by running vracli cluster leave
- Restore the etcd backup in /root by using the /opt/scripts/recover_etcd.sh command.
Example:/opt/scripts/recover_etcd.sh --confirm /root/backup-123456789.db
- Extract VA config from etcd with
kubectl get vaconfig -o yaml > /root/vaconfig.yaml
- Reset Kubernetes once again using
vracli cluster leave
- Run to Install the VA config
kubectl apply -f /root/vaconfig.yaml --force
- Run
vracli license
to confirm that VA config is installed properly. - Run
/opt/scripts/deploy.sh