-
Hello Talos team It seems I made a newbie mistake and now I don't know how to fix it :( I had a working cluster. At some point I decided to do "talosctl gen config" with the --force option for it and as a result I got 3 new files: controlplane.yaml, worker.yaml, talosconfig which erased similar files that was before executing the command with the --force key. Then I copied the talosconfig file with replacement to the ~/.talos/config directory. Now when I try to access my cluster using the talosctl utility, I get a certificate error: rpc error: code = Unavailable desc = last connection error: connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "x509: Ed25519 verification failure" while trying to verify candidate authority certificate "talos")" Is there a way to fix this and restore access to my cluster? Or I must deploy it "from scratch" again ? I'll saw the very similar discussion in this forum (#3704) but there is no answer for user QuinnBast question and in my case I already have working kubernetes cluster but can't access to it with talosctl utility.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As you create new client-side So unless you have a backup, the access to the cluster is lost. You could do a little hack though (which works today, but might not work in the future): as you have admin-level kubectl debug -it node/cp-node-1 --image alpine --profile=sysadmin -n kube-system From within that pod, you can copy out the file
|
Beta Was this translation helpful? Give feedback.
As you create new client-side
talosconfig
file, you erased the previous client-side configuration including the cluster secrets, etc.So unless you have a backup, the access to the cluster is lost.
You could do a little hack though (which works today, but might not work in the future): as you have admin-level
kubectl access
, you can create a privileged pod on the controlplane node with something like:From within that pod, you can copy out the file
/host/system/state/config.yaml
, which will be yourcontrolplane.yaml
file (fromgen config
). After that you can follow the doc.