KCSA Kubernetes Network Security 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 15, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. Which of these is NOT a best practice for Kubernetes network security?

Explanation

Allowing unrestricted communication between all pods increases the risk of lateral movement if a pod is compromised. Network policies should limit traffic to only necessary connections, while mutual TLS and encryption help protect service-to-service communication.

Submit
Please wait...
About This Quiz
Kcsa Kubernetes Network Security Quiz - Quiz

This quiz evaluates your understanding of network security principles in Kubernetes and cloud-native environments. You will be tested on network policies, service mesh security, ingress controls, and secure communication between containers and microservices. Ideal for professionals preparing for the KCSA certification or advancing their cloud-native security expertise.

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 does the 'allowPrivilegeEscalation' field control in a security context?

Explanation

The `allowPrivilegeEscalation` field determines whether a process inside a container can gain more privileges than its parent process, such as by using setuid binaries. Disabling it helps limit privilege escalation within the container; it does not control node access, external service exposure, or volume permissions.

Submit

3. How can you restrict a container from running as root in Kubernetes?

Explanation

Setting `runAsNonRoot: true` in a pod or container’s security context instructs Kubernetes to prevent the container from starting if it would run as the root user. This helps enforce least privilege and reduces the impact of a compromised container.

Submit

4. What is the purpose of a security context in Kubernetes?

Explanation

A Kubernetes security context specifies privilege and access-control settings for a pod or container, such as the user and group it runs as, Linux capabilities, and whether it may run as root. These settings help limit permissions and reduce security risks.

Submit

5. Which tool is commonly used to scan container images for vulnerabilities?

Explanation

Trivy and Clair analyze container image layers, packages, and dependencies, comparing them with vulnerability databases to identify known security issues. Teams can use their reports to update vulnerable components or block risky images before deployment. Kubelet manages nodes, etcd stores cluster data, and CoreDNS provides DNS services; these tools do not primarily scan images.

Submit

6. In Kubernetes, what does the 'default' service account provide?

Explanation

The `default` service account is automatically available to pods in each namespace. It provides a basic identity that pods can use when communicating with the Kubernetes API, subject to the permissions assigned to that account in the namespace. It does not grant administrative or cluster-wide access by default.

Submit

7. What is the primary advantage of using a service mesh for security?

Explanation

A service mesh can transparently encrypt traffic between services, often using mutual TLS, without requiring developers to modify application code. This helps protect data in transit and centralizes security configuration. It complements rather than replaces access controls, network policies, or encryption for stored data.

Submit

8. Which Kubernetes secret type is used for storing TLS certificates?

Explanation

Kubernetes uses the `kubernetes.io/tls` Secret type to store a TLS certificate and its associated private key, typically in the `tls.crt` and `tls.key` fields. These Secrets can then be referenced by resources such as Ingresses to enable encrypted connections.

Submit

9. How do you specify egress rules in a Kubernetes NetworkPolicy?

Explanation

In a Kubernetes NetworkPolicy, egress rules are defined under the `egress` field. Each rule can specify permitted destinations, such as IP address ranges or selected pods, and optionally restrict traffic by port and protocol. The policy must also include `Egress` in `policyTypes` to enforce those rules.

Submit

10. What does mTLS stand for in the context of service mesh security?

Explanation

In a service mesh, mTLS means both communicating services authenticate each other using certificates. It also encrypts traffic between them, helping prevent unauthorized connections and protect data in transit.

Submit

11. What is the primary purpose of a Kubernetes NetworkPolicy?

Explanation

A Kubernetes NetworkPolicy defines which network traffic is allowed to enter or leave selected pods. It uses pod and namespace labels, along with rules such as permitted ports and traffic directions, to enforce communication boundaries. This helps restrict access between workloads; IP allocation, encryption, and routing external traffic are handled by other Kubernetes components or tools.

Submit

12. What is the function of a Pod Security Policy (deprecated in favor of Pod Security Standards)?

