I have an application with both front-end and back-end components, currently deployed as Docker containers. We plan to deploy this application on our company’s on-premise servers. We have two high-performance PCs available as on-premise servers.
Our application has the following operational requirements:
- If one of the two PCs fails, the application should automatically be deployed to the other server.
- Since these two PCs are powerful and our company does not want to invest in additional hardware, we need to create both staging and production environments on these two PCs.
I’ve heard that Kubernetes might be able to address these requirements.
I’m new to Kubernetes, so when searching for solutions and ways to do it, I only see people use an entire server to act as a master and another server as a worker.
Since our boss doesn’t want to buy more PCs, 2 PCs are the maximum we have, and using 1 of them to be a master is wasteful.
So, I’m looking for a way for the 2 PCs to act as worker and master at the same time, so that in case 1 PC goes down, we still have the master and worker on the other. When the PC is restored, it comes back to the cluster as a second master + worker node.
How can I do it? Since I’m new to Kubernetes, please provide as many details/steps to do it as possible, or any documents or references that would be helpful.