1

Let me make a statement first: I'm new to Kubernetes, please take it easy if I'm asking wrong questions.

Ok, here is what I'm gonna do. I'm planning to build a Kubernetes for my project using some physical machines.

I have 1 server for master and 2 worker nodes. My service dockers (pods) will be allocated by Kubernetes master, they will need storage for the database (MySQL).

After searching around, I came up with a solution of Persistent Volume, but I don't want to use those online cloud services out there such as Google Cloud or Azure Cloud, etc. It leads me to another solution - Local Persistent Volume (LPV), this is where I stuck currently.

The problem with LPV is it's attached with a specific node, so I wouldn't be able to replicate (backup) the database on other nodes, if something happens to this node, or something wrong with the physical disk, I'm gonna lose all the databases, right?

The question is, are there any solutions to set up replication on the database using Local Persistent Volume? For example, I have a database on Node 1, and a backup version on Node 2, so when Node 1 is not available, the pods will be attached to the backup database on Node 2.

Thanks in advance!

  • Hi I see you posted the same question on both StackEx and Server Fault. Not sure if this is "correct". – Black_Bacardi Jul 10 '19 at 10:58
  • Yea, I posted here first, then I found out that there are a lot of questions about Kubernetes on StackEx, so I make another version over there. Is it "correct"? :P – Goon Nguyen Jul 10 '19 at 11:59
  • Honestly I am not sure, but I think it should belong to one or the other, since you already have an answer on StackEx. Maybe it is worth to keep only that one? btw just my 2 cent and out of curiosity too :) – Black_Bacardi Jul 10 '19 at 12:21
  • This question has accepted answer on StackOverflow. stackoverflow.com/a/56968323/9521610 – VAS Jul 11 '19 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.