Explanation

A Pod Security Policy defined the security settings pods were allowed to use, such as whether they could run as privileged or access host resources. The Kubernetes API server used these rules to admit or reject pod creation requests. PSPs are deprecated; Pod Security Standards and admission controls are their modern replacement.

Submit

13. In Kubernetes, which component authenticates and authorizes API requests?

Explanation

The API Server is the central entry point for Kubernetes control-plane operations. It authenticates incoming requests to verify the caller’s identity and authorizes them by checking whether they have permission to perform the requested action.

Submit

14. What does RBAC stand for in Kubernetes security?

Explanation

RBAC stands for Role-Based Access Control. In Kubernetes, it manages access to resources by assigning users or service accounts roles that specify permitted actions, such as viewing or modifying pods. This helps administrators grant only the permissions each identity needs.

Submit

15. Which CNI plugin provides native network policy support in Kubernetes?

Explanation

Calico implements Kubernetes NetworkPolicy through its policy engine and dataplane. It lets administrators control ingress and egress traffic between pods using rules based on factors such as pod labels, namespaces, and ports, enabling network segmentation within a cluster.

Submit

16. What is the scope of a NetworkPolicy when no namespace selector is specified?

Explanation

A NetworkPolicy is a namespaced resource, so it only selects and governs pods in the namespace where it is created. It does not apply cluster-wide or to pods in other namespaces.

Submit

17. Which protocol is commonly used for secure communication between Kubernetes components?

Explanation

TLS/SSL is commonly used to secure communication between Kubernetes components. It encrypts data in transit and helps verify the identities of communicating services, protecting against eavesdropping and tampering. HTTP alone is unencrypted, SSH is primarily for remote access, and SNMP is used for network monitoring.

Submit

18. What does a service mesh like Istio primarily provide for security?

Explanation

Istio secures communication between services by encrypting traffic in transit and using mutual TLS to authenticate both communicating workloads. This helps prevent eavesdropping and impersonation while enabling services to verify each other’s identities. Node firewalls, persistent-volume encryption, and API server authentication are generally handled by other Kubernetes or infrastructure security controls.

Submit

19. In a default Kubernetes cluster without NetworkPolicies, what is the default traffic behavior?

Explanation

Without NetworkPolicies, Kubernetes does not restrict pod-to-pod traffic by default. Pods can communicate with one another across namespaces, subject to any separate network or infrastructure-level controls.

Submit

20. Which Kubernetes object defines how external traffic reaches services?

Explanation

Ingress is a Kubernetes API object that defines rules for routing external HTTP or HTTPS traffic to cluster Services, often using hostnames and URL paths. An Ingress controller implements those rules and may provide TLS termination. Unlike a Service, Ingress configures application-level entry points rather than directly exposing each service.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of these is NOT a best practice for Kubernetes network security?
What does the 'allowPrivilegeEscalation' field control in a security...
How can you restrict a container from running as root in Kubernetes?
What is the purpose of a security context in Kubernetes?
Which tool is commonly used to scan container images for...
In Kubernetes, what does the 'default' service account provide?
What is the primary advantage of using a service mesh for security?
Which Kubernetes secret type is used for storing TLS certificates?
How do you specify egress rules in a Kubernetes NetworkPolicy?
What does mTLS stand for in the context of service mesh security?
What is the primary purpose of a Kubernetes NetworkPolicy?
What is the function of a Pod Security Policy (deprecated in favor of...
In Kubernetes, which component authenticates and authorizes API...
What does RBAC stand for in Kubernetes security?
Which CNI plugin provides native network policy support in Kubernetes?
What is the scope of a NetworkPolicy when no namespace selector is...
Which protocol is commonly used for secure communication between...
What does a service mesh like Istio primarily provide for security?
In a default Kubernetes cluster without NetworkPolicies, what is the...
Which Kubernetes object defines how external traffic reaches services?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!