Skip to content

Commit

Permalink
Implement PR #3859 with tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
chenopis committed May 31, 2017
1 parent 42f0b93 commit 7a6d264
Showing 1 changed file with 61 additions and 8 deletions.
69 changes: 61 additions & 8 deletions docs/tasks/tools/install-kubectl.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,82 @@ Here are a few methods to install kubectl.
{% capture steps %}
## Install kubectl binary via curl

1. Download the latest release with the command:
{% capture macos %}
1. Download the latest release with the command:

```shell
# OS X
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl
```

To download a specific version, replace the `$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)` portion of the command with the specific version.

For example, to download version 1.4.6 on MacOS, type:
`curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.4.6/bin/darwin/amd64/kubectl`

2. Make the kubectl binary executable.

```shell
chmod +x ./kubectl
```
3. Move the binary in to your PATH.

```shell
sudo mv ./kubectl /usr/local/bin/kubectl
```
{% endcapture %}

{% capture linux %}
1. Download the latest release with the command:

# Linux
```shell
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
```

To download a specific version, replace the `$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)` portion of the command with the specific version.

For example, to download version {{page.fullversion}} on Linux, type:
`curl -LO https://storage.googleapis.com/kubernetes-release/release/{{page.fullversion}}/bin/linux/amd64/kubectl`

2. Make the kubectl binary executable.

# Windows
```shell
chmod +x ./kubectl
```
3. Move the binary in to your PATH.

```shell
sudo mv ./kubectl /usr/local/bin/kubectl
```
{% endcapture %}

{% capture win %}
1. Download the latest release with the command:

```shell
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/windows/amd64/kubectl.exe
```
To download a specific version, replace the `$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)` portion of the command with the specific version. For example, to download version 1.4.6 on MacOS, type:
`curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.4.6/bin/darwin/amd64/kubectl`

2. Make the kubectl binary executable.
To download a specific version, replace the `$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)` portion of the command with the specific version.

For example, to download version {{page.fullversion}} on Windows, type:
`curl -LO https://storage.googleapis.com/kubernetes-release/release/{{page.fullversion}}/bin/windows/amd64/kubectl.exe`

2. Make the kubectl binary executable.

```shell
chmod +x ./kubectl
```
3. Move the binary in to your PATH.
3. Move the binary in to your PATH.

```shell
sudo mv ./kubectl /usr/local/bin/kubectl
```
{% endcapture %}

{% assign tab_names = "macOS,Linux,Windows" | split: ',' | compact %}
{% assign tab_contents = site.emptyArray | push: macos | push: linux | push: win %}

{% include tabs.md %}

## Download as part of the Google Cloud SDK

Expand Down

0 comments on commit 7a6d264

Please sign in to comment.