Difficulty: Beginner
Estimated Time: 10 minutes

This scenario explains how to launch a simple, multi-tier web application using Kubernetes and Docker. The Guestbook example application stores notes from guests in Redis via JavaScript API calls. Redis contains a master (for storage), and a replicated set of redis 'slaves'.

Core Concepts

The following core concepts will be covered during this scenario. These are the foundations of understanding Kubernetes.

  • Pods

  • Replication Controllers

  • Services

  • NodePorts

You now have a working multi-tier application deployed on Kubernetes and Docker.

In this scenario we introduced the core concepts of Kubernetes. We explained how Replication Controllers define how a container should be run. The service is used to determine how to proxy traffic to the container. Finally, everything is run as Pods. Once running the service can be accessed via the defined NodePort.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Deploy Guestbook example on Kubernetes

Step 1 of 8

Step 1 - Start Kubernetes

To start we need a running Kubernetes cluster. The details of this are explained in the Launch Kubernetes cluster scenario.

Task

Start a single-node cluster using the helper script. The helper script will launch the API, Master, a Proxy and DNS discovery. The Web App uses DNS Discovery to find the Redis slave to store data.

launch.sh

Health Check

Check everything is up using the following health Check: export KUBERNETES_MASTER=http://host01:8080 kubectl cluster-info