Ensure that the --insecure-port argument is set to 0

HIGH

Description

Description:

Do not bind to insecure port.

Rationale:

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.

All components that use the API must connect via the secured port, authenticate themselves, and be authorized to use the API.

This includes:

  • kube-controller-manager
  • kube-proxy
  • kube-scheduler
  • kubelets.

Remediation

Edit the API server pod specification file '/etc/kubernetes/manifests/kube-apiserver.yaml' on the master node and set the below parameter.

--insecure-port=0
.