├── .github └── workflows │ └── action.yml ├── LICENSE └── README.md /.github/workflows/action.yml: -------------------------------------------------------------------------------- 1 | name: Check Markdown links 2 | 3 | on: push 4 | 5 | jobs: 6 | markdown-link-check: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@master 10 | - uses: gaurav-nelson/github-action-markdown-link-check@v1 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Evgeny Shmarnev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Certified Kubernetes Security Specialist Exam Preparation Guide 2 | 3 | [![Check Markdown links](https://github.com/Evalle/CKS/actions/workflows/action.yml/badge.svg)](https://github.com/Evalle/CKS/actions/workflows/action.yml) 4 | 5 | This guide is intended to be a point of knowledge for everyone who wants to pass Certified Kubernetes Security Specialist (CKS) Exam. 6 | The main idea is to provide links to every topic in each domain. Preference will always be the official documentation but feel free to add other useful links. 7 | 8 | 9 | ## Introduction (Read carefully) 10 | 11 | A Certified Kubernetes Security Specialist is an accomplished Kubernetes practitioner (**as evidenced by holding the CKA credential**) who has demonstrated competence on a broad range of best practices for securing container-based applications and Kubernetes platforms during build, deployment and runtime. 12 | 13 | Certified Kubernetes Security Specialist (CKS) candidates must have taken and passed the [Certified Kubernetes Administrator (CKA)](https://www.cncf.io/certification/cka/) exam prior to attempting the CKS exam. The CKS may be scheduled but not taken until CKA certification has been achieved. 14 | 15 | ## Exam Details 16 | 17 | This exam is an online, proctored, performance-based test that requires solving multiple tasks from a command line running Kubernetes. Candidates have 2 hours to complete the tasks. 18 | 19 | The exam is based on Kubernetes v1.20 20 | 21 | Certified Kubernetes Security Specialist (CKS) candidates must have taken and passed the Certified Kubernetes Administrator (CKA) exam prior to attempting the CKS exam. The CKS may be scheduled but not taken until CKA certification has been achieved. 22 | 23 | 24 | ## Table of Contents 25 | 26 | 1. [Cluster Setup](https://github.com/Evalle/CKS/blob/master/README.md#Cluster-Setup) 27 | 1. [Cluster Hardening](https://github.com/Evalle/CKS/blob/master/README.md#Cluster-Hardening) 28 | 1. [System Hardening](https://github.com/Evalle/CKS/blob/master/README.md#System-Hardening) 29 | 1. [Minimize Microservice Vulerabilities](https://github.com/Evalle/CKS/blob/master/README.md#Minimize-Microservice-Vulnerabilities) 30 | 1. [Supply Chain Security](https://github.com/Evalle/CKS/blob/master/README.md#Supply-Chain-Security) 31 | 1. [Monitoring, Logging and Runtime Security](https://github.com/Evalle/CKS/blob/master/README.md#Monitoring-Logging-and-Runtime-Security) 32 | 1. [Useful Links](https://github.com/Evalle/CKS/blob/master/README.md#useful-links) 33 | 34 | ## Cluster Setup 35 | 36 | - [Use Network security policies to restrict cluster level access](https://kubernetes.io/docs/concepts/services-networking/network-policies/) 37 | - [Use CIS benchmark to review the security configuration of Kubernetes components (etcd, kubelet, kubedns, kubeapi)](https://github.com/aquasecurity/kube-bench) 38 | - [Properly set up Ingress objects with security control](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) 39 | - [Protect node metadata and endpoints](https://kubernetes.io/docs/tasks/administer-cluster/securing-a-cluster/#restricting-cloud-metadata-api-access) 40 | - [Minimize use of, and access to, GUI elements](https://github.com/kubernetes/dashboard#getting-started) 41 | - Verify platform binaries before deploying, use [md5 checks](https://www.tecmint.com/generate-verify-check-files-md5-checksum-linux/) against [official binaries](https://github.com/kubernetes/kubernetes/releases) 42 | 43 | ## Cluster Hardening 44 | 45 | - [Restrict access to Kubernetes API](https://kubernetes.io/docs/reference/access-authn-authz/controlling-access/) 46 | - [Use Role Based Access Controls to minimize exposure](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) 47 | - [Exercise caution in using service accounts e.g. disable defaults, minimize permissions on newly created ones](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) 48 | - [Update Kubernetes frequently](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/) 49 | 50 | ## System Hardening 51 | 52 | - [Minimize host OS footprint (reduce attack surface)](https://blog.sonatype.com/kubesecops-kubernetes-security-practices-you-should-follow#:~:text=Reduce%20Kubernetes%20Attack%20Surfaces) 53 | - Minimize IAM roles - [AWS](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html), [GCloud](https://cloud.google.com/storage/docs/access-control/iam-roles) 54 | - [Minimize external access to the network](https://kubernetes.io/docs/concepts/services-networking/network-policies/) 55 | - Appropriately use kernel hardening tools such as [AppArmor](https://gitlab.com/apparmor), [seccomp](https://kubernetes.io/docs/tutorials/clusters/seccomp/) 56 | 57 | ## Minimize Microservice Vulnerabilities 58 | 59 | - Setup appropriate OS level security domains e.g. using [PSP](https://kubernetes.io/docs/concepts/policy/pod-security-policy/), [OPA](https://www.openpolicyagent.org/), [security contexts](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) 60 | - [Manage Kubernetes secrets](https://kubernetes.io/docs/concepts/configuration/secret/) 61 | - [Use container runtime sandboxes in multi-tenant environments](https://kubernetes.io/docs/concepts/containers/runtime-class/) (e.g. [gvisor](https://gvisor.dev/), [kata containers](https://katacontainers.io/)) 62 | - [Implement pod to pod encryption by use of mTLS](https://thenewstack.io/mutual-tls-microservices-encryption-for-service-mesh/) 63 | 64 | ## Supply Chain Security 65 | 66 | - [Minimize base image footprint](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) 67 | - [Secure your supply chain: whitelist allowed registries, sign and validate images](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#imagepolicywebhook) 68 | - Use static analysis of user workloads (e.g.Kubernetes resources, Docker files) - [kubesec](https://kubesec.io/), [conftest](https://github.com/open-policy-agent/conftest) 69 | - Scan images for known vulnerabilities ([clair](https://coreos.com/clair/docs/latest/), [trivy](https://github.com/aquasecurity/trivy)) 70 | 71 | ## Monitoring Logging and Runtime Security 72 | 73 | - Perform behavioral analytics of syscall process and file activities at the host and container level to detect malicious activities - ([strace](https://strace.io/)) 74 | - Detect threats within physical infrastructure, apps, networks, data, users and workloads 75 | - Detect all phases of attack regardless where it occurs and how it spreads 76 | - Perform deep analytical investigation and identification of bad actors within environment 77 | - [Ensure immutability of containers at runtime](https://gianarb.it/blog/container-security-immutability) 78 | - [Use Audit Logs to monitor access](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) 79 | 80 | ## Useful Links 81 | 82 | ### Courses 83 | 84 | - [Configuring and Managing Kubernetes Security](https://app.pluralsight.com/library/courses/configuring-managing-kubernetes-security/table-of-contents) 85 | - [Kubernetes CKS 2021 Complete Course + Simulator (Udemy)](https://www.udemy.com/course/certified-kubernetes-security-specialist/) 86 | 87 | ### Info 88 | 89 | - [Exam info](https://training.linuxfoundation.org/certification/certified-kubernetes-security-specialist/?utm_source=lftraining&utm_medium=pr&utm_campaign=cks0720) 90 | - [Exam Curriculum (v1.20)](https://github.com/cncf/curriculum/blob/master/CKS_Curriculum_%20v1.20.pdf) 91 | --------------------------------------------------------------------------------