Skip to content

Latest commit

Β 

History

History
125 lines (76 loc) Β· 6.31 KB

File metadata and controls

125 lines (76 loc) Β· 6.31 KB

Kubernetes cluster setup

Network Policies

Use network security policies to restrict cluster level access

✨ Network Policies, Declare Network Policy

⚑️ Notes:

  • NetworkPolicies allow you to prevent or restrict network communication to and from Pods
  • They are "an application-centric construct which allow you to specify how a pod is allowed to communicate with various network entities over the network"
  • They "do not conflict; they are additive"
  • Ther are stateful, so the replies to outbound requests still reach the application

πŸ’‘ Tips:

βš—οΈ Practice

πŸ“ Read more:

CIS Benchmark

Use CIS benchmark to review the security configuration of Kubernetes components (etcd, kubelet, kubedns, kubeapi)

⚑️ Notes:

πŸš€ kube-bench

πŸ’‘ Tips:

  • Use kube-bench logs to view the CIS benchmark output
  • The CIS benchmark output includes remediations steps one can follow to fix the issues that have been reported
  • kubeadm clusters use a kubelet configuration file located at /var/lib/kubelet/config.yaml (can be seen from /etc/systemd/system/kubelet.service.d/10-kubeadm.conf)
  • In a kubeadm cluster, control plane components run as static pods whose definitions are in /etc/kubernetes/manifest folder

βš—οΈ Practice

πŸ“ Read more:

Ingress

Properly set up Ingress objects with security control

✨ Ingress > TLS, Generate Certificates Manually > openssl

πŸ’‘ Tips:

  • TLS termination can be implemented using an Ingress
  • TLS certificates are stored as Secret which are referenced in the Ingress using the spec.tls[].secretName

βš—οΈ Practice

πŸ“ Read more:

Node protection

Protect node metadata and endpoints

✨ Restricting cloud metadata API access, Kubelet authentication/authorization, Set Kubelet Parameters Via A Configuration File

βš—οΈ Practice

πŸ“ Read more:

GUI restriction

Minimize use of, and access to, GUI elements

✨ Deploy and Access the Kubernetes Dashboard

πŸ“ Read more:

Platform binaries

Verify platform binaries before deploying

✨ Install and Set Up kubectl on Linux

πŸ’‘ Tips:

βš—οΈ Practice

πŸ“ Read more:


🧡 Next: Cluster hardening