I recently had to setup a single node kubernetes cluster on OVH. It was mostly for learning purposes. It’s strongly recommended against having a single node cluster in production with kubernetes. I will be using a 4GB RAM dedicated server to for this tutorial. It’s recommnded to have enough room for your intended pods to run.
Assuming that you have a fresh server, first of all, let’s get started by installing Docker on your server.
1 2 3 4 5 6 7 8 9
You need logout and login again. Now you can test your docker install by running the hello container.
If you get a hello-world text from docker. We are good to continue.
Now we are going to install kubernetes on the server.
1 2 3 4 5
Now we have kubernetes installed. We need to initialize our cluster
Configuring our kube config which is used for authentication inside cluster operations is next.
1 2 3
In order for the pods to communicate between them effectively. We will need a networking layer for our cluster. We will be using flannel (developped by coreos) in this tutorial.
Master nodes doesn’t allow pods to run inside it by default. So we need to disable that, since we only have one node that we want to run everything.
You can now run your pods on this single node cluster for learning and experimenting with kubernetes.
Here’s the full script that you can use to setup the single cluster node: gist