Getting started with Kubernetes on Skytap

This article describes how to deploy a Kubernetes cluster in Skytap using the Skytap Kubernetes public template. This template includes a Kubernetes master node, two Kubernetes slave nodes, a Kubernetes cluster configuration script, and an example “Guestbook” application.


Create a Kubernetes environment from the Skytap public template

To create the Kubernetes environment
  1. In the navigation bar, click Environments, and then click Templates.
  2. Click Skytap to display the Skytap public templates.
  3. Search for Kubernetes. If your account has access to multiple regions, you’ll see multiple copies of this template.
  4. Choose the Kubernetes 2-node cluster pre-install - Fedora 23 template in the region closest to your physical location, and then click New Environment.

    public template

    The Deploy a new environment dialog displays.


  5. Click Deploy. The Kubernetes 2-node cluster pre-install environment is created.

Create the Kubernetes cluster using the provided startup script

To create the Kubernetes cluster
  1. Click run (Run) to start the environment.

    running VMs

  2. After the environment is running, click on the VM tile for the Kubernetes Master VM to display its desktop.
  3. From the VM toolbar, click credentials (Credentials), and sign in with the Kubernetes Username and Password.

    HTML5 Client Credentials

  4. From the command line, type cd contrib/ansible/.
  5. Type ./ and press Enter to start the setup.
  6. The setup script prompts for the authenticity of each node and asks if you want to continue connecting. Type yes and press Enter to continue.

    type yes to continue

  7. To verify the cluster is running, type kubectl get nodes. The Kubernetes node details display.

    get nodes

Deploy the example Guestbook application on the Kubernetes cluster

To deploy the example Guestbook application
  1. From the command line, type cd //home/kubernetes/examples/guestbook.
  2. Type ./ and press Enter. The setup script runs.
  3. To verify the deployment status, type kubectl get pods. The Kubernetes pod details display.

    get pods

    It may take several minutes for the status of all pods to change to Running.

Access the Guestbook application from a published service

Creating the published service

After all of the Kubernetes pods are running, create a published service for port 30000 on the Kubernetes Node 1 VM. The published service will connect you to the Guestbook application over TCP port 30000 on the VM firewall.

For detailed instructions about creating a published service, see Adding a published service.

Accessing the Guestbook application

After you create the published service, copy the Public address URL and paste it into the address bar of a browser.

show published service

For example, to connect to the public address above, enter in the browser.

The browser connects to the Guestbook application running on the Kubernetes node on Skytap.

example app

Next steps: Add a node to the cluster

Extend the Kubernetes cluster by adding an additional node. See Kubernetes next steps: Adding a node.