CKS Kubernetes Cluster 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
| Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. Which etcd encryption algorithm is recommended for production Kubernetes clusters?

Explanation

AES-CBC (`aescbc`) is an encryption provider supported by Kubernetes for protecting etcd data at rest. It uses a secret key to encrypt stored resources such as Secrets. MD5 and SHA-256 are hash algorithms, not encryption methods, while Base64 is merely an encoding and provides no confidentiality. Use a strong, randomly generated key and manage it securely.

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

This quiz assesses your knowledge of Kubernetes cluster hardening techniques and security best practices required for the CKS certification. It covers RBAC, network policies, pod security, admission controllers, and vulnerability management. Ideal for security professionals preparing for advanced Kubernetes security roles.

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. What is the recommended approach for scanning container images in a CI/CD pipeline?

Explanation

Scanning images before pushing them to the registry helps detect vulnerable dependencies early, preventing insecure images from entering the deployment pipeline. This enables teams to fix issues before release and consistently enforce security policies.

Submit

3. Which tool is used to manage Kubernetes secrets encryption at rest?

Explanation

The kms-plugin integrates Kubernetes’ API server with an external key management system to encrypt secret data before it is stored in etcd. It supports envelope encryption, keeping key operations and potentially key material under the external KMS’s control. This helps protect secrets if the etcd datastore is accessed without authorization.

Submit

4. What is the purpose of a ClusterRole compared to a Role?

Explanation

A Role defines permissions within a specific namespace, while a ClusterRole can define permissions across the entire cluster, including resources that are not namespaced. This makes ClusterRole useful when access needs to span multiple namespaces or apply to cluster-wide resources.

Submit

5. Which SecurityContext field prevents privilege escalation in a pod?

Explanation

Setting `allowPrivilegeEscalation: false` prevents a process in the container from gaining more privileges than its parent process, such as through setuid or setgid binaries. This limits privilege escalation within the pod.

Submit

6. What command secures the kubelet API server with TLS?

Explanation

The `--tls-cert-file` and `--tls-private-key-file` flags provide the kubelet with its TLS certificate and matching private key. Together, they enable the kubelet API server to authenticate itself and establish encrypted connections.

Submit

7. Which admission controller validates resource requests against namespace quotas?

Explanation

The ResourceQuota admission controller checks whether a new or updated resource request fits within the limits configured for its namespace. If the request would exceed a quota, Kubernetes rejects it. LimitRanger instead applies or validates per-resource defaults and constraints.

Submit

8. What is the main benefit of using a service account token over kubeconfig for pod authentication?

Explanation

Service account tokens are designed for workloads running inside Kubernetes. They can be automatically rotated, reducing the risk of relying on credentials that remain valid indefinitely. Permissions can also be granted through RBAC and limited to the workload’s namespace, helping restrict what a pod can access compared with using a kubeconfig credential.

Submit

9. Which kubectl command lists all RBAC roles in a namespace?

Explanation

Run `kubectl get roles` to list Role resources in the current namespace. To check a different namespace, add `-n `. This command lists namespaced Roles; ClusterRoles are cluster-scoped and can be listed separately with `kubectl get clusterroles`.

Submit

10. What does the 'restricted' Pod Security Standard enforce?

Explanation

The Restricted Pod Security Standard applies the strictest built-in controls to reduce container privileges. It requires non-root execution and restricts privilege escalation, capabilities, and other risky settings; clusters may also enforce read-only filesystems through additional policy. These measures limit the impact of a compromised pod.

Submit

11. Which Kubernetes API group is used to define Role and RoleBinding objects?

Explanation

Role and RoleBinding objects belong to Kubernetes’ Role-Based Access Control (RBAC) API group, `rbac.authorization.k8s.io`. This group provides resources for defining permissions within a namespace and binding those permissions to users, groups, or service accounts.

Submit

12. What is the purpose of the NodeRestriction admission controller?

Explanation

The NodeRestriction admission controller limits what kubelets can change in the Kubernetes API. It prevents a node from modifying its own protected labels and taints, helping stop a compromised node from influencing scheduling or impersonating another node.

Submit

13. Which Kubernetes object defines permissions for a specific user or service account?

Explanation

A RoleBinding grants a user, group, or service account the permissions defined by a Role within a specific namespace. It connects the subject to the Role, allowing Kubernetes to determine which actions that identity may perform on namespace resources.

Submit

14. Pod Security Standards (PSS) replaced which deprecated feature?

Explanation

PodSecurityPolicy (PSP) was deprecated and removed from Kubernetes in version 1.25. Pod Security Standards (PSS) provide a replacement framework of security profiles—Privileged, Baseline, and Restricted—while Pod Security Admission (PSA) applies those standards to pods. NetworkPolicy, ServiceAccount, and ClusterRole serve different purposes and were not replaced by PSS.

Submit

15. Which API server flag enables audit logging in Kubernetes?

Explanation

The `--audit-log-path` flag configures the Kubernetes API server to write audit events to a specified file, enabling the log-file audit backend. Audit events record relevant requests and actions for security review and troubleshooting; an audit policy can further control which events are recorded.

Submit

16. What is the default service account used by pods in a namespace?

Explanation

Kubernetes automatically assigns the `default` service account to pods in a namespace when no other service account is specified. Its permissions depend on the roles and bindings configured for that account in the namespace.

Submit

17. Which tool is used to scan container images for known vulnerabilities?

Explanation

Trivy scans container images and other software artifacts for known vulnerabilities by checking their components against vulnerability databases. It helps teams identify security risks before deploying images.

Submit

18. What does RBAC stand for in Kubernetes?

Explanation

RBAC stands for Role-Based Access Control. In Kubernetes, it manages permissions by assigning roles to users or service accounts, limiting what resources they can access and what actions they can perform.

Submit

19. Which admission controller prevents pods from running as root?

Explanation

PodSecurityPolicy validates pod specifications against security rules before they are admitted to the cluster. It can require containers to run as non-root users, preventing pods configured to run as root from being created.

Submit

20. What is the primary purpose of a NetworkPolicy in Kubernetes?

Explanation

A NetworkPolicy controls how pods communicate with other pods and external endpoints by defining allowed network traffic. It provides network-layer access rules within a Kubernetes cluster, rather than handling encryption, resource allocation, or pod scheduling.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which etcd encryption algorithm is recommended for production...
What is the recommended approach for scanning container images in a...
Which tool is used to manage Kubernetes secrets encryption at rest?
What is the purpose of a ClusterRole compared to a Role?
Which SecurityContext field prevents privilege escalation in a pod?
What command secures the kubelet API server with TLS?
Which admission controller validates resource requests against...
What is the main benefit of using a service account token over...
Which kubectl command lists all RBAC roles in a namespace?
What does the 'restricted' Pod Security Standard enforce?
Which Kubernetes API group is used to define Role and RoleBinding...
What is the purpose of the NodeRestriction admission controller?
Which Kubernetes object defines permissions for a specific user or...
Pod Security Standards (PSS) replaced which deprecated feature?
Which API server flag enables audit logging in Kubernetes?
What is the default service account used by pods in a namespace?
Which tool is used to scan container images for known vulnerabilities?
What does RBAC stand for in Kubernetes?
Which admission controller prevents pods from running as root?
What is the primary purpose of a NetworkPolicy in Kubernetes?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!