CrateDB does not select a leader

Hi,

I am trying to run Crate on my Kubernetes Cluster, followed the example yaml’s from Crate but Crate fails to select a leader.

My cluster:

6 raspberry pi’s running Ubuntu 23
Microk8s 1.24
Crate 4.6.4

3 crate-pods are created: crate-0 crate-1 and crate-2.
Service running fine, ui available. Shows 1 node.

Log says:

ClusterFormationFailureHelper] [crate] master not discovered yet, this node has not previously joined a bootstrapped (v4+) cluster, and this node must discover master-eligible nodes [crate-0, crate-1, crate-2] to bootstrap a cluster: have discovered [{crate}{n5vvU2U9Ryme7AqUP4umdw}{pA53ho4NQD2SjdVk29JsuQ}{10.1.178.252}{10.1.178.252:4300}{http_address=10.1.178.252:4200}, {crate}{AWYiQib8QjW-0Hy4fAtaNg}{y3awIuFxQk-hKYMI3uqzdQ}{10.1.127.69}{10.1.127.69:4300}{http_address=10.1.127.69:4200}, {crate}{xJoYtXY2Su-1hgXZYAnA7A}{6I3Bs_YQQIyTpAyiJSBW9A}{10.1.224.4}{10.1.224.4:4300}{http_address=10.1.224.4:4200}]; discovery will continue using [127.0.0.1:4301, 127.0.0.1:4302, 127.0.0.1:4303, 127.0.0.1:4304, 127.0.0.1:4305, [::1]:4301, [::1]:4302, [::1]:4303, [::1]:4304, [::1]:4305, 10.152.183.245:4300] from hosts providers and [{crate}{n5vvU2U9Ryme7AqUP4umdw}{pA53ho4NQD2SjdVk29JsuQ}{10.1.178.252}{10.1.178.252:4300}{http_address=10.1.178.252:4200}] from last-known cluster state; node term 0, last-accepted version 0 in term 0

It seems like the nodes are discovered but not recognonized as eligible.

Help appreciated!

Kind regards Allard

Hi,
From that output it looks as if you would have set initial_master_nodes to crate-0, crate-1, crate-2 but then set node.name to crate for all nodes? to get crate-0, 1, etc you may want to use POD_NAME
Maybe you could review that and share the YAML you are using if the cluster is still not forming?

Hello hernanc,

thanks for your quick response.

I solved the problem by using the examples from the kubernetes-guide.

The problem was caused by outdated examples i found on your site. Maybe a good idea to remove them.

Kind regards!

I am glad that worked and thank you for mentioning this.
Could you point us to to which examples in particular you found problematic?

How to set up a CrateDB cluster with Kubernetes uses 4.14 wich didnt work for me

Run Your First CrateDB Cluster on Kubernetes, Part One uses 3.13 wich didnt work for me

Dear Allard,

Thank you for reporting this. We will add corresponding admonitions to the outdated pages, to refer readers to updated content about the relevant topics.

May I ask which specific documentation resource you used here, in order to fix the situation?

With kind regards,
Andreas.

/cc @mkod, @Walter_Behmann