Courseiva

CKS · topic practice

Cluster Hardening practice questions

Cluster Hardening covers the controls that keep a Kubernetes cluster's own components and API surface resistant to compromise. For the CKS exam you work hands-on inside a live cluster: restricting API access, tightening RBAC, protecting kubelet endpoints, and upgrading components safely. Tasks are performance-based, so you must know the exact kubectl, kubeadm and systemd commands and apply them under time pressure.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Cluster Hardening

What the exam tests

What to know about Cluster Hardening

Use kubectl auth can-i, RBAC RoleBindings, and kubelet --anonymous-auth=false to lock down API and node access. Get RBAC least privilege right, then upgrade control plane components with kubeadm upgrade.

Minimising RBAC permissions by removing wildcards, cluster-admin bindings and unnecessary default ServiceAccount rights

Securing the kubelet API with authentication, authorization and read-only port disabled via kubelet config

Restricting API server access using anonymous-auth, authorization modes and network exposure controls

Performing safe cluster upgrades with kubeadm upgrade plan, apply and node drain/uncordon sequencing

Watch out for

Common Cluster Hardening exam traps

  • ▸Leaving the kubelet read-only port 10255 open, or not disabling anonymous authentication on kubelet endpoints
  • ▸Granting cluster-admin or wildcard verbs in Role/ClusterRole instead of least-privilege rules scoped to resources
  • ▸Upgrading worker nodes before the control plane, or skipping kubeadm upgrade plan and etcd backups

Practice set

Cluster Hardening questions

20 questions · select your answer, then reveal the explanation

You are reducing the attack surface of the kube-apiserver on a kubeadm cluster. The security team wants to disable anonymous authentication and restrict which users can be impersonated. Which TWO actions achieve these goals? (Choose two.)

A security team wants to ensure that all pods in a namespace run with a restricted seccomp profile. Which Pod Security Standard admission controller mode should be used to enforce this without blocking necessary pods?

A cluster uses RBAC and a ServiceAccount 'monitor' in namespace 'observability'. The account needs to list pods in all namespaces. Which ClusterRole and binding should be created?

An administrator wants to prevent pods from running as root. Which SecurityContext field should be set at the pod level?

A company uses kube-bench to scan their cluster. The report shows a warning: 'Ensure that the --authorization-mode argument is set to Node,RBAC'. What is the best way to fix this?

A pod is failing to start with: 'Error: container has runAsNonRoot and image will run as root'. The pod spec sets securityContext.runAsNonRoot: true. The container image is 'nginx:latest' which runs as root. Which change allows the pod to run while maintaining security?

Which Kubernetes resource should be used to restrict egress traffic from pods?

A developer created a ClusterRole 'pod-reader' with rules to get, list, and watch pods, and bound it to a user. The user reports they cannot list pods in namespace 'test', although the same commands work in the 'default' namespace. What is the most likely cause?

A cluster has a PodSecurityPolicy that requires 'RunAsAny' for the user. An administrator wants to enforce that all pods in namespace 'production' must run with a specific seccomp profile. Which approach is recommended given PSP is deprecated?

Which TWO of the following are valid ways to restrict access to the Kubernetes API server?

Which THREE of the following are required to secure etcd in a Kubernetes cluster?

Which TWO of the following are best practices for securing container images?

Which THREE of the following are valid methods to enforce pod security standards in a Kubernetes cluster?

You are the security engineer for a multi-tenant Kubernetes cluster. The cluster uses kubeadm and runs Kubernetes v1.24. Each tenant has a dedicated namespace. A new tenant, 'acme-corp', requires that all pods in their namespace run with a read-only root filesystem and must not be able to escalate privileges. They also need to run a legacy container that must listen on a port below 1024. The cluster currently uses PodSecurityPolicy (PSP) but is planning to migrate to Pod Security Admission (PSA). The legacy container needs to run as non-root with the NET_BIND_SERVICE capability to bind to port 80. You need to configure security policies for the 'acme-corp' namespace without affecting other tenants. Which approach best meets these requirements while following Kubernetes best practices?

Arrange the steps to enable and configure audit logging in Kubernetes.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Match each Kubernetes security tool or feature to its purpose.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Checks whether Kubernetes is deployed securely according to CIS benchmarks

Penetration testing tool for Kubernetes clusters

Policy engine for enforcing custom policies on Kubernetes resources

Runtime security monitoring tool that detects abnormal behavior

Vulnerability scanner for container images, filesystems, and Git repos

Question 17mediummultiple choice
Read the full Cluster Hardening explanation →

A security team is hardening a cluster where the kube-apiserver is started with the flag --authorization-mode=Node,RBAC. A penetration test reveals that kubelet authentication is using anonymous requests and the webhook authorizer is not enabled. To ensure that kubelet API requests are authenticated and authorized, which combination of kubelet configuration changes should be applied?

A Kubernetes administrator is reviewing the cluster's RBAC configuration and notices that a ClusterRoleBinding grants the cluster-admin role to the system:anonymous user. What is the most immediate and appropriate action to harden the cluster?

Question 19mediummultiple choice
Read the full Cluster Hardening explanation →

You are hardening a kubeadm-managed cluster running Kubernetes v1.28. The kubelet's read-only port (10255) is still listening on every node, exposing pod and node metadata without authentication. You must disable it across the cluster. Which action is correct?

Question 20mediummultiple choice
Read the full Cluster Hardening explanation →

A security review flags that developers can create pods that mount the host's /etc directory. You need to block hostPath volumes cluster-wide without breaking existing workloads that use the CSI driver for persistent storage. Which control is appropriate?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Cluster Hardening sessions

Start a Cluster Hardening only practice session

Every question in these sessions is drawn from the Cluster Hardening domain — nothing else.

Related practice questions

Related CKS topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the CKS exam test about Cluster Hardening?
Use kubectl auth can-i, RBAC RoleBindings, and kubelet --anonymous-auth=false to lock down API and node access. Get RBAC least privilege right, then upgrade control plane components with kubeadm upgrade.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Cluster Hardening questions in a focused session?
Yes — the session launcher on this page draws every question from the Cluster Hardening domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other CKS topics?
Use the topic links above to move to related areas, or go back to the CKS question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the CKS exam covers. They are not copied from any real exam or dump site.