Ensure that a minimal audit policy is created (API Server)

Kubernetes can audit the details of requests made to the API server..

Risk Level: Low
Cloud Entity: Pods
CloudGuard Rule ID: D9.K8S.IAM.83
Covered by Spectral: No
Category: Compute

GSL LOGIC

KubernetesPod where labels contain [value='kube-apiserver'] and namespace = 'kube-system' should have spec.containers with [parsedArgs contain [key like 'audit-policy-file' ]]

REMEDIATION

Create an audit policy file for your cluster.

References:

  1. https://kubernetes.io/docs/tasks/debug-application-cluster/audit/

Pods

Pods are the smallest deployable units of computing that can be created and managed in Kubernetes.A Pod is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers.

Compliance Frameworks

  • CIS Amazon Elastic Kubernetes Service (EKS) Benchmark v1.2.0
  • CIS Kubernetes Benchmark v1.20
  • CIS Kubernetes Benchmark v1.24
  • CIS Kubernetes Benchmark v1.6.1