2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								## Getting started with Vagrant
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Prerequisites
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								1.  Install latest version >= 1.6.2 of vagrant from http://www.vagrantup.com/downloads.html
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								2.  Install latest version of Virtual Box from https://www.virtualbox.org/wiki/Downloads
							 
						 
					
						
							
								
									
										
										
										
											2014-11-03 11:27:43 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								3.  Install the `net-tools`  package for your distribution for VirtualBox's private networks.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								4.  Get or build a [binary release ](binary_release.md )
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Setup
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								By default, the Vagrant setup will create a single kubernetes-master and 3 kubernetes-minions. Each VM will take 512 MB, so make sure you have at least 2 GB of free memory. To start your local cluster, open a shell and run:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cd kubernetes
							 
						 
					
						
							
								
									
										
										
										
											2014-12-15 14:23:48 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-13 03:08:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								export KUBERNETES_PROVIDER=vagrant
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cluster/kube-up.sh
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-13 03:08:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								The `KUBERNETES_PROVIDER`  environment variable tells all of the various cluster management scripts which variant to use.  If you forget to set this, the assumption is you are running on Google Compute Engine.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-02 07:17:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Vagrant will provision each machine in the cluster with all the necessary components to run Kubernetes.  The initial setup can take a few minutes to complete on each machine.
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								By default, each VM in the cluster is running Fedora, and all of the Kubernetes services are installed into systemd.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								To access the master or any minion:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant ssh master
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant ssh minion-1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant ssh minion-2
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant ssh minion-3
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								To view the service status and/or logs on the kubernetes-master:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant ssh master
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 08:34:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-master ~] $ sudo systemctl status kube-apiserver
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-master ~] $ sudo journalctl -r -u kube-apiserver
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 08:34:21 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-master ~] $ sudo systemctl status kube-controller-manager
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-master ~] $ sudo journalctl -r -u kube-controller-manager
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-master ~] $ sudo systemctl status etcd
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-master ~] $ sudo systemctl status nginx
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								To view the services on any of the kubernetes-minion(s):
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant ssh minion-1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-minion-1] $ sudo systemctl status docker
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-minion-1] $ sudo journalctl -r -u docker
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-minion-1] $ sudo systemctl status kubelet
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[vagrant@kubernetes-minion-1] $ sudo journalctl -r -u kubelet
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Interacting with your Kubernetes cluster with Vagrant.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								With your Kubernetes cluster up, you can manage the nodes in your cluster with the regular Vagrant commands.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								To push updates to new Kubernetes code after making source changes:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant provision
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								To stop and then restart the cluster:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant halt
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								vagrant up
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								To destroy the cluster:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								vagrant destroy
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Once your Vagrant machines are up and provisioned, the first thing to do is to check that you can use the `kubecfg.sh`  script.
							 
						 
					
						
							
								
									
										
										
										
											2014-09-27 05:52:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You may need to build the binaries first, you can do this with ```make```
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-13 03:08:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								./cluster/kubecfg.sh list /minions
							 
						 
					
						
							
								
									
										
										
										
											2014-11-23 00:33:02 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Minion identifier    Labels
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								----------           ----------
							 
						 
					
						
							
								
									
										
										
										
											2014-11-25 07:41:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								10.245.2.4           < none > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								10.245.2.3           < none > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								10.245.2.2           < none > 
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Interacting with your Kubernetes cluster with the `kube-*` scripts.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Alternatively to using the vagrant commands, you can also use the `cluster/kube-*.sh`  scripts to interact with the vagrant based provider just like any other hosting platform for kubernetes.
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-12 06:37:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								All of these commands assume you have set `KUBERNETES_PROVIDER`  appropriately:
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-10-12 06:37:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								export KUBERNETES_PROVIDER=vagrant
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-12 06:37:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Bring up a vagrant cluster
							 
						 
					
						
							
								
									
										
										
										
											2014-08-09 13:09:58 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cluster/kube-up.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Destroy the vagrant cluster
							 
						 
					
						
							
								
									
										
										
										
											2014-10-02 07:17:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cluster/kube-down.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-12 06:37:06 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Update the vagrant cluster after you make changes (only works when building your own releases locally):
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cluster/kube-push.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Interact with the cluster
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								cluster/kubectl.sh
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								### Authenticating with your master
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								When using the vagrant provider in Kubernetes, the `cluster/kubectl.sh`  script will cache your credentials in a `~/.kubernetes_vagrant_auth`  file so you will not be prompted for them in the future.
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 02:56:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								cat ~/.kubernetes_vagrant_auth
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{ "User": "vagrant",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  "Password": "vagrant"}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You should now be set to use the `cluster/kubectl.sh`  script. For example try to list the minions that you have started with:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								cluster/kubectl.sh get minions
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Running containers
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Your cluster is running, you can list the minions in your cluster:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get minions
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME                 LABELS
							 
						 
					
						
							
								
									
										
										
										
											2014-11-25 07:41:11 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								10.245.2.4           < none > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								10.245.2.3           < none > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								10.245.2.2           < none > 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Now start running some containers!
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								You can now use any of the cluster/kube-*.sh commands to interact with your VM machines.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Before starting a container there will be no pods, services and replication controllers.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get pods
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME   IMAGE(S)   HOST   LABELS   STATUS
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get services
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME   LABELS   SELECTOR   IP   PORT
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get replicationControllers
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME   IMAGE(S   SELECTOR   REPLICAS
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Start a container running nginx with a replication controller and three replicas
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								(note that this step uses the `kubecfg.sh`  command instead of `kubectl.sh` ):
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-10-29 03:57:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubecfg.sh -p 8080:80 run dockerfile/nginx 3 myNginx
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								When listing the pods, you will see that three containers have been started and are in Waiting state:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get pods
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME                                   IMAGE(S)            HOST                    LABELS         STATUS
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								781191ff-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.4/10.245.2.4   name=myNginx   Waiting
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								7813c8bd-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.2/10.245.2.2   name=myNginx   Waiting
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								78140853-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.3/10.245.2.3   name=myNginx   Waiting
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-14 23:34:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You need to wait for the provisioning to complete, you can monitor the minions by doing:
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-11-14 23:34:20 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ sudo salt '*minion-1' cmd.run 'docker images'
							 
						 
					
						
							
								
									
										
										
										
											2014-11-15 00:01:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								kubernetes-minion-1:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    < none >               < none >               96864a7d2df3        26 hours ago        204.4 MB
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    google/cadvisor     latest              e0575e677c50        13 days ago         12.64 MB
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    kubernetes/pause    latest              6c4579af347b        8 weeks ago         239.8 kB
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Once the docker image for nginx has been downloaded, the container will start and you can list it:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-11-15 00:01:59 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ sudo salt '*minion-1' cmd.run 'docker ps'
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								kubernetes-minion-1:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    CONTAINER ID        IMAGE                     COMMAND                CREATED             STATUS              PORTS                    NAMES
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    dbe79bf6e25b        dockerfile/nginx:latest   "nginx"                21 seconds ago      Up 19 seconds                                k8s--mynginx.8c5b8a3a--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1.etcd--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1--fcfa837f
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    fa0e29c94501        kubernetes/pause:latest   "/pause"               8 minutes ago       Up 8 minutes        0.0.0.0:8080->80/tcp     k8s--net.a90e7ce4--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1.etcd--7813c8bd_-_3ffe_-_11e4_-_9036_-_0800279696e1--baf5b21b
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    aa2ee3ed844a        google/cadvisor:latest    "/usr/bin/cadvisor -   38 minutes ago      Up 38 minutes                                k8s--cadvisor.9e90d182--cadvisor_-_agent.file--4626b3a2
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    65a3a926f357        kubernetes/pause:latest   "/pause"               39 minutes ago      Up 39 minutes       0.0.0.0:4194->8080/tcp   k8s--net.c5ba7f0e--cadvisor_-_agent.file--342fd561
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Going back to listing the pods, services and replicationControllers, you now have:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get pods
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME                                   IMAGE(S)            HOST                    LABELS         STATUS
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								781191ff-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.4/10.245.2.4   name=myNginx   Running
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								7813c8bd-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.2/10.245.2.2   name=myNginx   Running
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								78140853-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.3/10.245.2.3   name=myNginx   Running
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get services
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME   LABELS   SELECTOR   IP   PORT
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get replicationControllers
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME      IMAGE(S            SELECTOR       REPLICAS
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								myNginx   dockerfile/nginx   name=myNginx   3
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								We did not start any services, hence there are none listed. But we see three replicas displayed properly.
							 
						 
					
						
							
								
									
										
										
										
											2014-10-29 03:57:15 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Check the [guestbook ](../../examples/guestbook/README.md ) application to learn how to create a service.
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You can already play with resizing the replicas with:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$ cluster/kubecfg.sh resize myNginx 2
							 
						 
					
						
							
								
									
										
										
										
											2014-12-05 06:56:40 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$ cluster/kubectl.sh get pods
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								NAME                                   IMAGE(S)            HOST                    LABELS         STATUS
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								7813c8bd-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.2/10.245.2.2   name=myNginx   Running
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								78140853-3ffe-11e4-9036-0800279696e1   dockerfile/nginx    10.245.2.3/10.245.2.3   name=myNginx   Running
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Congratulations!
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Testing
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								The following will run all of the end-to-end testing scenarios assuming you set your environment in cluster/kube-env.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								hack/e2e-test.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								### Troubleshooting
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-13 03:08:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#### I keep downloading the same (large) box all the time!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								By default the Vagrantfile will download the box from S3.  You can change this (and cache the box locally) by providing an alternate URL when calling `kube-up.sh` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export KUBERNETES_BOX_URL=path_of_your_kuber_box
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								export KUBERNETES_PROVIDER=vagrant
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cluster/kube-up.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#### I just created the cluster, but I am getting authorization errors!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 02:56:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You probably have an incorrect ~/.kubernetes_vagrant_auth file for the cluster you are attempting to contact.
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 02:56:13 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								rm ~/.kubernetes_vagrant_auth
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								After using kubecfg.sh make sure that the correct credentials are set:
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-10-02 07:17:51 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								cat ~/.kubernetes_vagrant_auth
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  "User": "vagrant",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  "Password": "vagrant"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}
							 
						 
					
						
							
								
									
										
										
										
											2014-08-13 03:43:35 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#### I just created the cluster, but I do not see my container running !
 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								If this is your first time creating the cluster, the kubelet on each minion schedules a number of docker pull requests to fetch prerequisite images.  This can take some time and as a result may delay your initial pod getting provisioned.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#### I changed Kubernetes code, but it's not running !
 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-04 03:44:33 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								Are you sure there was no build error?  After running `$ vagrant provision` , scroll up and ensure that each Salt state was completed successfully on each box in the cluster.
							 
						 
					
						
							
								
									
										
										
										
											2014-08-07 00:57:00 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								It's very likely you see a build error due to an error in your source files!
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-03 11:27:43 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#### I have brought Vagrant up but the minions won't validate !
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								Are you sure you built a release first? Did you install `net-tools` ? For more clues, login to one of the minions (`vagrant ssh minion-1`) and inspect the salt minion log (`sudo cat /var/log/salt/minion`).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#### I want to change the number of minions !
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-12-13 03:08:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								You can control the number of minions that are instantiated via the environment variable `NUM_MINIONS`  on your host machine.  If you plan to work with replicas, we strongly encourage you to work with enough minions to satisfy your largest intended replica size.  If you do not plan to work with replicas, you can save some system resources by running with a single minion. You do this, by setting `NUM_MINIONS`  to 1 like so:
							 
						 
					
						
							
								
									
										
										
										
											2014-09-19 21:26:34 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-13 03:08:22 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								export NUM_MINIONS=1
							 
						 
					
						
							
								
									
										
										
										
											2014-09-27 05:52:03 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2014-12-18 14:04:04 +08:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#### I ran vagrant suspend and nothing works!
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								```vagrant suspend``` seems to mess up the network.  It's not supported at this time.