Interacting with the API server
As we mentioned earlier, you interact with the API server using either direct API requests or the kubectl
utility. We will focus on using kubectl
for the majority of our interaction in this book, but we will call out using direct API calls where applicable.
Using the Kubernetes kubectl utility
kubectl
is a single executable file that allows you to interact with the Kubernetes API using a command-line interface (CLI). It is available for most major operating systems and architectures, including Linux, Windows, and Mac.
Installation instructions for most operating systems are located on the Kubernetes site at https://kubernetes.io/docs/tasks/tools/install-kubectl/. Since we are using Linux as our operating system for the exercises in the book, we will cover installing kubectl
on a Linux machine. Follow these steps:
- To download the latest version of
kubectl
, you can run acurl
command that will download it, as follows:curl...