Description of the issue
The conditions
field in the status
of a StatefulSet is not getting populated. However, when using a Deployment, the conditions
field is populated as expected.
Kubernetes Version
1.30.5
To Reproduce
Steps to reproduce the behavior:
- Create a StatefulSet using the following Sample YAML:
apiVersion: apps/v1 kind: StatefulSet metadata: name: nginx-statefulset namespace: default spec: serviceName: "nginx-service" replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 name: http resources: requests: cpu: "100m" memory: "128Mi" limits: cpu: "200m" memory: "256Mi" volumeClaimTemplates: - metadata: name: nginx-storage spec: accessModes: ["ReadWriteOnce"] resources: requests: storage: 1Gi
- Deploy the StatefulSet using:
kubectl apply -f <filename>.yaml
- Check the StatefulSet status using:
kubectl get statefulset nginx-statefulset -n default -o yaml
Expected behavior
The conditions
field in the status
of the StatefulSet should be populated similarly to how it is populated for a Deployment.
StatefulSet Status Details:
status:
availableReplicas: 0
collisionCount: 0
currentRevision: nginx-statefulset-5b966b65c7
observedGeneration: 3
replicas: 1
updateRevision: nginx-statefulset-5f5c9b5765
updatedReplicas: 1
Deployment Status Details:
status:
availableReplicas: 3
conditions:
- lastTransitionTime: "2024-10-22T15:44:33Z"
lastUpdateTime: "2024-10-22T15:44:33Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2024-10-22T15:44:31Z"
lastUpdateTime: "2024-10-22T15:44:33Z"
message: ReplicaSet "nginx-deployment-5c45cbfff4" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 3
replicas: 3
updatedReplicas: 3