wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Week 4 - test K8s - PArt 2

Total questions: 40

Worksheet time: 20mins

Name
Class
Date
1.

What does a Role define in Kubernetes RBAC?

a)

Permissions within a namespace

b)

Permissions cluster-wide

c)

Node-specific configurations

d)
  • Pod-specific annotations

2.

Which command creates a ConfigMap from a file?

a)

kubectl create configmap myconfig --from-file=config.txt

b)

kubectl apply configmap myconfig --from-file=config.txt

c)

kubectl set configmap myconfig --from-file=config.txt

d)

kubectl add configmap myconfig --from-file=config.txt

3.

What is the primary function of an Ingress Controller in Kubernetes?

a)

To expose services externally using DNS

b)

To manage internal DNS records

c)

To manage storage volumes

d)

To monitor cluster health

4.

How can DNS be used in Kubernetes?

a)

To assign IP addresses to Pods

b)

To resolve service names to IP addresses

c)

To provide persistent storage

d)

To manage user authentication

5.

What is the primary purpose of Network Policies in Kubernetes?

a)

To manage storage quotas

b)

To define how Pods communicate with each other and with other network endpoints

c)

To configure service discovery

d)

To manage CPU and memory limits

6.

Which Kubernetes resource can be used to create a custom API extension?

a)

ConfigMap

b)

CustomResourceDefinition (CRD)

c)

PersistentVolumeClaim

d)

ReplicaSet

7.

Which storage type allows multiple nodes to share the same data?

a)

EmptyDir

b)

HostPath

c)

NFS (Network File System)

d)

ConfigMap

8.

What is the role of NTP servers in a Kubernetes cluster?

a)

To provide DNS resolution

b)

To synchronize the time across all nodes

c)

To manage network traffic

d)

To provision storage

9.

Which command is used to set up a multi-node Kubernetes cluster with kubeadm?

a)

kubeadm init

b)

kubeadm join

c)

kubeadm setup

d)

kubeadm connect

10.

How do StatefulSets differ from Deployments in Kubernetes?

a)

StatefulSets provide stable, unique network identities for Pods

b)

StatefulSets do not support persistent storage

c)

Deployments are used for stateful applications

d)

StatefulSets cannot scale Pods

11.

What is a headless Service in Kubernetes?


a)

A Service that lacks a ClusterIP

b)

A Service that cannot be scaled

c)

A Service that does not use DNS

d)

A Service without any associated Pods

12.

Which networking plugin does Kubernetes commonly use to set up a cluster network?

a)

CoreDNS

b)

Flannel

c)

NFS

d)

Prometheus

13.

What is the main role of CoreDNS in Kubernetes?

a)

To provide load balancing

b)

To act as the DNS server for the cluster

c)

To manage network policies

d)

To provision persistent volumes

14.

Which command provides details about the current context in Kubernetes?

a)

kubectl get context

b)

kubectl config current-context

c)

kubectl describe context

d)

kubectl list context

15.

What is the function of Roles in Kubernetes?

a)

To provide network isolation

b)

To manage user permissions within a namespace

c)

To set resource quotas

d)

To manage Pod replicas

16.

Which resource defines cluster-wide permissions in Kubernetes?

a)

Role

b)

RoleBinding

c)

ClusterRole

d)

ClusterRoleBinding

17.

What does Node Selector do in Kubernetes?

a)

Assigns Pods to specific nodes

b)

Balances network traffic

c)

Manages persistent storage

d)

Configures network policies

18.

How does Node Affinity differ from Node Selector in Kubernetes?

a)
  • Node Affinity uses labels, Node Selector does not

b)

Node Affinity allows soft rules, Node Selector is strict

c)

Node Affinity manages storage, Node Selector manages network

d)

Node Affinity is used for scaling, Node Selector is not

19.

What is the primary function of a DaemonSet in Kubernetes?

a)

To run a copy of a Pod on all (or some) nodes

