CKS Kubernetes System Hardening Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Attempts: 11 | Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. Pod Security Policies are enforced at which stage?

Explanation

Pod Security Policies are checked by the Kubernetes API server during admission, when a pod is submitted and before it is stored or started. The admission controller compares the pod’s security settings with the applicable policy and allows or rejects the request. Scheduling occurs only after the pod passes admission.

Submit
Please wait...
About This Quiz
CKS Kubernetes System Hardening Quiz - Quiz

This quiz evaluates your understanding of Kubernetes system hardening techniques essential for the CKS certification. It covers pod security policies, network policies, RBAC configuration, container runtime security, and secure API server setup. Master these core security practices to protect Kubernetes clusters from unauthorized access and malicious workloads.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which RBAC component specifies what actions are allowed on resources?

Explanation

In Kubernetes RBAC, a Role defines permissions for resources within a namespace, while a ClusterRole defines permissions cluster-wide or reusable across namespaces. Their rules specify which API groups, resource types, and verbs—such as get, create, or delete—are permitted. Bindings connect these permission sets to users, groups, or ServiceAccounts; they do not define the actions themselves.

Submit

3. How can you verify that a pod is using AppArmor?

Explanation

To verify AppArmor usage, inspect the Pod’s annotations for `container.apparmor.security.beta.kubernetes.io/`. Its value identifies the profile applied to that container, such as `runtime/default` or `localhost/my-profile`. Security context, NetworkPolicy, and RBAC settings do not confirm which AppArmor profile is in use.

Submit

4. What does the --insecure-port flag do on the API server?

Explanation

The `--insecure-port` flag makes the API server listen on an HTTP port without TLS or authentication, allowing requests without credentials. Because traffic is unencrypted and access checks are bypassed, this endpoint can expose the cluster to serious security risks and should generally be disabled.

Submit

5. Which admission controller enforces Pod Security Policies?

Explanation

The PodSecurityPolicy admission controller evaluates Pod creation and update requests against the applicable PodSecurityPolicy. It enforces the policy’s security requirements, such as allowed privilege levels, capabilities, and volume types, and rejects Pods that do not comply.

Submit

6. What is the purpose of audit logging in Kubernetes?

Explanation

Kubernetes audit logging records requests made to the API server, including who made them, what actions were performed, and when they occurred. These records help administrators review cluster activity, investigate security incidents, and demonstrate compliance with policies and regulations. It is not intended for monitoring pod performance or managing images and network policies.

Submit

7. How do you restrict a pod to specific Linux capabilities?

Explanation

Set the container’s `securityContext.capabilities` field to specify which Linux capabilities it may receive, and use `drop` to remove capabilities it should not have. A common least-privilege approach is to drop all capabilities, then add only those required. AppArmor profiles, resource limits, and NetworkPolicies do not directly control Linux capabilities.

Submit

8. What is the default authorization mode if not specified on the API server?

Explanation

When the API server starts without an explicit `--authorization-mode`, Kubernetes uses `AlwaysAllow` by default. This authorizer approves every authorization request, so it does not enforce role-based or other access policies. Authentication occurs separately; authorization determines whether an identity may perform the requested operation on a particular resource.

Submit

9. Which setting in a Pod spec prevents privilege escalation?

Explanation

Setting `allowPrivilegeEscalation: false` prevents processes in the container from gaining more privileges than their parent process, such as through setuid or setgid executables. The other settings address different security controls: privileged mode, running as a non-root user, and filesystem write access.

Submit

10. What does the --kubelet-certificate-authority flag configure?

Explanation

The `--kubelet-certificate-authority` flag specifies the certificate authority file used to verify the TLS certificates presented by kubelets. This lets the Kubernetes API server confirm that it is connecting to a trusted kubelet when communicating with it.

Submit

11. Which Kubernetes resource defines rules for network traffic between pods?

Explanation

A NetworkPolicy controls how pods communicate over the network. It can define rules for incoming and outgoing traffic, using pod and namespace selectors to specify which connections are allowed.

Submit

12. Which Kubernetes feature controls what system calls containers can make?

Explanation

Seccomp (secure computing mode) restricts the system calls a container can make by applying a filter enforced by the Linux kernel. Kubernetes can use seccomp profiles to allow or block specific calls, reducing the container’s attack surface. SELinux and AppArmor enforce other security policies, while NetworkPolicy controls network traffic.

Submit

13. What is the purpose of the --authorization-mode flag on the API server?

Explanation

The `--authorization-mode` flag specifies which authorization mechanisms the API server uses to decide whether an authenticated user or process is allowed to perform a requested action. Examples include `RBAC`, `Node`, and `Webhook`.

Submit

14. How can you enforce that pods use read-only root filesystems?

Submit

15. What does a ClusterRole define in Kubernetes RBAC?

Explanation

A ClusterRole specifies a set of permissions that can apply across the Kubernetes cluster, including access to cluster-scoped resources and resources in multiple namespaces. A Role, by contrast, is limited to a single namespace. A ClusterRole grants permissions only when it is attached to a user, group, or service account through a binding.

Submit

16. Which setting prevents containers from running as root?

Explanation

Setting `runAsNonRoot: true` in a container or pod’s `securityContext` tells Kubernetes to prevent the container process from running with UID 0. If the image would run as root, Kubernetes rejects the container at startup. This differs from disabling privileged mode or making the root filesystem read-only, neither of which directly prevents root execution.

Submit

17. What is AppArmor in Kubernetes security context?

Explanation

AppArmor is a Linux security module that enforces mandatory access control by restricting what programs can access and do. In Kubernetes, you can apply AppArmor profiles to containers to limit their capabilities and reduce the impact of a compromised workload.

Submit

18. Which kubelet flag disables anonymous access?

Explanation

The `--anonymous-auth` flag controls whether the kubelet accepts unauthenticated requests. Setting it to `false` disables anonymous access, requiring requests to use an authenticated method.

Submit

19. In RBAC, what does a RoleBinding do?

Explanation

A RoleBinding assigns the permissions defined in a Role to specific users, groups, or service accounts within a namespace. It grants access without creating or changing the Role itself.

Submit

20. What is the primary purpose of Pod Security Policies (PSP)?

Explanation

Pod Security Policies were designed to control which security settings pods may use when they are created, such as privilege levels, volume types, and access to host resources. This helps prevent pods from running with unsafe configurations.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Pod Security Policies are enforced at which stage?
Which RBAC component specifies what actions are allowed on resources?
How can you verify that a pod is using AppArmor?
What does the --insecure-port flag do on the API server?
Which admission controller enforces Pod Security Policies?
What is the purpose of audit logging in Kubernetes?
How do you restrict a pod to specific Linux capabilities?
What is the default authorization mode if not specified on the API...
Which setting in a Pod spec prevents privilege escalation?
What does the --kubelet-certificate-authority flag configure?
Which Kubernetes resource defines rules for network traffic between...
Which Kubernetes feature controls what system calls containers can...
What is the purpose of the --authorization-mode flag on the API...
How can you enforce that pods use read-only root filesystems?
What does a ClusterRole define in Kubernetes RBAC?
Which setting prevents containers from running as root?
What is AppArmor in Kubernetes security context?
Which kubelet flag disables anonymous access?
In RBAC, what does a RoleBinding do?
What is the primary purpose of Pod Security Policies (PSP)?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!