StatefulSet Ready State Displays 0/0 While Pods Remain "Running"
search cancel

StatefulSet Ready State Displays 0/0 While Pods Remain "Running"

book

Article ID: 429902

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

In a VKS environment discrepancy is seen between the Stateful Set controller and the actual Pod status.

  • kubectl get statefulset -n <namespace> displays the READY column as 0/0.

    k get statefulset -n <namespace>

    NAME                      READY       AGE
    <stateful set name>       0/0         ##d

  • kubectl get pods confirms that Pods belonging to the StatefulSet are in a Running status.
  • Automated cleanup of Pods does not occur following a scale-down event, leading to "orphaned" workloads.

Environment

vSphere Kuberenetes Service 

Cause

This condition is typically caused by a synchronization failure between the Kubernetes Control Plane and the workload state

Resolution

To resolve the inconsistency, the controller must be forced to re-evaluate the Pod objects using the steps below

  • Manually delete the Pods that are currently running but not being recognized by the StatefulSet. 

    kubectl delete pod <pod-name>

  • Force a full reconciliation by scaling the StatefulSet replicas to zero.

    kubectl scale statefulset <name> --replicas=0

 

Additional Information

Podが実行中であるにも関わらず、StatefulSetのReady State が 0/0 になる