Get Your k8s Cluster with 5 Nodes in 5 Mins (for free to use for 4 hours)

mingderwang
Kubernetes Playground
2 min readSep 15, 2017

Amazing, I just found a website which offer 4 hours of free usage to create a 5 nodes kubernetes cluster. Just follow the instruction in the console for each node, as follows. You can easily create a k8s cluster in 5 mins.

When you access URL, http://labs.play-with-k8s.com/, you can click on “+ADD NEW INSTANCE” to get more nodes and shows the instructions to create a k8s master node in the console when you created.

WARNING!!!!This is a sandbox environment. Using personal credentials
is HIGHLY! discouraged. Any consequences of doing so, are
completely the user's responsibilites.
You can bootstrap a cluster as follows:1. Initializes cluster master node:kubeadm init --apiserver-advertise-address $(hostname -i)2. Initialize cluster networking:kubectl apply -n kube-system -f \
"https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
3. (Optional) Initialize kube-dashboard:curl -L -s https://git.io/kube-dashboard | sed 's/targetPort: 9090/targetPort: 9090\n type: LoadBalancer/' | \
kubectl apply -f -
The PWK team.

Just follow above instruction to create the master node, then create other nodes (by +ADD NEW INSTANCE) and run “join” command as follow example in the master console.

For example: (Your token may be different as this example.)

kubeadm join --token 15bf68.2531898731aa1693 10.0.18.4:6443

The you can click on the URL link (showed 30485 as example bellow) to open a k8s web UI.

Here you are, 5 nodes k8s cluster in 5 mins. Having fun!

To start using your cluster, you need to run (as a regular user):

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Then you can issue “kubectl” commands in the master node to play around it. Here is the link for a kubectl cheat sheet.

--

--