Upgrading Kubernetes

Building on Open Source

Other Resources

Kubernetes Installation with Vagrant & CoreOS

This guide walks a deployer through launching a multi-node Kubernetes cluster using Vagrant and CoreOS.
After completing this guide, a deployer will be able to interact with the Kubernetes API from their workstation using the kubectl CLI tool.

Install Prerequisites

Vagrant

Navigate to the Vagrant downloads page and grab the appropriate package for your system. Install the Vagrant software before continuing.

kubectl

kubectl is the main program for interacting with the Kubernetes API. Download kubectl from the Kubernetes release artifact site with the curl tool.

Start the Machines

The default cluster configuration is to start a virtual machine for each role — master node, worker node, and etcd server. However, you can modify the default cluster settings by copying config.rb.sample to config.rb and modifying configuration values.

By default, Calico network policy is disabled. To enable it, change the line export USE_CALICO=false to export USE_CALICO=true in both the ../generic/controller-install.sh and the ../generic/worker-install.sh scripts.

Ensure the latest CoreOS vagrant image will be used by running vagrant box update.

Then run vagrant up and wait for Vagrant to provision and boot the virtual machines.

Configure kubectl

Choose one of the two following ways to configure kubectl to connect to the new cluster:

NOTE: When the cluster is first launched, it must download all container images for the cluster components (Kubernetes, dns, heapster, etc). Depending on the speed of your connection, it can take a few minutes before the Kubernetes api-server is available. Before the api-server is running, the kubectl command above may show output similar to:

The connection to the server 172.17.4.101:443 was refused - did you specify the right host or port?

Is kubectl working correctly?

Now that you've got a working Kubernetes cluster with a functional CLI tool, you are free to deploy Kubernetes-ready applications.
Start with a multi-tier web application from the official Kubernetes documentation to visualize how the various Kubernetes components fit together.