Courseiva
Cloud Native ArchitecturehardMultiple ChoiceObjective-mapped

KCNA Cloud Native Architecture Practice Question

Exhibit

Refer to the exhibit.
```
apiVersion: v1
kind: Pod
metadata:
  name: web-app
spec:
  containers:
  - name: app
    image: nginx:latest
    ports:
    - containerPort: 80
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
      initialDelaySeconds: 3
      periodSeconds: 5
```

A developer creates the Pod manifest shown. When the Pod runs, the liveness probe fails and the container is restarted repeatedly. What is the most likely cause?

⚠ Common exam trap

CNCF often tests the distinction between TCP and HTTP probes, and the trap here is that candidates assume a TCP probe can target any port without matching the container's listening port, or they confuse the probe port with the container port defined in the Pod spec.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The liveness probe port (8080) does not match the container port (80).

The liveness probe is configured to check TCP on port 8080, but the container exposes port 80 for Nginx. Since the probe will never successfully connect to port 8080, it always fails, causing the container to be restarted repeatedly. The probe must target the same port that the application is listening on.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The liveness probe port (8080) does not match the container port (80).

    Why this is correct

    Correct. The probe checks port 8080, but Nginx listens on port 80, so the probe fails.

  • The initialDelaySeconds of 3 is too short for Nginx to start.

    Why it's wrong here

    Nginx typically starts in under a second, so 3 seconds is usually sufficient.

  • The periodSeconds of 5 causes too frequent probing.

    Why it's wrong here

    Too frequent probing might cause unnecessary load but not probe failures; the probe would still succeed if the endpoint were reachable.

  • The image nginx:latest does not have a /healthz endpoint.

    Why it's wrong here

    While true, the main issue is the port mismatch; the probe is checking the wrong port.

About these practice questions

Courseiva writes every KCNA question from scratch — 833 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This KCNA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the KCNA exam.