@@ -29,17 +29,28 @@ The following methods exist for installing kubectl on macOS:
29
29
30
30
1 . Download the latest release:
31
31
32
- ``` bash
32
+ {{< tabs name="download_binary_macos" >}}
33
+ {{< tab name="Intel" codelang="bash" >}}
33
34
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 >}}
35
40
36
41
{{< note >}}
37
42
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.
38
43
39
- For example, to download version {{< param "fullversion" >}} on macOS, type:
44
+ For example, to download version {{< param "fullversion" >}} on Intel macOS, type:
40
45
41
46
``` 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"
43
54
```
44
55
45
56
{{< /note >}}
@@ -48,10 +59,15 @@ The following methods exist for installing kubectl on macOS:
48
59
49
60
Download the kubectl checksum file:
50
61
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
+
55
71
Validate the kubectl binary against the checksum file:
56
72
57
73
``` bash
0 commit comments