Kubernetes API Style

The Kubernetes API is a RESTful service that requires all clients to create, read, update, and delete resources using HTTP requests, such as GET, PUT, POST, and DELETE. Client applications such as kubectl or client libraries in various programming languages implement the API response and request types. For communication, the Kubernetes API accepts and returns JSON data, just like most of the RESTful services that are available.

Representational State Transfer (REST) is an architectural style for web applications so that they can use HTTP requests. As a convention, GET is used for reading resources, POST is used for creating resources, PUT is used for updating resources, and DELETE is used for deleting resources.

Servers that apply the RESTful API are expected to have clients without any knowledge of server structure. Likewise, the server should provide all related information for the client so that it can operate and interact with itself.

JavaScript Object Notation (JSON) is a popular and lightweight data exchange format. JSON is suitable for machine parsing and generation, and is human-readable and expressive. Although written in JavaScript, JSON is supported by multiple languages and is a crucial data type of modern asynchronous browser/server communication.

In the following section, the Kubernetes API response style will be explored by calling an API server REST endpoint.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.95.7