Use CockroachDB for Rancher 2.0 internal database

Hi,

I was wondering if any though had been given to leverage CockroachDB to power up the internal database in Rancher 2.0 ?

It seems like it would be a pretty good fit and a better option than mysql imho. We are leveraging bare metal cloud providers and as such we don’t have access to services such as RDS and I really don’t want to have to deal with Mysql to begin with, even less so clustering it…

Thanks in advance

We are using https://github.com/rancher/k8s-sql which uses really simple SQL statements (https://github.com/rancher/k8s-sql/blob/master/dialect/mysql/mysql.go) so it shouldn’t be too hard to get this working. If we are going to integrate and test it, I don’t think this will happen before 2.0 as we have a lot of work to do in other regions to get 2.0 shipped.

Thanks for the reply @superseb.

Looking at the repo and the code actually gives me more questions than answers…
Given how trivial the dialect is, I really wonder what is the value beyond a PoC to leverage a full blown SQL database for a simple key value store while ETCD is already battle tested and leveraged in K8 ?

I understand it could be an option for people who dont want to deal with ETCD to begin with but why is it the default ?

Wouldn’t it be more reasonable and safe to use ETCD by default ?

k8s-sql is a small shim for storing the part normally stored in etcd into the mysql DB we already have so that we don’t have to maintain a separate etcd. The main portion of Rancher is MySQL.

While you may not have RDS as an option, a large percentage of users do have a hosted MySQL option and/or a team with MySQL experience available in-house. Neither of these is true of etcd or (especially) cockroach.