Cluster must have at least one etcd plane host: please specify one or more etcd in cluster config

I am trying to upload cluster.yml file from cli. I am getting the below response when i execute the command rke up config --name cluster.yml

[root@csp-centos2 etcd-snapshots]# rke up config cluster.yaml
INFO[0000] Running RKE version: v0.3.2
INFO[0000] Initiating Kubernetes cluster
INFO[0000] [certificates] Generating admin certificates and kubeconfig
INFO[0000] Successfully Deployed state file at [./cluster.rkestate]
INFO[0000] Building Kubernetes cluster
FATA[0000] Cluster must have at least one etcd plane host: please specify one or more etcd in cluster config
[root@csp-centos2 etcd-snapshots]#

rke version v0.3.2
Please suggest me the way how to resolve this error.

Can you explain what you mean by upload cluster.yml file from cli? The rke up command uses a local cluster configuration file (cluster.yml by default), that you can specify using rke up --config mycluster.yml. As it tries to build the cluster, there must be cluster.yml file in the same directory you are running rke up. Can you share a redacted version of that file? It should contain the server(s) that you want to use for building the cluster.

1 Like

thank you so much for your explanation.
Cluster is already present on rancher. My actual requirement is,i need to restore the snapshots from cli by using rke restore command “rke etcd snapshot-restore --name c-97ssr-ml-748hb_2020-02-26T08:52:02Z.zip --config cluster.yml”.
I have cluster.yml file in the same directory.But iam getting the following response.
[root@csp-centos2 etcd-snapshots]# rke etcd snapshot-restore --name c-97ssr-ml-748hb_2020-02-26T08:52:02Z.zip --config cluster.yml
INFO[0000] Running RKE version: v0.3.2
INFO[0000] Restoring etcd snapshot c-97ssr-ml-748hb_2020-02-26T08:52:02Z.zip
INFO[0000] Successfully Deployed state file at [./cluster.rkestate]
FATA[0000] Cluster must have at least one etcd plane host: please specify one or more etcd in cluster config

So to verify that whether my cluster.yml file is successfully building cluster or not i have run the rke up command. here also iam facing issue with same error.

Can you share a redacted version of that file? It should contain the server(s) that you want to use for building the cluster.
Yes cluster.yml file contains the servers information.

nodes:
- address: ...
user: root
role:
- controlplane
- etcd
ssh_key_path: /root/.ssh/id_rsa.pub
ssh_agent_auth: true
- address: ...
user: root
role:
- worker
ssh_key_path: /root/.ssh/id_rsa.pub

Is this the full log? If it contains sensitive info can please redact it (and not remove it) to have a complete log? Possibly a --debug log as well?

Sorry for necromanting this discussion.

We ran into the same error message, and the solution for us was to run rke up --ssh-agent-auth with the --ssh-agent-auth flag.
The Rancher Academy simply says you should pass this flag when you’re using an SSH key with a phassphrase (“which you should”). However, as my SSH key does not use a phassphrase, I wasn’t using this argument. Turned out, you need to pass this flag when you’re authenticating with an SSH key, regardless of the passphrase.

Maybe the installation procedure could add a check to ensure all hosts can be reached via SSH prior to proceeding with the RKE setup :slight_smile:

I have the same issue and no passphrase on my key. New install of RKE on SLES15sp2.
ec2-user@ip-172-31-26-130:~> rke up --ssh-agent-auth
…
INFO[0000] [dialer] Setup tunnel for host [172.31.26.130]
WARN[0000] Failed to set up SSH tunneling for host [172.31.26.130]: Can’t retrieve Docker Info: error during connect: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info”: Unable to access the service on /var/run/docker.sock. The service might be still starting up. Error: ssh: rejected: connect failed (open failed)
WARN[0000] Removing host [172.31.26.130] from node lists
FATA[0000] Cluster must have at least one etcd plane host: failed to connect to the following etcd host(s) [172.31.26.130]

ec2-user@ip-172-31-26-130:~> rke config
WARN[0000] This is not an officially supported version (v1.3.0-rc17) of RKE. Please download the latest official release at Releases · rancher/rke · GitHub
[+] Cluster Level SSH Private Key Path [~/.ssh/id_rsa]: ~/.ssh/access.pem
[+] Number of Hosts [1]:
[+] SSH Address of host (1) [none]: 172.31.26.130
[+] SSH Port of host (1) [22]:
[+] SSH Private Key Path of host (172.31.26.130) [none]: ~/.ssh/access.pem
[+] SSH User of host (172.31.26.130) [ubuntu]: ec2-user
[+] Is host (172.31.26.130) a Control Plane host (y/n)? [y]:
[+] Is host (172.31.26.130) a Worker host (y/n)? [n]: y
[+] Is host (172.31.26.130) an etcd host (y/n)? [n]: y
[+] Override Hostname of host (172.31.26.130) [none]: rke1
[+] Internal IP of host (172.31.26.130) [none]:
[+] Docker socket path on host (172.31.26.130) [/var/run/docker.sock]:
[+] Network Plugin Type (flannel, calico, weave, canal, aci) [canal]:
[+] Authentication Strategy [x509]:
[+] Authorization Mode (rbac, none) [rbac]:
[+] Kubernetes Docker image [rancher/hyperkube:v1.21.4-rancher1]:
[+] Cluster domain [cluster.local]:
[+] Service Cluster IP Range [10.43.0.0/16]:
[+] Enable PodSecurityPolicy [n]:
[+] Cluster Network CIDR [10.42.0.0/16]:
[+] Cluster DNS Service IP [10.43.0.10]:
[+] Add addon manifest URLs or YAML files [no]: