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

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.

主站蜘蛛池模板: 天峻县| 黎川县| 麻城市| 大石桥市| 孟津县| 靖安县| 吉水县| 思南县| 仙桃市| 丰镇市| 枣阳市| 平泉县| 娄底市| 若羌县| 大埔县| 平谷区| 临颍县| 新野县| 莱芜市| 金塔县| 永善县| 饶河县| 天长市| 灌南县| 遂溪县| 新宾| 白水县| 突泉县| 大足县| 德兴市| 库车县| 洛南县| 崇仁县| 大城县| 苏尼特右旗| 嘉峪关市| 准格尔旗| 灵寿县| 永昌县| 积石山| 澎湖县|