-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

The Kubernetes Workshop
By :

The Kubernetes API uses JSON over HTTP for its requests and responses. It follows the REST architectural style. You can use the Kubernetes API to read and write Kubernetes resource objects.
Note
For more details about the RESTful API, please refer to https://restfulapi.net/.
Kubernetes API allows clients to create, update, delete, or read a description of an object via standard HTTP methods (or HTTP verbs), such as the examples in the following table:
Figure 4.12: HTTP verbs and their usage
In the context of Kubernetes API calls, it is helpful to understand how these HTTP methods map to API request verbs. So, let's take a look at which verbs are sent through which methods:
GET
: get
, list
, and watch
Some example kubectl commands are kubectl get pod
, kubectl describe pod <pod-name>
, and kubectl get pod -w
.
POST
: create
An example kubectl command is kubectl create -f <filename.yaml>
.
PATCH
: patch
An example...