Kubernetes Penetration Testing – Part 1

KUBERNETES

Kubernetes is an open-source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open-source project is hosted by the Cloud Native Computing Foundation (CNCF).When you deploy Kubernetes, you get a cluster. A Kubernetes cluster consists of a set of worker machines, called nodes that run containerized applications. The control plane manages the worker nodes and the Pods in the cluster.

Control Plane Components

The control plane’s components make global decisions about the cluster, as well as detecting and responding to cluster events. It consists of components such as kube-apiserver, etcd, kube-scheduler, kube-controller-manager and cloud-controller-manager.

kube-apiserver – kube-apiserver exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.

etcd – etcd is a consistent and highly-available key-value store used as Kubernetes’ backing store for all cluster data.

kube-scheduler – kube-scheduler watches for newly created Pods with no assigned node, and selects a node for them to run on.

kube-controller  – manager kube-controller-manager runs controller processes. Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single binary and run in a single process.

cloud-controller-manager – The cloud controller manager lets you link your cluster into your cloud provider’s API, and separates out the components that interact with that cloud platform from components that just interact with your cluster.

Node Components

Node components run on every node, maintaining running pods and providing the Kubernetes runtime environment. It consists of components such as kubelet, kube-proxy and container runtime.

kubelet –  kubelet is an agent that runs on each node in the cluster. It makes sure that containers are running in a Pod.

kube-proxy –  kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept.

Container runtime –  The container runtime is the software that is responsible for running containers.

Picture 1 768x345.jpg

Source: https://cheatsheetseries.owasp.org/cheatsheets/Kubernetes_Security_Cheat_Sheet.html

ARCHITECTURE

Picture 1 1.jpg