官术网_书友最值得收藏!

How kubectl Communicates with Kubernetes

As we saw in the previous chapter, the API server manages communications between the end-user and Kubernetes, and it also acts as an API gateway to the cluster. To achieve this, it implements the RESTful API over the HTTP and HTTPS protocols to perform CRUD operations to populate and modify Kubernetes API objects such as pods, services, and more based upon the instructions sent by a user via kubectl. These instructions can be in various forms. For example, to retrieve information for pods running in the cluster, we would use the kubectl get pods command, while to create a new pod, we would use the kubectl run command.

First, let's take a look at what happens behind the scenes when you run a kubectl command. Take a look at the following illustration, which provides an overview of the process, and then we will take a closer look at the different details of the process:

Figure 3.1: A representative flowchart for the kubectl utility

A kubectl command is translated into an API call, which is then sent to the API server. The API server then authenticates and validates the requests. Once the authentication and validation stages have been successful, the API server retrieves and updates data in etcd and responds with the requested information.

主站蜘蛛池模板: 长春市| 辛集市| 兴业县| 安仁县| 墨竹工卡县| 思茅市| 盐山县| 邓州市| 上蔡县| 汪清县| 株洲市| 南京市| 内乡县| 镇江市| 盱眙县| 丽水市| 舞阳县| 蒙城县| 霍州市| 民勤县| 秀山| 繁峙县| 渭南市| 南漳县| 浦江县| 莎车县| 饶平县| 通化县| 西和县| 丹阳市| 长顺县| 屏山县| 扬中市| 贺州市| 武山县| 沂南县| 梅州市| 正镶白旗| 阿坝县| 集安市| 章丘市|