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:

  1. Take a snapshot of the vRA VM.
  2. Locate an etcd backup at /data/etcd-backup/ and copy the selected backup to /root
  3. Reset Kubernetes by running vracli cluster leave
  4. 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
  5. Extract VA config from etcd with
    kubectl get vaconfig -o yaml > /root/vaconfig.yaml
  6. Reset Kubernetes once again using
    vracli cluster leave
  7. Run to Install the VA config
    kubectl apply -f /root/vaconfig.yaml --force
  8. Run vracli license to confirm that VA config is installed properly.
  9. Run
    /opt/scripts/deploy.sh