2015-07-12 12:04:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<!--  BEGIN MUNGE: UNVERSIONED_WARNING  --> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<!--  BEGIN STRIP_FOR_RELEASE  --> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 08:28:47 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-14 06:15:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< h1 > PLEASE NOTE: This document applies to the HEAD of the source
							 
						 
					
						
							
								
									
										
										
										
											2015-07-12 12:04:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								tree only. If you are using a released version of Kubernetes, you almost
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								certainly want the docs that go with that version.< / h1 > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								< strong > Documentation for specific releases can be found at
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[releases.k8s.io ](http://releases.k8s.io ).</ strong > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 08:28:47 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-14 06:15:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-12 12:04:52 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<!--  END STRIP_FOR_RELEASE  --> 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<!--  END MUNGE: UNVERSIONED_WARNING  --> 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 03:39:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Getting started on Microsoft Azure
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								----------------------------------
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 03:39:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Table of Contents**
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 02:56:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 03:39:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    -  [Prerequisites ](#prerequisites )
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 02:56:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    -  [Setup ](#setup )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    -  [Getting started with your cluster ](#getting-started-with-your-cluster )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    -  [Tearing down the cluster ](#tearing-down-the-cluster )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 03:39:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Prerequisites
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								** Azure Prerequisites**
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  You need an Azure account. Visit http://azure.microsoft.com/ to get started.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								2.  Install and configure the Azure cross-platform command-line interface. http://azure.microsoft.com/en-us/documentation/articles/xplat-cli/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								3.  Make sure you have a default account set in the Azure cli, using `azure account set` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 03:39:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								**Prerequisites for your workstation**
							 
						 
					
						
							
								
									
										
										
										
											2014-11-19 06:23:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  Be running a Linux or Mac OS X.
							 
						 
					
						
							
								
									
										
										
										
											2014-11-21 08:40:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								2.  Get or build a [binary release ](binary_release.md )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								3.  If you want to build your own release, you need to have [Docker
							 
						 
					
						
							
								
									
										
										
										
											2014-11-19 06:23:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								installed](https://docs.docker.com/installation/).  On Mac OS X you can use
							 
						 
					
						
							
								
									
										
										
										
											2015-01-12 01:46:41 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[boot2docker ](http://boot2docker.io/ ).
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 02:56:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Setup
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 07:16:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								###Starting a cluster
 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								The cluster setup scripts can setup Kubernetes for multiple targets. First modify `cluster/kube-env.sh`  to specify azure:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    KUBERNETES_PROVIDER="azure"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-17 02:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Next, specify an existing virtual network and subnet in `cluster/azure/config-default.sh` :
							 
						 
					
						
							
								
									
										
										
										
											2014-09-04 19:36:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    AZ_VNET=< vnet  name > 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-16 15:30:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    AZ_SUBNET=< subnet  name > 
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 01:57:39 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-16 15:22:39 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You can create a virtual network:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-11 10:22:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    azure network vnet create < vnet  name >  --subnet-name=< subnet  name >  --location "West US" -v
							 
						 
					
						
							
								
									
										
										
										
											2015-04-16 15:22:39 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-04 19:36:01 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Now you're ready.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 07:16:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You can download and install the latest Kubernetes release from [this page ](https://github.com/GoogleCloudPlatform/kubernetes/releases ), then run the `<kubernetes>/cluster/kube-up.sh`  script to start the cluster:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 07:16:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    cd kubernetes
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    cluster/kube-up.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-19 06:23:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								The script above will start (by default) a single master VM along with 4 worker VMs.  You
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								can tweak some of these parameters by editing `cluster/azure/config-default.sh` .
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 07:16:50 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Adding the kubernetes command line tools to PATH
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The [kubectl ](../../docs/user-guide/kubectl/kubectl.md ) tool controls the Kubernetes cluster manager.  It lets you inspect your cluster resources, create, delete, and update components, and much more.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You will use it to look at your new cluster and bring up example apps.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Add the appropriate binary folder to your ```PATH``` to access kubectl:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # OS X
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    export PATH=< path / to / kubernetes-directory > /platforms/darwin/amd64:$PATH
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Linux
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    export PATH=< path / to / kubernetes-directory > /platforms/linux/amd64:$PATH
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 02:56:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Getting started with your cluster
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-15 00:37:37 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								See [a simple nginx example ](../user-guide/simple-nginx.md ) to try out your new cluster.
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-10 09:02:10 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								For more complete applications, please look in the [examples directory ](../../examples/ ).
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-23 02:56:19 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								## Tearing down the cluster
 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-28 02:55:41 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cluster/kube-down.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2015-05-15 06:12:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-14 08:13:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<!--  BEGIN MUNGE: GENERATED_ANALYTICS  --> 
							 
						 
					
						
							
								
									
										
										
										
											2015-05-15 06:12:45 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[]()
							 
						 
					
						
							
								
									
										
										
										
											2015-07-14 08:13:09 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<!--  END MUNGE: GENERATED_ANALYTICS  -->