Setting up kubectl
As we mentioned in Chapter 1, Understanding Kubernetes and Helm, Kubernetes is a system that exposes different API endpoints. These API endpoints are used to perform various actions on a cluster, such as creating, viewing, or deleting resources. To provide a simpler user experience, developers need a way of interacting with Kubernetes without having to manage the underlying API layer.
While you will predominantly use the Helm command-line tool throughout this book to install and manage applications, kubectl is an essential tool for common tasks.
Read on to learn how to install kubectl on a local workstation. Note that the kubectl version that was used at the time of writing was v1.21.2.
Installing kubectl
kubectl can be installed using minikube, or it can be obtained via a package manager or through direct download. First, let’s describe how to obtain kubectl using minikube.
Installing kubectl via minikube
Installing kubectl is straightforward...