0
0
Kubernetesdevops~20 mins

Startup probe concept in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Startup Probe Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Purpose of Startup Probe in Kubernetes

What is the main purpose of a startup probe in a Kubernetes pod?

ATo check if the application inside the container has started successfully before other probes run
BTo continuously monitor the CPU usage of the container
CTo restart the pod immediately when the container crashes
DTo manage network traffic routing to the pod
Attempts:
2 left
💡 Hint

Think about what happens when an app takes time to start and how Kubernetes knows when to begin health checks.

💻 Command Output
intermediate
2:00remaining
Startup Probe Failure Behavior

Given this startup probe configuration, what will happen if the probe fails continuously?

startupProbe:
  exec:
    command:
    - cat
    - /tmp/healthy
  failureThreshold: 3
  periodSeconds: 5
AThe container will be restarted immediately after the first failure
BThe container will be restarted after 3 seconds of continuous failure
CThe container will never restart regardless of failures
DThe container will be restarted after 15 seconds of continuous failure
Attempts:
2 left
💡 Hint

Calculate failureThreshold multiplied by periodSeconds to find the restart delay.

Configuration
advanced
2:30remaining
Correct Startup Probe YAML Configuration

Which of the following YAML snippets correctly configures a startup probe that checks HTTP path /healthz on port 8080 every 10 seconds, with a failure threshold of 5?

A
startupProbe:
  httpGet:
    path: /healthz
    port: 8080
  periodSeconds: 10
  failureThreshold: 5
B
startupProbe:
  httpGet:
    path: /healthz
    port: 8080
  periodSeconds: 5
  failureThreshold: 10
C
startupProbe:
  exec:
    command:
    - curl
    - http://localhost:8080/healthz
  periodSeconds: 10
  failureThreshold: 5
D
startupProbe:
  tcpSocket:
    port: 8080
  periodSeconds: 10
  failureThreshold: 5
Attempts:
2 left
💡 Hint

Look for the correct probe type and matching period and failureThreshold values.

Troubleshoot
advanced
2:00remaining
Diagnosing Startup Probe Failures

A pod with a startup probe keeps restarting even though the application eventually starts. What is the most likely cause?

AThe readiness probe is misconfigured and causing restarts
BThe pod has insufficient CPU resources causing slow startup
CThe startup probe command or HTTP path is incorrect, causing probe failures
DThe container image is missing required environment variables
Attempts:
2 left
💡 Hint

Check the probe configuration carefully for correctness.

Best Practice
expert
3:00remaining
Best Practice for Using Startup Probe with Slow-Starting Apps

For an application that takes a long time to start, what is the best practice when configuring probes in Kubernetes?

ASet very short liveness probe intervals to detect failures quickly
BUse a startup probe to delay liveness and readiness probes until the app is ready, preventing premature restarts
CDisable readiness probes to avoid blocking traffic
DUse only readiness probes and no startup or liveness probes
Attempts:
2 left
💡 Hint

Think about how Kubernetes decides when to start health checks and restart containers.