Study. uk . com
  1. Home
  2. All questions
  3. Question 980

CKA study material · question 980 of 1000

A container has a preStop hook that takes 45 seconds and terminationGracePeriodSeconds left at its default. What happens?

  1. The grace period is extended to cover the hook
  2. The hook runs first and the grace period starts afterwards
  3. The hook is skipped because it exceeds the grace period
  4. The hook is cut short when the grace period expires
Show the answer

Answer: D. The hook is cut short when the grace period expires

The preStop hook runs inside the grace period rather than in addition to it, so a slow hook needs terminationGracePeriodSeconds raised to match.

Source: Pod Lifecycle (Kubernetes) — Termination of Pods › Pod Termination Flow

Challenge yourself on this topic → Study as cards