Ensure that the --insecure-port argument is set to 0 (API Server)

Do not bind to insecure port. Setting up the apiserver to serve on an insecure port would allow unauthenticated and unencrypted access to your master node. This would allow attackers who could access this port, to easily take control of the cluster.

Risk Level: High
Cloud Entity: Pods
CloudGuard Rule ID: D9.K8S.NET.07
Covered by Spectral: Yes
Category: Compute


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


Edit the API server pod specification file $apiserverconf
apiserver.yaml on the master node and set the below parameter.


  1. https://kubernetes.io/docs/admin/kube-apiserver/


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 Kubernetes Benchmark v1.20
  • CIS Kubernetes Benchmark v1.4.0
  • CIS Kubernetes Benchmark v1.5.1
  • CIS Kubernetes Benchmark v1.6.1
  • Kubernetes NIST.SP.800-190
  • Kubernetes v.1.13 CloudGuard Best Practices
  • Kubernetes v.1.14 CloudGuard Best Practices