Skip to content

Commit f0d53f9

Browse files
authored
Update macOS installation instructions (#27512)
* Update macOS installation instructions * Add tabs to example * tabs render weird in infoboxes
1 parent dba84db commit f0d53f9

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

content/en/docs/tasks/tools/install-kubectl-macos.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,28 @@ The following methods exist for installing kubectl on macOS:
2929

3030
1. Download the latest release:
3131

32-
```bash
32+
{{< tabs name="download_binary_macos" >}}
33+
{{< tab name="Intel" codelang="bash" >}}
3334
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
34-
```
35+
{{< /tab >}}
36+
{{< tab name="Apple Silicon" codelang="bash" >}}
37+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl"
38+
{{< /tab >}}
39+
{{< /tabs >}}
3540

3641
{{< note >}}
3742
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)` portion of the command with the specific version.
3843

39-
For example, to download version {{< param "fullversion" >}} on macOS, type:
44+
For example, to download version {{< param "fullversion" >}} on Intel macOS, type:
4045

4146
```bash
42-
curl -LO https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/amd64/kubectl
47+
curl -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/amd64/kubectl"
48+
```
49+
50+
And for macOS on Apple Silicon, type:
51+
52+
```bash
53+
curl -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/arm64/kubectl"
4354
```
4455

4556
{{< /note >}}
@@ -48,10 +59,15 @@ The following methods exist for installing kubectl on macOS:
4859

4960
Download the kubectl checksum file:
5061

51-
```bash
52-
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl.sha256"
53-
```
54-
62+
{{< tabs name="download_checksum_macos" >}}
63+
{{< tab name="Intel" codelang="bash" >}}
64+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl.sha256"
65+
{{< /tab >}}
66+
{{< tab name="Apple Silicon" codelang="bash" >}}
67+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl.sha256"
68+
{{< /tab >}}
69+
{{< /tabs >}}
70+
5571
Validate the kubectl binary against the checksum file:
5672

5773
```bash

0 commit comments

Comments
 (0)