Installing kubectl
kubectl
is a CLI that we are going to use to send commands to a Kubernetes cluster. You must have this installed so that you can interact with the cluster (regardless of whether it’s running locally or in the cloud):
- To install
kubectl
on macOS with Homebrew, use the following command:brew install kubectl
- To install
kubectl
in a Linux distribution, you can usecurl
to download the binary executable:curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
- To install it in a Windows system, you can use the
chocolatey
package manager:choco install kubernetes-cli
From this point on, every kubectl
command will be the same, regardless of the OS you’re using. To check if the installation went successfully, run the following command. This will give you a nice, formatted view of the version of kubectl
that’s running on your system:
kubectl version –client &...