Kube API Server

Kube api server is the management component in Kubernetes. When user issues command using kubectl, it actually connects to kube api server. Kube-api-server then authenticates and validates the request and connect to etcd host to return the response. Kube-api-server exposes many REST API. User can connect using REST API and get the desired response. Let us understand a typical workflow in creating a pod. Once user request kubectl command to create a POD, kube-api-server receives the request and authenticate and validate it, then it creates a POD and update the information in ECTD server and user receive information as 'POD created'. Then kube-scheduler continuously monitors kube-api-server and finds that a new POD request came in and it identifies the right node to place the POD. Scheduler then passes the node information to Kube-api-server. Kube-api-server updates the node information to ETCD host and connect to Kubelet of the appropriate node to create the POD. Kubelet then create the POD and instructs container-runtime-engine like Docker to deploy the image in the POD. Once completed, kubelet updates the information back to kube-api-server and kube-api-server then updates the information to ETCD cluster.

Setup Kube API Server

If you use kubeadm tool, kube-api-server is configured by the tool as a pod running in kube-system namespace. Other wise, you can download the binaries from kubernetes documentation and install it and configure it as kube-api-server service and run in master node. To setup, it certificates are required to configure so secure communication can take place between kube-api-server and client.

View Kube API Server installation

If kubeadm tool configures the kube-spi-server, it will run in pod under kube-system namespace and you can find it by runnign command-
kubectl get pods -n kube-system
You can find the mistfest file for the kube-api-server under file -
cat /etc/kubernetes/manifests/kube-apiserver.yaml

In non-kubeadmin setup it can be found as service and manifest file is located here- cat /etc/systemd/system/kube-apiserver.service
To view the running process, you can run command as ps -aux | grep kube-apiserver

Next