21.) Which resource defines how traffic enters the cluster from the outside?
A) Ingress
B) Service
C) NetworkPolicy
D) Endpoint
22.) What is the default port range used by NodePort services?
A) 1024–2048
B) 30000–32767
C) 20000–22000
D) 25000–27000
23.) Which of the following best defines a Service in Kubernetes?
A) A replication of pods
B) A resource to expose pods as a network service
C) A DNS server
D) A security policy
24.) Which network component allows internal DNS resolution for service names?
A) kube-dns
B) etcd
C) nginx
D) kubelet
25.) What command shows detailed information about an ingress resource?
A) kubectl get ingress
B) kubectl inspect ingress
C) kubectl describe ingress <name>
D) kubectl logs ingress
26.) Which component in Kubernetes creates endpoints for a service?
A) kubelet
B) kube-dns
C) etcd
D) endpoint-controller
27.) Which command lists all ingress controllers in the cluster?
A) kubectl get ingress-controllers
B) kubectl get ingress
C) kubectl get deployments -n ingress-nginx
D) kubectl get svc ingress
28.) What does the targetPort field in a Service definition refer to?
A) External port exposed to users
B) Port on which the pod is listening
C) Randomly assigned port
D) The port for API access
29.) What command would you use to create a service from a YAML file?
A) kubectl run -f service.yaml
B) kubectl expose -f service.yaml
C) kubectl deploy -f service.yaml
D) kubectl create -f service.yaml
30.) Which network feature is used to restrict egress traffic from a pod?
A) Ingress resource
B) NodePort rule
C) Kube-proxy
D) Egress rule in NetworkPolicy
Related