Courseiva
Kubernetes Fundamentals →mediumMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

What is the purpose of a liveness probe in a Kubernetes pod?

⚠ Common exam trap

It's easy for candidates to confuse liveness probes with readiness probes, mistakenly thinking liveness determines traffic readiness, but liveness is solely about container health and automatic restarts, not service connectivity.

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

✓

To check if the application is still running; if not, restart the container

A liveness probe in Kubernetes is used to determine if a container is still running and healthy. If the probe fails, the kubelet kills the container and restarts it based on the pod's restart policy. This ensures that applications that have entered a deadlock or hung state are automatically recovered without manual intervention.

Answer analysis

Option-by-option breakdown

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

  • ✗

    To check if the pod is scheduled on a node

    Why it's wrong here

    Scheduling is handled by the scheduler and node conditions, not probes; a liveness probe restarts a container when its process is deadlocked or hung. Checking node placement would be tempting when diagnosing Pending pods, but that is the scheduler's domain, not a kubelet probe.

  • ✗

    To check if the container has started successfully

    Why it's wrong here

    Container start-up is the startup probe's role, which suspends liveness and readiness checks until the application has initialised. Liveness instead detects a running container that has become unresponsive and triggers a kubelet restart. Start-up timing is tempting because slow-booting apps need protection, but that is precisely the startup probe's job.

  • ✗

    To check if the application is ready to serve traffic

    Why it's wrong here

    Readiness probes govern whether the pod's IP is included in Service endpoints, so traffic is withheld until the app can serve it. Liveness instead restarts a wedged container; it does not remove endpoints. Readiness is tempting because both use the same HTTP or TCP checks, but only readiness controls traffic routing.

  • ✓

    To check if the application is still running; if not, restart the container

    Why this is correct

    A liveness probe periodically tests the container; on failure kubelet restarts it according to the pod's restartPolicy. This recovers hung or deadlocked processes that are still running but unresponsive, unlike a readiness probe, which only removes the pod from Service endpoints.

About these practice questions

Courseiva writes every KCNA question from scratch — 930 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.