Automation and Tooling: KCSA practice questions
Automation and tooling is the part of compliance that runs without a person in the loop. Writing a rule in a policy document does not stop anyone from creating a privileged pod; a control that is evaluated on every API request, or a scanner that inspects the cluster continuously, does.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Automation and Tooling covers in KCSA
Automation and tooling is the part of compliance that runs without a person in the loop. Writing a rule in a policy document does not stop anyone from creating a privileged pod; a control that is evaluated on every API request, or a scanner that inspects the cluster continuously, does. The tools in this topic fit into a small number of roles, and recognizing the role matters more than memorizing product names.
The first role is preventive enforcement at admission. An admission controller intercepts a request to the API server after it has been authenticated and authorized but before the object is persisted. Mutating controllers run first and may change the request; validating controllers run second and may only accept or reject it. If any controller in either phase rejects the request, the whole request fails. Admission controllers act on create, update, delete and connect requests; they cannot block reads. Built-in plugins such as PodSecurity and ResourceQuota cover common rules, and MutatingAdmissionWebhook and ValidatingAdmissionWebhook let external policy engines take part.
Two policy engines appear often. OPA Gatekeeper describes itself as a validating and mutating webhook that enforces CRD-based policies executed by Open Policy Agent: a ConstraintTemplate defines a reusable policy and a Constraint instantiates it with parameters. Kyverno takes a Kubernetes-native approach in which policies are themselves Kubernetes resources written in YAML and CEL, so no new language is required, and they can be enforced as an admission controller, from a CLI scanner or at runtime. Kyverno rules can validate, mutate, generate or clean up resources, and can verify container images and their metadata for supply chain checks.
The second role is detective: finding what is already wrong. Admission only sees new requests, so objects created before a policy existed are not covered. Gatekeeper's audit function reports existing resources that violate a policy, and Kyverno reports results in the OpenReport format. Configuration benchmarks such as the CIS Kubernetes Benchmark are checked by scanners against node and control plane settings rather than individual objects.
The third role is runtime detection. Falco reads Linux kernel system call events, optionally adds other data sources through plugins, enriches events with container and Kubernetes metadata, and compares them with YAML rules; when a rule matches it raises an alert to stdout, a file, syslog, a program or an HTTP endpoint. Falco is a graduated CNCF project. This covers behavior that no manifest reveals, such as a shell spawned inside a running container.
Infrastructure as Code ties the roles together. When manifests and policies live in version control, every change is reviewed and repeatable, the same policy can be evaluated in a pipeline before anything reaches the cluster, and the history doubles as an audit trail.
Key points
- Admission control runs after authentication and authorization; mutating controllers run before validating ones.
- Admission controllers cannot block get, list or watch requests.
- Gatekeeper uses ConstraintTemplate and Constraint custom resources; its audit reports existing violations.
- Kyverno policies are Kubernetes resources written in YAML and CEL and can also verify image signatures.
- Falco detects suspicious runtime behavior from kernel system call events and is a graduated CNCF project.
Three sample questions
9 KCSA questions on Automation and Tooling, 9 with explanations. How practice works
Question 1
- A.Nmap
- B.Kube-bench
- C.Grafana
- D.syslog-ng
- E.Bash scripts in CronJobs
Correct answer: B
Sources: CIS Kubernetes Benchmark, Kube-bench GitHub Repository
Question 2
- A.To manage node scaling based on CPU usage
- B.To provide an integrated container registry
- C.To enforce policy-as-code by validating configurations during admission
- D.To offer a threat feed for container vulnerabilities
- E.To install an alternative container runtime in Kubernetes
Correct answer: C
Sources: Cloud Google - Pod Security Policies with Gatekeeper, Open Policy Agent Documentation - Kubernetes Admission Control
Question 3
- A.A container scanning tool for malware detection
- B.A platform for automating cost optimizations
- C.An admission controller that enables writing and enforcing policies as Kubernetes resources
- D.An event streaming system for logs
- E.A vulnerability database maintained by CIS
Correct answer: C
Sources: Kyverno Official Documentation, Kubernetes Admission Controllers
Practice this topic
Focus mode keeps every question on Automation and Tooling until you leave it. 10 free guest answers, then a free account; no credit card.
Or open KCSA practice across all topics.
Sources
The explanation above was checked against these official documents.
- Kubernetes documentation: Admission Control in Kubernetes (checked 2026-10-23)
- OPA Gatekeeper documentation (checked 2026-10-23)
- Kyverno documentation: Introduction (checked 2026-10-23)
- Falco documentation (checked 2026-10-23)