QuizzesIntroduction to Kubernetes Pod Security Policies
beginner
kubernetes

Introduction to Kubernetes Pod Security Policies

A beginner-level quiz to understand the basics of Kubernetes Pod Security Policies.

15 minutes 15 questions Pass at 70%
Time Limit
15 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

15 questions on Introduction to Kubernetes Pod Security Policies. Work through them here, then start the quiz to answer them and see your score.

  1. 1.What is the primary purpose of Kubernetes Pod Security Policies?

    • ATo scale pods automatically
    • BTo manage network traffic between pods
    • CTo enforce security constraints on pods
    • DTo monitor pod performance
  2. 2.Which Kubernetes resource is used to define Pod Security Policies?

    • AService
    • BIngress
    • CPodSecurityPolicy
    • DConfigMap
  3. 3.What happens if a pod does not meet the requirements of a Pod Security Policy?

    • AThe pod is automatically deleted
    • BThe pod is scheduled but paused
    • CThe pod is scheduled with a warning
    • DThe pod is denied from being scheduled
  4. 4.Which of the following is NOT a field in a Pod Security Policy?

    • Aspec.runAsUser
    • Bspec.volumes
    • Cspec.hostNetwork
    • Dspec.cpuLimit
  5. 5.How can you apply a Pod Security Policy to a specific namespace?

    • ABy using a ConfigMap
    • BBy using a Role and RoleBinding
    • CBy modifying the pod's YAML file
    • DBy editing the kube-apiserver
  6. 6.Which of the following can a Pod Security Policy restrict?

    • AThe number of replicas
    • BThe pod's restart policy
    • CThe use of hostPath volumes
    • DThe pod's image version
  7. 7.What is required to enable Pod Security Policies in a Kubernetes cluster?

    • AA custom scheduler
    • BA specific node label
    • CEnabling the PodSecurityPolicy admission controller
    • DA network plugin
  8. 8.Which command can be used to list all Pod Security Policies in a cluster?

    • Akubectl describe psp
    • Bkubectl get psp
    • Ckubectl show psp
    • Dkubectl list psp
  9. 9.What does the 'spec.privileged' field in a Pod Security Policy control?

    • AWhether a pod can use specific CPU resources
    • BWhether a pod can access external networks
    • CWhether a pod can run as a privileged container
    • DWhether a pod can use privileged ports
  10. 10.Which field in a Pod Security Policy specifies allowed volume types?

    • Aspec.allowedVolumes
    • Bspec.volumeTypes
    • Cspec.allowedVolumeTypes
    • Dspec.volumes
  11. 11.What does setting 'spec.runAsUser.rule' to 'MustRunAsNonRoot' ensure?

    • AThe pod must run as root
    • BThe pod must run as a specific user ID
    • CThe pod must run as a non-root user
    • DThe pod can run as any user
  12. 12.Which field in a Pod Security Policy can restrict the use of host networking?

    • Aspec.hostPorts
    • Bspec.hostNetwork
    • Cspec.networkPolicy
    • Dspec.hostPath
  13. 13.What is the default behavior if no Pod Security Policies are defined?

    • AAll pods are denied
    • BOnly non-root pods are allowed
    • CAll pods are allowed
    • DOnly privileged pods are allowed
  14. 14.Which of the following is NOT a valid Pod Security Policy rule?

    • AMustRunAsNonRoot
    • BMustRunAs
    • CRunAsAny
    • DMustRunAsRoot
  15. 15.How can you verify if a pod complies with a Pod Security Policy?

    • ABy using 'kubectl describe pod'
    • BBy reviewing the Pod Security Policy logs
    • CBy using 'kubectl auth can-i'
    • DBy checking the pod's logs