From 10d76a5775e27ab35e31b1b1b8a0d64b0621f275 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Tue, 14 Jul 2015 16:16:50 -0700 Subject: [PATCH] populate the instructions on installing kubectl in getting-started-guides --- docs/getting-started-guides/aws-coreos.md | 2 +- docs/getting-started-guides/aws.md | 10 ++++++---- docs/getting-started-guides/azure.md | 16 +++++++++++++++- docs/getting-started-guides/juju.md | 2 ++ docs/getting-started-guides/mesos.md | 6 ++++++ docs/user-guide/prereqs.md | 19 ++++++++++++++++++- 6 files changed, 48 insertions(+), 7 deletions(-) diff --git a/docs/getting-started-guides/aws-coreos.md b/docs/getting-started-guides/aws-coreos.md index 710bb1e7928..26ab5729498 100644 --- a/docs/getting-started-guides/aws-coreos.md +++ b/docs/getting-started-guides/aws-coreos.md @@ -38,7 +38,7 @@ no security tokens, no basic auth). For demonstration purposes only. * [aws CLI](http://aws.amazon.com/cli) * [CoreOS image for AWS](https://coreos.com/docs/running-coreos/cloud-providers/ec2/) -* [kubectl CLI](aws/kubectl.md) +* [kubectl CLI](aws/kubectl.md) ([installation](aws.md#command-line-administration-tool-kubectl)) ## Starting a Cluster diff --git a/docs/getting-started-guides/aws.md b/docs/getting-started-guides/aws.md index 7ae53ac6a9c..b25b8debeab 100644 --- a/docs/getting-started-guides/aws.md +++ b/docs/getting-started-guides/aws.md @@ -42,7 +42,6 @@ Getting started on AWS EC2 3. You need an AWS [instance profile and role](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html) with EC2 full access. ## Cluster turnup -### Supported procedure: `get-kube` ```bash #Using wget export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash @@ -83,14 +82,17 @@ AWS CloudFormation or EC2 with user data (cloud-config). ## Getting started with your cluster ### Command line administration tool: `kubectl` -Copy the appropriate `kubectl` binary to any location defined in your `PATH` environment variable, for example: +The cluster startup script will leave you with a ```kubernetes``` directory on your workstation. +Alternately, you can download the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases). + +Next, add the appropriate binary folder to your ```PATH``` to access kubectl: ```bash # OS X -sudo cp kubernetes/platforms/darwin/amd64/kubectl /usr/local/bin/kubectl +export PATH=/platforms/darwin/amd64:$PATH # Linux -sudo cp kubernetes/platforms/linux/amd64/kubectl /usr/local/bin/kubectl +export PATH=/platforms/linux/amd64:$PATH ``` An up-to-date documentation page for this tool is available here: [kubectl manual](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/kubectl.md) diff --git a/docs/getting-started-guides/azure.md b/docs/getting-started-guides/azure.md index 352192bbaf5..19b138e741f 100644 --- a/docs/getting-started-guides/azure.md +++ b/docs/getting-started-guides/azure.md @@ -48,6 +48,7 @@ installed](https://docs.docker.com/installation/). On Mac OS X you can use [boot2docker](http://boot2docker.io/). ## Setup +###Starting a cluster The cluster setup scripts can setup Kubernetes for multiple targets. First modify `cluster/kube-env.sh` to specify azure: KUBERNETES_PROVIDER="azure" @@ -63,13 +64,26 @@ You can create a virtual network: Now you're ready. -You can then use the `cluster/kube-*.sh` scripts to manage your azure cluster, start with: +You can download and install the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases), then run the `/cluster/kube-up.sh` script to start the cluster: + cd kubernetes cluster/kube-up.sh 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`. +### 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=/platforms/darwin/amd64:$PATH + + # Linux + export PATH=/platforms/linux/amd64:$PATH + ## Getting started with your cluster See [a simple nginx example](../user-guide/simple-nginx.md) to try out your new cluster. diff --git a/docs/getting-started-guides/juju.md b/docs/getting-started-guides/juju.md index d25023a2d45..871b0a5f14b 100644 --- a/docs/getting-started-guides/juju.md +++ b/docs/getting-started-guides/juju.md @@ -80,6 +80,8 @@ interface. ## Launch Kubernetes cluster +Kubernetes releases can be downloaded from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases). + You will need to have the Kubernetes tools compiled before launching the cluster make all WHAT=cmd/kubectl diff --git a/docs/getting-started-guides/mesos.md b/docs/getting-started-guides/mesos.md index 736e3f4925c..3628510c845 100644 --- a/docs/getting-started-guides/mesos.md +++ b/docs/getting-started-guides/mesos.md @@ -155,6 +155,12 @@ Disown your background jobs so that they'll stay running if you log out. $ disown -a ``` #### Validate KM Services +Add the appropriate binary folder to your ```PATH``` to access kubectl: + +```bash +export PATH=/platforms/linux/amd64:$PATH +``` + Interact with the kubernetes-mesos framework via `kubectl`: ```bash diff --git a/docs/user-guide/prereqs.md b/docs/user-guide/prereqs.md index 29888a8c401..1b2626d93c4 100644 --- a/docs/user-guide/prereqs.md +++ b/docs/user-guide/prereqs.md @@ -21,11 +21,28 @@ certainly want the docs that go with that version. # Kubernetes User Guide: Managing Applications: Prerequisites +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. -To deploy and manage applications on Kubernetes, you’ll use the Kubernetes command-line tool, [kubectl](kubectl/kubectl.md). It can be found in the release tar bundle, or can be built from source from github. Ensure that it is executable and in your path. +##Install kubectl +You can find it in the [release](https://github.com/GoogleCloudPlatform/kubernetes/releases) tar bundle, under platforms//; +or if you build from source, kubectl should be either under _output/local/bin// or _output/dockerized/bin//. +Next, make sure the kubectl tool is in your path, assuming you download a release: +``` +# OS X +export PATH=/platforms/darwin/amd64:$PATH + +# Linux +export PATH=/platforms/linux/amd64:$PATH +``` + +##Configure 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). +Check that kubectl is properly configured by getting the cluster state: +``` +$ kubectl cluster-info +``` ## What's next? [Learn how to launch and expose your application.](quick-start.md)