mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
populate the instructions on installing kubectl in getting-started-guides
This commit is contained in:
parent
43de287427
commit
10d76a5775
@ -38,7 +38,7 @@ no security tokens, no basic auth). For demonstration purposes only.
|
|||||||
|
|
||||||
* [aws CLI](http://aws.amazon.com/cli)
|
* [aws CLI](http://aws.amazon.com/cli)
|
||||||
* [CoreOS image for AWS](https://coreos.com/docs/running-coreos/cloud-providers/ec2/)
|
* [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
|
## Starting a Cluster
|
||||||
|
|
||||||
|
@ -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.
|
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
|
## Cluster turnup
|
||||||
### Supported procedure: `get-kube`
|
|
||||||
```bash
|
```bash
|
||||||
#Using wget
|
#Using wget
|
||||||
export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash
|
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
|
## Getting started with your cluster
|
||||||
### Command line administration tool: `kubectl`
|
### 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
|
```bash
|
||||||
# OS X
|
# OS X
|
||||||
sudo cp kubernetes/platforms/darwin/amd64/kubectl /usr/local/bin/kubectl
|
export PATH=<path/to/kubernetes-directory>/platforms/darwin/amd64:$PATH
|
||||||
|
|
||||||
# Linux
|
# Linux
|
||||||
sudo cp kubernetes/platforms/linux/amd64/kubectl /usr/local/bin/kubectl
|
export PATH=<path/to/kubernetes-directory>/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)
|
An up-to-date documentation page for this tool is available here: [kubectl manual](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/kubectl.md)
|
||||||
|
@ -48,6 +48,7 @@ installed](https://docs.docker.com/installation/). On Mac OS X you can use
|
|||||||
[boot2docker](http://boot2docker.io/).
|
[boot2docker](http://boot2docker.io/).
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
###Starting a cluster
|
||||||
The cluster setup scripts can setup Kubernetes for multiple targets. First modify `cluster/kube-env.sh` to specify azure:
|
The cluster setup scripts can setup Kubernetes for multiple targets. First modify `cluster/kube-env.sh` to specify azure:
|
||||||
|
|
||||||
KUBERNETES_PROVIDER="azure"
|
KUBERNETES_PROVIDER="azure"
|
||||||
@ -63,13 +64,26 @@ You can create a virtual network:
|
|||||||
|
|
||||||
Now you're ready.
|
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 `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||||
|
|
||||||
|
cd kubernetes
|
||||||
cluster/kube-up.sh
|
cluster/kube-up.sh
|
||||||
|
|
||||||
The script above will start (by default) a single master VM along with 4 worker VMs. You
|
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`.
|
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=<path/to/kubernetes-directory>/platforms/darwin/amd64:$PATH
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
export PATH=<path/to/kubernetes-directory>/platforms/linux/amd64:$PATH
|
||||||
|
|
||||||
## Getting started with your cluster
|
## Getting started with your cluster
|
||||||
See [a simple nginx example](../user-guide/simple-nginx.md) to try out your new cluster.
|
See [a simple nginx example](../user-guide/simple-nginx.md) to try out your new cluster.
|
||||||
|
|
||||||
|
@ -80,6 +80,8 @@ interface.
|
|||||||
|
|
||||||
## Launch Kubernetes cluster
|
## 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
|
You will need to have the Kubernetes tools compiled before launching the cluster
|
||||||
|
|
||||||
make all WHAT=cmd/kubectl
|
make all WHAT=cmd/kubectl
|
||||||
|
@ -155,6 +155,12 @@ Disown your background jobs so that they'll stay running if you log out.
|
|||||||
$ disown -a
|
$ disown -a
|
||||||
```
|
```
|
||||||
#### Validate KM Services
|
#### Validate KM Services
|
||||||
|
Add the appropriate binary folder to your ```PATH``` to access kubectl:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export PATH=<path/to/kubernetes-directory>/platforms/linux/amd64:$PATH
|
||||||
|
```
|
||||||
|
|
||||||
Interact with the kubernetes-mesos framework via `kubectl`:
|
Interact with the kubernetes-mesos framework via `kubectl`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -21,11 +21,28 @@ certainly want the docs that go with that version.</h1>
|
|||||||
|
|
||||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
||||||
# Kubernetes User Guide: Managing Applications: Prerequisites
|
# 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/<os>/<arch>;
|
||||||
|
or if you build from source, kubectl should be either under _output/local/bin/<os>/<arch> or _output/dockerized/bin/<os>/<arch>.
|
||||||
|
|
||||||
|
Next, make sure the kubectl tool is in your path, assuming you download a release:
|
||||||
|
```
|
||||||
|
# OS X
|
||||||
|
export PATH=<path/to/kubernetes-directory>/platforms/darwin/amd64:$PATH
|
||||||
|
|
||||||
|
# Linux
|
||||||
|
export PATH=<path/to/kubernetes-directory>/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).
|
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?
|
## What's next?
|
||||||
|
|
||||||
[Learn how to launch and expose your application.](quick-start.md)
|
[Learn how to launch and expose your application.](quick-start.md)
|
||||||
|
Loading…
Reference in New Issue
Block a user