| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | # Quickstart Guide
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This guide covers how you can quickly get started using Helm. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Prerequisites
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | - You must have Kubernetes installed. We recommend version 1.4.1 or | 
					
						
							|  |  |  |   later. | 
					
						
							|  |  |  | - You should also have a local configured copy of `kubectl`. | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-06 02:43:06 +08:00
										 |  |  | Helm will figure out where to install Tiller by reading your Kubernetes | 
					
						
							|  |  |  | configuration file (usually `$HOME/.kube/config`). This is the same file | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | that `kubectl` uses. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To find out which cluster Tiller would install to, you can run | 
					
						
							|  |  |  | `kubectl config current-context` or `kubectl cluster-info`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							|  |  |  | $ kubectl config current-context | 
					
						
							|  |  |  | my-cluster | 
					
						
							|  |  |  | ``` | 
					
						
							| 
									
										
										
										
											2016-10-06 02:43:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | ## Install Helm
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | Download a binary release of the Helm client. You can use tools like | 
					
						
							|  |  |  | `homebrew`, or look at [the official releases page](https://github.com/kubernetes/helm/releases). | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | For more details, or for other options, see [the installation | 
					
						
							|  |  |  | guide](install.md). | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ## Initialize Helm and Install Tiller
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Once you have Helm ready, you can initialize the local CLI and also | 
					
						
							|  |  |  | install Tiller into your Kubernetes cluster in one step: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							|  |  |  | $ helm init | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | This will install Tiller into the Kubernetes cluster you saw with | 
					
						
							|  |  |  | `kubectl config current-context`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | **TIP:** Want to install into a different cluster? Use the | 
					
						
							|  |  |  | `--kube-context` flag. | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | ## Install an Example Chart
 | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | To install a chart, you can run the `helm install` command. Helm has | 
					
						
							|  |  |  | several ways to find and install a chart, but the easiest is to use one | 
					
						
							|  |  |  | of the official `stable` charts. | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | $ helm repo update              # Make sure we get the latest list of charts | 
					
						
							| 
									
										
										
										
											2016-10-06 02:43:06 +08:00
										 |  |  | $ helm install stable/mysql | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | Released smiling-penguin | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-06 02:43:06 +08:00
										 |  |  | In the example above, the `stable/mysql` chart was released, and the name of | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | our new release is `smiling-penguin`. You get a simple idea of the | 
					
						
							|  |  |  | features of this MySQL chart by running `helm inspect stable/mysql`. | 
					
						
							| 
									
										
										
										
											2016-08-23 02:18:28 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | Whenever you install a chart, a new release is created. So one chart can | 
					
						
							|  |  |  | be installed multiple times into the same cluster. And each can be | 
					
						
							|  |  |  | independently managed and upgrade. | 
					
						
							| 
									
										
										
										
											2016-08-23 02:18:28 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | The `helm install` command is a very powerful command with many | 
					
						
							|  |  |  | capabilities. To learn more about it, check out the [Using Helm | 
					
						
							|  |  |  | Guide](using_helm.md) | 
					
						
							| 
									
										
										
										
											2016-08-23 02:18:28 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | ## Learn About Releases
 | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | It's easy to see what has been released using Helm: | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | $ helm ls | 
					
						
							|  |  |  | NAME           	VERSION	 UPDATED                       	STATUS         	CHART | 
					
						
							|  |  |  | smiling-penguin	 1      	Wed Sep 28 12:59:46 2016      	DEPLOYED       	mysql-0.1.0 | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | The `helm list` function will show you a list of all deployed releases. | 
					
						
							| 
									
										
										
										
											2016-10-06 02:43:06 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | ## Uninstall a Release
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-19 18:21:02 +08:00
										 |  |  | To uninstall a release, use the `helm delete` command: | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							| 
									
										
										
										
											2016-05-19 18:21:02 +08:00
										 |  |  | $ helm delete smiling-penguin | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | Removed smiling-penguin | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This will uninstall `smiling-penguin` from Kubernetes, but you will | 
					
						
							|  |  |  | still be able to request information about that release: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							|  |  |  | $ helm status smiling-penguin | 
					
						
							|  |  |  | Status: DELETED | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | ... | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-15 05:51:24 +08:00
										 |  |  | Because Helm tracks your releases even after you've deleted them, you | 
					
						
							|  |  |  | can audit a cluster's history, and even undelete a release (with `helm | 
					
						
							|  |  |  | rollback`). | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-27 05:49:15 +08:00
										 |  |  | ## Reading the Help Text
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To learn more about the available Helm commands, use `helm help` or type | 
					
						
							|  |  |  | a command followed by the `-h` flag: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ```console | 
					
						
							|  |  |  | $ helm get -h | 
					
						
							|  |  |  | ``` |