danacr / Kubernetes-The-Fun-Way

Episode 4: Kubernetes as a Service
The Unlicense
152 stars 12 forks source link

Mariadb config for single database replica #1

Closed serverbaboon closed 4 years ago

serverbaboon commented 4 years ago

The repo currently has the replica count of 1 for the mariadb setup.

With a replica of 1 the database never restarts after termination (at least in my config), it goes into the init config loop as shown in the K3s video.

If the replica is set to 1 I think the best option is to set the ENV option AUTO_NEW_CLUSTER for the init container to 'true'.

        - name: AUTO_NEW_CLUSTER
          value: "true"

If you have more than one replica then setting the false seems ok , or at least in my limited testing.

Perhaps it might be worth mentioning this in the docs?

My config is slightly different to yours but I am not sure if that matters.

Hardware 3 x Pi4 4GB Ram Ubuntu server 19.10 Rook 1.2 Ceph 14.2.5 San Disk USB Flash drives configured as raw block storage in Rook/Ceph not directory mounted.

danacr commented 4 years ago

Thanks @serverbaboon, I updated the yaml