Kubernetes Security Practices

What is Kubernetes?
Introduction
Container-based microservices architectures have profoundly changed the way development and operations teams test and deploy modern software. Large and small software companies alike are now deploying thousands of container instances daily, and that’s a complexity of scale they have to manage.
What is Kubernetes
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation.

The most common cloud providers offering fully managed services for Kubernetes are

  1. EKS – Amazon Elastic Kubernetes Services
  2. AKS – Microsoft Azure Kubernetes Service
  3. GKE – Google Kubernetes Engine

What is Kubernetes?

Introduction

Container-based microservices architectures have profoundly changed the way development and operations teams test and deploy modern software. Large and small software companies alike are now deploying thousands of container instances daily, and that’s a complexity of scale they have to manage.

What is Kubernetes
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation.
The most common cloud providers offering fully managed services for Kubernetes are
  1. EKS – Amazon Elastic Kubernetes Services
  2. AKS – Microsoft Azure Kubernetes Service
  3. GKE – Google Kubernetes Engine
Kubernetes Components and Architecture
Kubernetes follows a client-server architecture . Kubernetes cluster has a master node and a whole lot of worker nodes which is where your applications would actually run.
Kubectl command line tool that interacts with kube-apiserver and send commands to the master node. Each command is converted into an API call.

Master node is responsible for managing whole cluster. It monitors the health check of all nodes in the cluster.

Four basic components of the master node (control plane):

  1. API server : centralized component where all the cluster components are communicated
  2. Scheduler : responsible for assigning your application to worker node
  3. Controller manager : maintains the cluster, it handles node failures, replicating components, maintaining the correct number of pods
  4. Etcd : data store that stores the cluster configuration

Worker node are nothing but a virtual machine(VM’s) running in cloud or on-prem, a physical server running inside your data center

Three basic components of the Worker Node (Data plane)

  1. Kubelet : runs and manages the containers on node and it talks to API server
  2. Kube-proxy : load balances traffic between application components
  3. Container runtime : a software that executes containers and manages container images on a node(eg. Docker)

Pods are smallest unit of deployment in Kubernetes as container is smallest unit of deployment in Docker

Kubernetes Components and Architecture

Kubernetes follows a client-server architecture . Kubernetes cluster has a master node and a whole lot of worker nodes which is where your applications would actually run.
Kubectl command line tool that interacts with kube-apiserver and send commands to the master node. Each command is converted into an API call.

Master node is responsible for managing whole cluster. It monitors the health check of all nodes in the cluster.

Four basic components of the master node (control plane):

  1. API server : centralized component where all the cluster components are communicated
  2. Scheduler : responsible for assigning your application to worker node
  3. Controller manager : maintains the cluster, it handles node failures, replicating components, maintaining the correct number of pods
  4. Etcd : data store that stores the cluster configuration

Worker node are nothing but a virtual machine(VM’s) running in cloud or on-prem, a physical server running inside your data center

Three basic components of the Worker Node (Data plane)

  1. Kubelet : runs and manages the containers on node and it talks to API server
  2. Kube-proxy : load balances traffic between application components
  3. Container runtime : a software that executes containers and manages container images on a node(eg. Docker)

Pods are smallest unit of deployment in Kubernetes as container is smallest unit of deployment in Docker

Kubernetes Security Attack Surface

There are various ways that an attacker could attempt to compromise Kubernetes cluster and the applications running on it.

Kubernetes Security Attack Surface

There are various ways that an attacker could attempt to compromise Kubernetes cluster and the applications running on it.
Kubernetes Security Best Practices
Image Scanning
RBAC
Secret Management
Assurance
Runtime profiles
Audit and Monitoring
Network Policies
Container Firewall

Kubernetes Security Best Practices

Image Scanning  
RBAC  
Secret Management
Assurance
Runtime profiles
Audit and Monitoring  
Network Policies
Container Firewall