30 Days of Kubernetes Security is a learning experience that will help you master the security best practices for Kubernetes.
In this 30-day challenge, you will learn about the following from Kubernetes perspective:
- Pod Security Standards
- Role-Based Access Control (RBAC)
- Network Policies
- Vulnerability scanning and patching
- Logging and monitoring
- Data Security
Week 1:
- Day 1: Start with the basics of Kubernetes security.
- Day 2: Learn about Kubernetes attack vectors and how to secure them.
- Day 3: Learn how to secure Kubernetes clusters using network policies.
- https://blog.digitalis.io/kubernetes-network-policies-with-calico-f037064efc4a
- https://www.tigera.io/blog/deep-dive/what-you-cant-do-with-kubernetes-network-policies-unless-you-use-calico-node-specific-policies/
- https://medium.com/@bijit211987/kubernetes-network-policy-secure-your-cluster-4477f5f8bc8d#:~:text=Best practices for applying Kubernetes network policies&text=Only allow inter-namespace communication,receive non-cluster network traffic.
- Day 4: Learn how to secure Kubernetes secrets
- Day 5: Learn how to secure Kubernetes with RBAC
Week 2:
- Day 6: Learn how to secure Kubernetes with Pod Security
- Day 7: Learn how to secure Kubernetes with admission controllers.
- Day 8: Learn how to secure Kubernetes with Open Policy Agent.
- Day 9: Learn how to secure Kubernetes with Falco
- Day 10: Learn how to secure Kubernetes with Istio.
Week 3:
- Day 11: Learn how to secure Kubernetes with Helm
- Day 12: Learn how to secure Kubernetes with Kube-bench
- https://medium.com/@CloudifyOps/securing-kubernetes-with-cis-benchmark-leveraging-kube-bench-and-grafana-for-enhanced-visibility-8314391b7e81#:~:text=You can run Kube-Bench,run master checks when possible.
- https://www.linkedin.com/pulse/securing-kubernetes-cluster-using-kubescape-kube-bench-razorops/
- Day 13: Learn how to secure Kubernetes with Trivy
- Day 14: Learn how to monitor Kubernetes with Sysdig.
- Day 15: Learn how to secure Kubernetes using threat modeling
Week 4:
- Day 16: Learn how to secure Kubernetes with Calico.
- Day 17: Learn how to secure Kubernetes with Cilium
- Day 18: Learn how to secure Kubernetes with Kube-hunter
- Day 19: Learn how to secure Kubernetes with Kubeaudit.
- Day 20: Learn how to secure Container using Seccomp
- https://kubernetes.io/docs/tutorials/security/seccomp/
Lab:
-
Day 21-30: Practice what you have learned in a lab environment.
OWASP Kubernetes Top 10
Kubernetes Goat Mapped Scenarios
K01: Insecure Workload Configurations
--DIND (docker-in-docker) exploitation
--DoS the Memory/CPU resources
K02: Supply Chain Vulnerabilities
--RBAC least privileges misconfiguration
K04: Lack of Centralized Policy Enforcement
--Securing Kubernetes Clusters using Kyverno Policy Engine
K05: Inadequate Logging and Monitoring
--Cilium Tetragon - eBPF-based Security Observability and Runtime Enforcement
--Falco - Runtime security monitoring & detection
K06: Broken Authentication Mechanisms
--RBAC least privileges misconfiguration
K07: Missing Network Segmentation Controls
--Kubernetes namespaces bypass
--Secure network boundaries using NSP
K08: Secrets Management Failures
K09: Misconfigured Cluster Components
--KubeAudit - Audit Kubernetes cluster
I hope this plan helps you get started with learning Kubernetes security. Let me know if you have any other questions!