b)

To manage service accounts

c)

To provide persistent storage

d)

To configure network policies

20.

Which package manager is commonly used for managing Kubernetes applications?

a)

apt

b)

Helm

c)

yum

d)

brew

21.

What is a Helm Chart in Kubernetes?

a)

A blueprint for deploying an application

b)

A list of nodes and their statuses

c)

A set of network policies

d)

A configuration for persistent storage

22.

What is CoreDNS primarily used for in Kubernetes?

a)
  • Load balancing

b)

Service discovery

c)

Network policy management

d)

Persistent storage provisioning

23.

Which networking plugin is an alternative to Flannel in Kubernetes?

a)

Weave

b)

CoreDNS

c)

Prometheus

d)

etcd

24.

What is a primary use of Network Policies in Kubernetes?

a)

To manage DNS records

b)

To control traffic between Pods

c)

To scale Deployments

d)

To manage storage volumes

25.

How does a StatefulSet differ from a regular Deployment in terms of service types?

a)

StatefulSets typically use Headless Services

b)

Deployments cannot use Headless Services

c)

StatefulSets do not require any Service

d)

Deployments require ClusterIP Services

26.

What is a PersistentVolume template used for in Kubernetes?

a)

To define network policies

b)

To create Pods with predefined storage

c)

To manage service accounts

d)

To dynamically provision storage

27.

Which container runtime interface is an alternative to Docker in Kubernetes?

a)

CRI-O

b)

Containerd

c)

Rocket

d)

Docker Engine

28.

What is Podman used for in relation to Kubernetes?

a)

Managing Pods and containers

b)

Configuring DNS

c)

Managing network policies

d)
  • Monitoring cluster health

29.

What is the primary function of a Job in Kubernetes?

a)

To run batch tasks to completion

b)

To manage long-running services

c)

To provide persistent storage

d)
  • To configure network policies

30.

What differentiates a CronJob from a regular Job in Kubernetes?

a)

CronJob is scheduled to run periodically

b)

CronJob runs continuously

c)

CronJob requires a PersistentVolume

d)

CronJob manages network policies

31.

What is etcd used for in Kubernetes?

a)

To store all cluster data

b)

To manage container runtime

c)

To provide DNS resolution

d)

To enforce network policies

32.

Which field in a PodSpec would you use to set a restart policy?

a)

restartPolicy

b)

lifecycle

c)

scheduling

d)

restart

33.

What type of restart policy would you use for a web server that should always be running?

a)

OnFailure

b)

Never

c)

Always

d)

IfNotPresent

34.

Which Kubernetes resource is most suitable for running stateless web servers?

a)

Deployment

b)

StatefulSet

c)

PersistentVolume

d)

CronJob

35.

Which Kubernetes object is typically used for batch processing jobs?

a)

Job

b)

Deployment

c)

Service

d)

ConfigMap

36.

What is the primary purpose of a PersistentVolumeClaim in Kubernetes?

a)

To request storage resources

b)

To define network policies

c)

To create Pods

d)

To manage user authentication

37.

Which tool is used for monitoring Kubernetes clusters and alerting based on metrics?

a)

Prometheus

b)

Helm

c)

kubeadm

d)

Podman

38.

What is the function of a ServiceAccount in Kubernetes?

a)

To provide an identity for processes running in a Pod

b)

To manage persistent storage

c)

To define network policies

d)

To create and delete Pods

39.

How does a ClusterRole differ from a Role in Kubernetes?

a)

ClusterRole provides permissions across the entire cluster

b)

ClusterRole is used only for Pod management

c)

ClusterRole cannot be bound to a ServiceAccount

d)

ClusterRole is specific to a single namespace

40.

What is a Pod Security Policy in Kubernetes?

a)

A configuration for Pod networking

b)

A resource that defines security controls for Pods

c)

A method for managing user permissions

d)

A tool for monitoring Pod performance