2015-07-12 04:04:52 +00:00
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- BEGIN STRIP_FOR_RELEASE -->
2015-07-16 17:02:26 +00:00
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< img src = "http://kubernetes.io/img/warning.png" alt = "WARNING"
width="25" height="25">
< h2 > PLEASE NOTE: This document applies to the HEAD of the source tree< / h2 >
If you are using a released version of Kubernetes, you should
refer to the docs that go with that version.
2015-12-14 18:37:38 +00:00
<!-- TAG RELEASE_LINK, added by the munger automatically -->
2015-07-16 17:02:26 +00:00
< strong >
2015-11-03 18:17:57 +00:00
The latest release of this document can be found
[here ](http://releases.k8s.io/release-1.1/docs/user-guide/prereqs.md ).
2015-07-16 17:02:26 +00:00
Documentation for other releases can be found at
[releases.k8s.io ](http://releases.k8s.io ).
< / strong >
--
2015-07-13 22:15:35 +00:00
2015-07-12 04:04:52 +00:00
<!-- END STRIP_FOR_RELEASE -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
2015-07-17 22:35:41 +00:00
2015-07-10 18:22:56 +00:00
# Kubernetes User Guide: Managing Applications: Prerequisites
2015-07-17 22:35:41 +00:00
2015-07-24 21:52:18 +00:00
To deploy and manage applications on Kubernetes, you’ ll use the Kubernetes command-line tool, [kubectl ](kubectl/kubectl.md ). 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.
2015-07-10 18:22:56 +00:00
2015-07-20 23:55:36 +00:00
## Installing kubectl
2015-07-17 22:35:41 +00:00
2015-09-03 14:10:11 +00:00
If you downloaded a pre-compiled [release ](https://github.com/kubernetes/kubernetes/releases ), kubectl should be under `platforms/<os>/<arch>` from the tar bundle.
2015-07-16 20:49:31 +00:00
If you built from source, kubectl should be either under `_output/local/bin/<os>/<arch>` or `_output/dockerized/bin/<os>/<arch>` .
The kubectl binary doesn't have to be installed to be executable, but the rest of the walkthrough will assume that it's in your PATH.
The simplest way to install is to copy or move kubectl into a dir already in PATH (e.g. `/usr/local/bin` ). For example:
2015-07-19 00:09:21 +00:00
```console
2015-07-16 20:49:31 +00:00
# OS X
2015-07-19 00:09:21 +00:00
$ sudo cp kubernetes/platforms/darwin/amd64/kubectl /usr/local/bin/kubectl
2015-07-16 20:49:31 +00:00
# Linux
2015-07-19 00:09:21 +00:00
$ sudo cp kubernetes/platforms/linux/amd64/kubectl /usr/local/bin/kubectl
```
2015-07-16 20:49:31 +00:00
2015-07-20 23:55:36 +00:00
You also need to ensure it's executable:
2015-07-16 20:49:31 +00:00
2015-07-20 23:55:36 +00:00
```console
2015-08-27 10:46:14 +00:00
$ sudo chmod +x /usr/local/bin/kubectl
2015-07-20 23:55:36 +00:00
```
2015-07-16 20:49:31 +00:00
2015-07-20 23:55:36 +00:00
If you prefer not to copy kubectl, you need to ensure the tool is in your path:
```bash
# OS X
export PATH=< path / to / kubernetes-directory > /platforms/darwin/amd64:$PATH
2015-07-16 20:49:31 +00:00
2015-07-20 23:55:36 +00:00
# Linux
export PATH=< path / to / kubernetes-directory > /platforms/linux/amd64:$PATH
```
## Configuring kubectl
In order for kubectl to find and access the Kubernetes cluster, it needs a [kubeconfig file ](kubeconfig-file.md ), which is created automatically when creating a cluster using kube-up.sh (see the [getting started guides ](../../docs/getting-started-guides/ ) for more about creating clusters). If you need access to a cluster you didn’ t create, see the [Sharing Cluster Access document ](sharing-clusters.md ).
By default, kubectl configuration lives at `~/.kube/config` .
2015-07-16 20:49:31 +00:00
#### Making sure you're ready
2015-07-14 23:16:50 +00:00
Check that kubectl is properly configured by getting the cluster state:
2015-07-16 20:49:31 +00:00
2015-07-19 00:09:21 +00:00
```console
2015-07-14 23:16:50 +00:00
$ kubectl cluster-info
```
2015-07-16 20:49:31 +00:00
If you see a url response, you are ready to go.
2015-07-14 06:40:25 +00:00
## What's next?
[Learn how to launch and expose your application. ](quick-start.md )
2015-07-10 18:22:56 +00:00
2015-07-14 00:13:09 +00:00
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
2015-07-10 18:22:56 +00:00
[![Analytics ](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/prereqs.md?pixel )]()
2015-07-14 00:13:09 +00:00
<!-- END MUNGE: GENERATED_ANALYTICS -->