100% Latest & Updated CNCF CKA Practice Test Questions, Exam Dumps & Verified Answers!
30 Days Free Updates, Instant Download!
Question 320
A Service frontend listens on port 80 with targetPort: app-http. Two selected Pods each name their container port app-http, one 8080 and another 9080. Which statements are true? Choose ONE answer.
- Both Pods must use the same backend numeric port.
- A named targetPort resolves separately for each selected Pod.
- A named targetPort grants permission through a NetworkPolicy.
- Service port changes the container port field automatically.
Explanation
Correct Answer
B:The same port name may map to different numeric container ports.
Incorrect Answers
A:Named targetPorts specifically permit different backend port numbers.
C:NetworkPolicy is a separate traffic authorization mechanism.
D:Service routing does not mutate Pod spec.
Question 321
A ClusterIP Service selects app=reporter Pods. All matching Pods fail readiness probes, so EndpointSlice endpoints are not ready. What is the likely cause of failed Service routing? Choose ONE answer.
- The Service name is invalid because readiness failed.
- The Service always forwards to failed-readiness endpoints.
- No ready backend endpoints are eligible for normal traffic.
- Pods are automatically deleted when readiness fails.
Explanation
Correct Answer
C:Readiness controls whether endpoints are offered as ready backends for Service traffic.
Incorrect Answers
A:Service DNS naming exists independently of the readiness state of its backends.
B:Endpoint readiness informs normal load-balancing eligibility.
D:Readiness failure generally removes traffic eligibility rather than deleting Pods.
Question 322
A Service has `port: 80` and `targetPort: web`; its Pods define container port `name: web, containerPort: 8082`. What destination container port does Service routing select? Choose ONE answer.
- 80.
- No port because targetPort must be numeric.
- 8082.
- 443.
Explanation
Correct Answer
C:The named targetPort resolves to the matching named Pod container port.
Incorrect Answers
A:Service port is the front-end port, distinct from the resolved targetPort.
B:Kubernetes Services support named targetPort resolution.
D:There is no TLS-related automatic port rewrite in the given Service.
Question 323
In namespace `platform`, a `ClusterIP` Service `svc-frontend` has selector `app=frontend`, port 8080/TCP, targetPort 5000, and no nodePort; `frontend-17-ready` has matching labels and is Ready; `frontend-17-other` is Ready but has `app=other`; `frontend-17-unready` matches `app=frontend` but fails readiness. No publishNotReadyAddresses is set. Choose ONE statement.
- Clients must contact Pod targetPort 5000 as the Service port instead of 8080.
- The Service selects `frontend-17-ready` as a ready backend endpoint.
- `frontend-17-other` receives Service traffic because it has Ready=True.
- `frontend-17-unready` is treated as a healthy backend because its app label matches.
Explanation
Correct Answer
B:`frontend-17-ready` matches selector `app=frontend` and is Ready, so it can appear as a ready EndpointSlice endpoint.
Incorrect Answers
A:The Service publishes port 8080; targetPort 5000 belongs to the backend mapping. Service selectors determine backends; endpoint readiness and the configured targetPort affect whether that backend can actually receive traffic.
C:Readiness alone cannot override the Service selector; `frontend-17-other` has label `app=other`.
D:Normal Service endpoint readiness still matters; `frontend-17-unready` currently fails readiness.
Question 324
In namespace `shop`, a `NodePort` Service `svc-api` has selector `app=api`, port 80/TCP, targetPort 8080, and nodePort 30357; `api-22-ready` has matching labels and is Ready; `api-22-other` is Ready but has `app=other`; `api-22-unready` matches `app=api` but fails readiness. No publishNotReadyAddresses is set. Choose ONE statement.
- Clients must contact Pod targetPort 8080 as the Service port instead of 80.
- Clients use Service port 80, which forwards to backend target port 8080.
- `api-22-unready` is treated as a healthy backend because its app label matches.
- `api-22-other` receives Service traffic because it has Ready=True.
Explanation
Correct Answer
B:Service port and targetPort describe different sides of routing: 80 is virtual-service entry and 8080 is the endpoint port.
Incorrect Answers
A:The Service publishes port 80; targetPort 8080 belongs to the backend mapping. Service selectors determine backends; endpoint readiness and the configured targetPort affect whether that backend can actually receive traffic.
C:Normal Service endpoint readiness still matters; `api-22-unready` currently fails readiness.
D:Readiness alone cannot override the Service selector; `api-22-other` has label `app=other`.
Question 325
In namespace `edge`, a `NodePort` Service `svc-image` has selector `app=image`, port 9090/TCP, targetPort 9091, and nodePort 30459; `image-28-ready` has matching labels and is Ready; `image-28-other` is Ready but has `app=other`; `image-28-unready` matches `app=image` but fails readiness. No publishNotReadyAddresses is set. Choose ONE statement.
- `image-28-unready` is treated as a healthy backend because its app label matches.
- Clients must contact Pod targetPort 9091 as the Service port instead of 9090.
- `image-28-unready` is not a normal ready backend while its readiness condition is false.
- `image-28-other` receives Service traffic because it has Ready=True.
Explanation
Correct Answer
C:Without publishNotReadyAddresses, ordinary Service routing uses ready endpoints and `image-28-unready` is unready.
Incorrect Answers
A:Normal Service endpoint readiness still matters; `image-28-unready` currently fails readiness.
B:The Service publishes port 9090; targetPort 9091 belongs to the backend mapping. Service selectors determine backends; endpoint readiness and the configured targetPort affect whether that backend can actually receive traffic.
D:Readiness alone cannot override the Service selector; `image-28-other` has label `app=other`.
Question 326
A Service selects app=api. Pod A has app=api and is Ready; Pod B has app=api but is NotReady; Pod C has app=batch and is Ready. Choose THREE expected behaviors. Choose THREE answers.
- Pod C is not selected by this Service.
- Pod C is eligible solely because it is Ready.
- Pod B must be deleted because it is NotReady.
- The Service will create a fourth Pod to maintain replica count.
- Pod B is matched by label but should not be treated as a ready backend.
- Pod A is a ready eligible backend.
Explanation
Correct Answers
A:Its app=batch label does not satisfy app=api.
E:Pod readiness is independent of selector match and affects endpoint eligibility.
F:A matches the Service selector and passes readiness.
Incorrect Answers
B:A Service still requires a matching selector for automatic endpoint discovery.
C:Readiness affects traffic selection rather than enforcing automatic Pod deletion.
D:Replica controllers, not Services, determine workload replica count.
Question 327
In namespace `ops`, a `ClusterIP` Service `svc-ledger` has selector `app=ledger`, port 6379/TCP, targetPort 6380, and no nodePort; `ledger-33-ready` has matching labels and is Ready; `ledger-33-other` is Ready but has `app=other`; `ledger-33-unready` matches `app=ledger` but fails readiness. No publishNotReadyAddresses is set. Choose ONE statement.
- The Service selects `ledger-33-ready` as a ready backend endpoint.
- `ledger-33-other` receives Service traffic because it has Ready=True.
- Clients must contact Pod targetPort 6380 as the Service port instead of 6379.
- `ledger-33-unready` is treated as a healthy backend because its app label matches.
Explanation
Correct Answer
A:`ledger-33-ready` matches selector `app=ledger` and is Ready, so it can appear as a ready EndpointSlice endpoint.
Incorrect Answers
B:Readiness alone cannot override the Service selector; `ledger-33-other` has label `app=other`.
C:The Service publishes port 6379; targetPort 6380 belongs to the backend mapping. Service selectors determine backends; endpoint readiness and the configured targetPort affect whether that backend can actually receive traffic.
D:Normal Service endpoint readiness still matters; `ledger-33-unready` currently fails readiness.
Question 328
In namespace `finance`, a `ClusterIP` Service `svc-worker` has selector `app=worker`, port 443/TCP, targetPort 8443, and no nodePort; `worker-37-ready` has matching labels and is Ready; `worker-37-other` is Ready but has `app=other`; `worker-37-unready` matches `app=worker` but fails readiness. No publishNotReadyAddresses is set. Choose ONE statement.
- `worker-37-other` receives Service traffic because it has Ready=True.
- `worker-37-unready` is treated as a healthy backend because its app label matches.
- The Service selects `worker-37-ready` as a ready backend endpoint.
- Clients must contact Pod targetPort 8443 as the Service port instead of 443.
Explanation
Correct Answer
C:`worker-37-ready` matches selector `app=worker` and is Ready, so it can appear as a ready EndpointSlice endpoint.
Incorrect Answers
A:Readiness alone cannot override the Service selector; `worker-37-other` has label `app=other`.
B:Normal Service endpoint readiness still matters; `worker-37-unready` currently fails readiness.
D:The Service publishes port 443; targetPort 8443 belongs to the backend mapping. Service selectors determine backends; endpoint readiness and the configured targetPort affect whether that backend can actually receive traffic.
Question 329
A Service without a selector fronts a managed external endpoint. Choose TWO accurate statements about its backend discovery. Choose TWO answers.
- The Service automatically creates a new Pod.
- Endpoints or EndpointSlices need to be managed explicitly.
- The Service can still have a ClusterIP for in-cluster clients.
- A Deployment with the Service name is required.
- The Endpoints controller selects Pods by default.
Explanation
Correct Answers
B:Without a selector, Kubernetes does not discover matching Pod endpoints automatically.
C:Omitting a selector does not forbid an internal Service virtual IP.
Incorrect Answers
A:A Service does not manage workloads or instantiate Pods.
D:Selectorless Services can point to externally managed destinations without Deployments.
E:There is no selector with which to pick Pods automatically.
Question 330
In namespace `media`, a `ClusterIP` Service `svc-metrics` has selector `app=metrics`, port 5432/TCP, targetPort 5433, and no nodePort; `metrics-41-ready` has matching labels and is Ready; `metrics-41-other` is Ready but has `app=other`; `metrics-41-unready` matches `app=metrics` but fails readiness. No publishNotReadyAddresses is set. Choose ONE statement.
- `metrics-41-other` receives Service traffic because it has Ready=True.
- `metrics-41-unready` is treated as a healthy backend because its app label matches.
- The Service selects `metrics-41-ready` as a ready backend endpoint.
- Clients must contact Pod targetPort 5433 as the Service port instead of 5432.
Explanation
Correct Answer
C:`metrics-41-ready` matches selector `app=metrics` and is Ready, so it can appear as a ready EndpointSlice endpoint.
Incorrect Answers
A:Readiness alone cannot override the Service selector; `metrics-41-other` has label `app=other`.
B:Normal Service endpoint readiness still matters; `metrics-41-unready` currently fails readiness.
D:The Service publishes port 5432; targetPort 5433 belongs to the backend mapping. Service selectors determine backends; endpoint readiness and the configured targetPort affect whether that backend can actually receive traffic.
Certified Kubernetes Administrator (CKA) Practice Tests