Kubernetes MCQ Banner

Kubernetes Multiple Choice Questions (MCQs) and Answers

Master Kubernetes with Practice MCQs. Explore our curated collection of Multiple Choice Questions. Ideal for placement and interview preparation, our questions range from basic to advanced, ensuring comprehensive coverage of Kubernetes concepts. Begin your placement preparation journey now!

Q91

Q91 Which component is commonly used for Kubernetes monitoring?

A

Prometheus

B

etcd

C

Kube-scheduler

D

Kube-proxy

Q92

Q92 What is the role of Fluentd in Kubernetes logging?

A

Collecting logs

B

Managing secrets

C

Scaling nodes

D

Assigning pods

Q93

Q93 What format are Kubernetes logs typically stored in?

A

JSON

B

XML

C

Plain text

D

YAML

Q94

Q94 How does Kubernetes ensure log rotation?

A

By default

B

By using log drivers

C

By using Fluentd

D

Manually configured

Q95

Q95 Which command retrieves logs from a specific pod?

A

kubectl get logs

B

kubectl logs

C

kubectl describe logs

D

kubectl retrieve logs

Q96

Q96 How do you stream live logs from a pod?

A

kubectl logs --tail

B

kubectl logs -f

C

kubectl get logs

D

kubectl follow logs

Q97

Q97 How do you specify the number of lines to retrieve from pod logs?

A

--limit

B

--tail

C

--lines

D

--fetch

Q98

Q98 A pod's logs are not visible using the 'kubectl logs' command. What might be the issue?

A

Log rotation

B

Pod not running

C

Container crashed

D

Missing permissions

Q99

Q99 Logs are missing from the monitoring dashboard. What could resolve this?

A

Check Fluentd config

B

Recreate pod

C

Restart cluster

D

Delete PVC

Q100

Q100 Metrics from a node are not visible. What could be the cause?

A

Node not labeled

B

Missing metrics-server

C

Taints on the node

D

Log rotation enabled

Q101

Q101 What is the purpose of Role-Based Access Control (RBAC) in Kubernetes?

A

To manage network policies

B

To assign permissions

C

To encrypt secrets

D

To schedule pods

Q102

Q102 How can you limit pod privileges in Kubernetes?

A

By using RBAC

B

By creating network policies

C

By using a PodSecurityPolicy

D

By setting node taints

Q103

Q103 What is the purpose of network policies in Kubernetes?

A

To monitor nodes

B

To control pod-to-pod communication

C

To enforce access control

D

To log traffic

Q104

Q104 How does Kubernetes ensure that Secrets are not exposed in plain text?

A

By using encryption

B

By using etcd

C

By using Base64 encoding

D

By using labels

Q105

Q105 Which Kubernetes component is responsible for certificate management?

A

Kube-apiserver

B

Kube-controller-manager

C

Kube-scheduler

D

Kube-proxy

Q106

Q106 How do you create a Kubernetes Secret using the CLI?

A

kubectl set secret

B

kubectl create secret

C

kubectl apply secret

D

kubectl generate secret

Q107

Q107 How do you enable RBAC in a Kubernetes cluster?

A

Add a role

B

Modify kube-apiserver

C

Add a RoleBinding

D

Set a cluster role

Q108

Q108 How do you restrict a pod from running as root?

A

Use PodSecurityPolicy

B

Set node taints

C

Apply network policy

D

Use role bindings

Q109

Q109 A pod fails to access a Kubernetes Secret. What could be the issue?

A

Missing Secret

B

Cluster down

C

Pod labels missing

D

Incorrect RBAC role

Q110

Q110 A pod's network traffic is not following the network policy rules. What might be wrong?

A

Missing labels

B

Incorrect taints

C

Network plugin issue

D

Log rotation enabled

Q111

Q111 What is Kubernetes Helm?

A

A container runtime

B

A deployment tool

C

A package manager

D

A logging tool

Q112

Q112 What is a Helm chart in Kubernetes?

A

A deployment object

B

A configuration template

C

A network policy

D

A PersistentVolume

Q113

Q113 How does Helm handle versioning of applications?

A

By using tags

B

By using values.yaml

C

By using chart.yaml

D

By using labels

Q114

Q114 What is the purpose of the values.yaml file in a Helm chart?

A

To store templates

B

To define chart metadata

C

To store configuration values

D

To deploy services

Q115

Q115 What command upgrades an already installed Helm release?

A

helm install

B

helm upgrade

C

helm apply

D

helm deploy

Q116

Q116 How do you install a Helm chart from a repository?

A

helm init

B

helm repo add

C

helm install

D

helm fetch

Q117

Q117 How do you rollback a Helm release to a previous version?

A

helm rollback

B

helm downgrade

C

helm reset

D

helm revert

Q118

Q118 How do you list all Helm releases in a Kubernetes cluster?

A

helm list

B

helm show

C

helm get releases

D

helm describe releases

Q119

Q119 A Helm release fails to deploy due to missing dependencies. What could resolve this?

A

Use helm init

B

Use helm dependency update

C

Recreate the release

D

Restart Tiller

Q120

Q120 A Helm release is in a failed state. What is the best way to debug this?

A

Check values.yaml

B

Check Helm logs

C

Rollback release

D

Restart deployment

ad verticalad vertical
ad