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

CKA study material · question 527 of 1000

You delete a ReplicaSet with kubectl and no extra flags. What happens to its Pods and to the ReplicaSet object?

  1. The ReplicaSet stays visible until every Pod is gone, then disappears
  2. The ReplicaSet is removed immediately and its Pods are cleaned up afterwards
  3. The Pods are orphaned and left running indefinitely
  4. The Pods are deleted first, and the ReplicaSet only afterwards
Show the answer

Answer: B. The ReplicaSet is removed immediately and its Pods are cleaned up afterwards

Background cascading deletion is the default: the API server deletes the owner at once and the garbage collector removes the dependents in the background. Foreground deletion is what keeps the owner visible until dependents are gone.

Source: Garbage Collection (Kubernetes) — Cascading deletion › Background cascading deletion

Challenge yourself on this topic → Study as cards