Kubernetes中Pod输出READY字段的2/2含义是什么?
Understanding the
2/2 in Kubernetes Pod READY Status Hey there! Let’s clear up what that 2/2 value in the READY column of your kubectl get pods output means—this applies to both your general pod query and the StatefulSet MySQL example you shared.
Breaking down the READY format
The READY column follows the pattern [number of ready containers]/[total number of containers defined in the Pod].
So when you see 2/2:
- The first number (
2) tells you how many containers inside the Pod are in a ready state—meaning they’ve passed their readiness probes (if configured) and are ready to handle traffic or perform their intended tasks. - The second number (
2) is the total count of containers that are defined in the Pod’s spec.
Applying this to your examples
- For your first question about a general
kubectl get podsoutput: The Pod you’re looking at has 2 containers, and both are fully ready to operate. - For the StatefulSet MySQL Pods: Each
mysql-*Pod is configured with 2 containers (likely the main MySQL database container plus a sidecar container for tasks like data synchronization or logging, which is common in official Kubernetes StatefulSet setups). Both of these containers are up, running, and ready to do their jobs.
Quick note: If you ever see something like
1/2, that means one container is ready but the other isn’t—you’d want to runkubectl describe pod <pod-name>to check why the second container isn’t ready (maybe it’s still starting up, failed a probe, or hit an error).
内容的提问来源于stack exchange,提问作者Manu Chadha
相关产品推荐
相关产品推荐

