These instructions show how to deploy a very simple web application that uses a data backend using redis. You don't need to install any software, just point your browser at the kubernetes playground and follow along with the steps.
-
In a browser, open the kubernetes playground and log in using either a Docker Hub id or a GitHub id. Then click on Start.
-
Click on ADD NEW INSTANCE to set up your first node.
-
Bring up up kubernetes on the node
kubeadm init --apiserver-advertise-address $(hostname -i)
copy the example output of commands to add another node to cluster (your token and IP will be different)
kubeadm join --token 37364e.138fd5cd5f5dce72 192.168.0.13:6443 --discovery-token-ca-cert-hash sha256:d7968bbcd0fafd6630ae366b3ffb7c91c2e093784f922705b6278eb8de882b67
-
Set up networking
kubectl apply -n kube-system -f \ "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
-
Check status, repeat until the master shows "Ready"
kubectl get nodes NAME STATUS ROLES AGE VERSION node1 Ready master 1m v1.10.2
-
Add another node
-
click ADD NEW INSTANCE
-
click into node2 and then run the command you recorded for adding new nodes from step 2:
kubeadm join --token 37364e.138fd5cd5f5dce72 192.168.0.13:6443 --discovery-token-ca-cert-hash sha256:d7968bbcd0fafd6630ae366b3ffb7c91c2e093784f922705b6278eb8de882b67
-
-
Return to the master (node1) and check on status with kubectl, wait until node2 shows ready:
kubectl get nodes NNAME STATUS ROLES AGE VERSION node1 Ready master 2m v1.10.2 node2 Ready <none> 38s v1.10.2
-
Clone the application repository to simplify access to the lab deployment configuration files
git clone https://github.com/IBM/guestbook.git