
Q31
Q31 What is the primary purpose of a Service in Kubernetes?
To expose pods
To schedule pods
To manage storage
To restart pods
Q32
Q32 Which type of Kubernetes service is used for internal cluster communication?
NodePort
LoadBalancer
ClusterIP
ExternalName
Q33
Q33 What does a NodePort service do?
Exposes the app on a random port
Exposes the app on a fixed port
Exposes only internally
Does not expose the app
Q34
Q34 What is the role of kube-proxy in networking?
Manages DNS
Routes traffic to services
Assigns IPs to pods
Monitors pod health
Q35
Q35 Which protocol is supported by Kubernetes services by default?
HTTP
TCP
FTP
SMTP
Q36
Q36 How can a LoadBalancer service expose an app on multiple external IPs?
By adding annotations
By using multiple pods
By using a ReplicaSet
Not possible
Q37
Q37 Which command retrieves the IP of a ClusterIP service?
kubectl get pod
kubectl get svc
kubectl describe pod
kubectl get clusterip
Q38
Q38 How do you expose a deployment as a NodePort service?
kubectl create service nodeport
kubectl expose deployment
kubectl get nodeport
kubectl edit service
Q39
Q39 How do you specify a custom port for a NodePort service in YAML?
spec.ports[].port
spec.type.port
spec.ports[].nodePort
spec.service.port
Q40
Q40 A pod is unreachable despite a valid ClusterIP service. What might be the issue?
Pod not ready
Incorrect labels
Service not created
Network policy blocking traffic
Q41
Q41 A NodePort service is not accessible externally. What could be the reason?
Firewall blocking
Pod crash
Incorrect labels
Missing deployment
Q42
Q42 A LoadBalancer service is not exposing an external IP. What could be the cause?
Misconfigured LoadBalancer
Unreachable pods
ClusterIP misconfigured
Node crash
Q43
Q43 What is the purpose of ConfigMaps in Kubernetes?
Store binary data
Store configuration data
Store pod logs
Store images
Q44
Q44 How is data stored in a Kubernetes Secret?
As plain text
As JSON
As Base64 encoded
As YAML
Q45
Q45 Can ConfigMaps store sensitive data like passwords?
Yes
No
Only in JSON
Only in YAML
Q46
Q46 How are ConfigMaps typically consumed by a pod?
Mounted as volumes
Directly accessed
Using kube-proxy
With a deployment
Q47
Q47 What type of Kubernetes object is a Secret?
Pod
Deployment
Cluster-wide resource
Namespaced resource
Q48
Q48 How can you restrict access to a Secret in Kubernetes?
By using RBAC
By setting permissions in YAML
By modifying kubelet
By using labels
Q49
Q49 How do you create a ConfigMap from a file?
kubectl apply -f
kubectl create configmap
kubectl set config
kubectl describe configmap
Q50
Q50 Which field in a pod spec is used to reference a Secret as an environment variable?
secret.env
envFrom
secretFrom
volumeMounts
Q51
Q51 How do you create a Secret with username and password from the CLI?
kubectl create secret generic
kubectl set secret
kubectl apply secret
kubectl create config
Q52
Q52 A pod fails to access a ConfigMap. What might be the issue?
Incorrect pod labels
Missing ConfigMap
Cluster is down
Incorrect image name
Q53
Q53 A pod cannot access a Secret mounted as a volume. What could be wrong?
Secret not found
Pod labels missing
Secret is corrupted
Incorrect kube-proxy config
Q54
Q54 A pod consumes a ConfigMap but the data is outdated. What could resolve this?
Restart the pod
Delete ConfigMap
Recreate pod
Manually update data
Q55
Q55 What is the purpose of PersistentVolume (PV) in Kubernetes?
To store pod logs
To provide persistent storage
To expose pods
To monitor clusters
Q56
Q56 What is the role of PersistentVolumeClaim (PVC)?
Request persistent storage
Bind pods to nodes
Manage storage classes
Expose data
Q57
Q57 What is a StorageClass in Kubernetes?
A type of PV
Defines storage policies
A pod specification
A cluster role
Q58
Q58 Which type of volume is suitable for temporary storage in Kubernetes?
PersistentVolume
ConfigMap
Secret
EmptyDir
Q59
Q59 What happens when a pod using an EmptyDir volume restarts?
Volume persists
Volume is deleted
Volume is re-created
Volume is inaccessible
Q60
Q60 Which field in a PVC spec is used to request storage size?
spec.storage
resources.requests.storage
spec.capacity
storage.resources