NEW
Font size
WorksheetsWeek 4 - test K8s - PArt 2
Total questions: 40
Worksheet time: 20mins
What does a Role define in Kubernetes RBAC?
Permissions within a namespace
Permissions cluster-wide
Node-specific configurations
Pod-specific annotations
Which command creates a ConfigMap from a file?
kubectl create configmap myconfig --from-file=config.txt
kubectl apply configmap myconfig --from-file=config.txt
kubectl set configmap myconfig --from-file=config.txt
kubectl add configmap myconfig --from-file=config.txt
What is the primary function of an Ingress Controller in Kubernetes?
To expose services externally using DNS
To manage internal DNS records
To manage storage volumes
To monitor cluster health
How can DNS be used in Kubernetes?
To assign IP addresses to Pods
To resolve service names to IP addresses
To provide persistent storage
To manage user authentication
What is the primary purpose of Network Policies in Kubernetes?
To manage storage quotas
To define how Pods communicate with each other and with other network endpoints
To configure service discovery
To manage CPU and memory limits
Which Kubernetes resource can be used to create a custom API extension?
ConfigMap
CustomResourceDefinition (CRD)
PersistentVolumeClaim
ReplicaSet
Which storage type allows multiple nodes to share the same data?
EmptyDir
HostPath
NFS (Network File System)
ConfigMap
What is the role of NTP servers in a Kubernetes cluster?
To provide DNS resolution
To synchronize the time across all nodes
To manage network traffic
To provision storage
Which command is used to set up a multi-node Kubernetes cluster with kubeadm?
kubeadm init
kubeadm join
kubeadm setup
kubeadm connect
How do StatefulSets differ from Deployments in Kubernetes?
StatefulSets provide stable, unique network identities for Pods
StatefulSets do not support persistent storage
Deployments are used for stateful applications
StatefulSets cannot scale Pods
What is a headless Service in Kubernetes?
A Service that lacks a ClusterIP
A Service that cannot be scaled
A Service that does not use DNS
A Service without any associated Pods
Which networking plugin does Kubernetes commonly use to set up a cluster network?
CoreDNS
Flannel
NFS
Prometheus
What is the main role of CoreDNS in Kubernetes?
To provide load balancing
To act as the DNS server for the cluster
To manage network policies
To provision persistent volumes
Which command provides details about the current context in Kubernetes?
kubectl get context
kubectl config current-context
kubectl describe context
kubectl list context
What is the function of Roles in Kubernetes?
To provide network isolation
To manage user permissions within a namespace
To set resource quotas
To manage Pod replicas
Which resource defines cluster-wide permissions in Kubernetes?
Role
RoleBinding
ClusterRole
ClusterRoleBinding
What does Node Selector do in Kubernetes?
Assigns Pods to specific nodes
Balances network traffic
Manages persistent storage
Configures network policies
How does Node Affinity differ from Node Selector in Kubernetes?
Node Affinity uses labels, Node Selector does not
Node Affinity allows soft rules, Node Selector is strict
Node Affinity manages storage, Node Selector manages network
Node Affinity is used for scaling, Node Selector is not
What is the primary function of a DaemonSet in Kubernetes?
To run a copy of a Pod on all (or some) nodes
To manage service accounts
To provide persistent storage
To configure network policies
Which package manager is commonly used for managing Kubernetes applications?
apt
Helm
yum
brew
What is a Helm Chart in Kubernetes?
A blueprint for deploying an application
A list of nodes and their statuses
A set of network policies
A configuration for persistent storage
What is CoreDNS primarily used for in Kubernetes?
Load balancing
Service discovery
Network policy management
Persistent storage provisioning
Which networking plugin is an alternative to Flannel in Kubernetes?
Weave
CoreDNS
Prometheus
etcd
What is a primary use of Network Policies in Kubernetes?
To manage DNS records
To control traffic between Pods
To scale Deployments
To manage storage volumes
How does a StatefulSet differ from a regular Deployment in terms of service types?
StatefulSets typically use Headless Services
Deployments cannot use Headless Services
StatefulSets do not require any Service
Deployments require ClusterIP Services
What is a PersistentVolume template used for in Kubernetes?
To define network policies
To create Pods with predefined storage
To manage service accounts
To dynamically provision storage
Which container runtime interface is an alternative to Docker in Kubernetes?
CRI-O
Containerd
Rocket
Docker Engine
What is Podman used for in relation to Kubernetes?
Managing Pods and containers
Configuring DNS
Managing network policies
Monitoring cluster health
What is the primary function of a Job in Kubernetes?
To run batch tasks to completion
To manage long-running services
To provide persistent storage
To configure network policies
What differentiates a CronJob from a regular Job in Kubernetes?
CronJob is scheduled to run periodically
CronJob runs continuously
CronJob requires a PersistentVolume
CronJob manages network policies
What is etcd used for in Kubernetes?
To store all cluster data
To manage container runtime
To provide DNS resolution
To enforce network policies
Which field in a PodSpec would you use to set a restart policy?
restartPolicy
lifecycle
scheduling
restart
What type of restart policy would you use for a web server that should always be running?
OnFailure
Never
Always
IfNotPresent
Which Kubernetes resource is most suitable for running stateless web servers?
Deployment
StatefulSet
PersistentVolume
CronJob
Which Kubernetes object is typically used for batch processing jobs?
Job
Deployment
Service
ConfigMap
What is the primary purpose of a PersistentVolumeClaim in Kubernetes?
To request storage resources
To define network policies
To create Pods
To manage user authentication
Which tool is used for monitoring Kubernetes clusters and alerting based on metrics?
Prometheus
Helm
kubeadm
Podman
What is the function of a ServiceAccount in Kubernetes?
To provide an identity for processes running in a Pod
To manage persistent storage
To define network policies
To create and delete Pods
How does a ClusterRole differ from a Role in Kubernetes?
ClusterRole provides permissions across the entire cluster
ClusterRole is used only for Pod management
ClusterRole cannot be bound to a ServiceAccount
ClusterRole is specific to a single namespace
What is a Pod Security Policy in Kubernetes?
A configuration for Pod networking
A resource that defines security controls for Pods
A method for managing user permissions
A tool for monitoring Pod performance
