Any way to re-create rkestate file?

Hi, I’ve been working on cluster deployment in a gitops style.As part of a refactor I managed to lose the rkestate file for the cluster I have deployed. RKE now tries to perform an upgrade and fails to get the certs from the cluster.

I thought I was being clever and re-created rkestate from the full-cluster-state configmap. This initially looked like it was going to work but then getting bad tls certificate on the etcd /health endpoints.

Is there a way to successfully re-create the rkestate file? I’ll stash it somewhere safe in future.

I think just running rke up using your cluster.yml file will recreate rkestate, as well as the kube config file.

I use this to regenerate rkestate and then get diff with my pre rkestate. they were exactly same (except a single \n at end of file). I have create my cluster with RKE 1.1.0 and extract using rancher 2.2.x instruction in this gist.

Hello everybody, what about needing to retrieve worker nodes’ information too?
I managed to loose both cluster.yml and cluster.rkestate (don’t ask) and now we have to perform some rework on the cluster (i.e. moving every cluster node to a different network), so being able to use rke CLI tool would be great.
We have, of course, still access to kube_config_cluster.yml.