<p>I deployed a helm chart and used it for more than ten days, but when I used it today, I found that the <code>pod was missing</code>, and the statefulset instance became <code>0/0</code>. I checked the history through <code>kubectl rollout history</code>, and the result was 1, which has not been modified. , what is the reason for this problem?</p>
<p>PS: Some records are as follows</p>
<pre><code>kubectl get sts -n proxy
NAME            READY   AGE
sts-test   0/0     16d
</code></pre>
<pre><code>$ kubectl rollout history sts/sts-test
statefulset.apps/sts-test
REVISION
1
</code></pre>
<pre><code>kubectl get sts sts-test -o yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  creationTimestamp: &quot;2022-06-09T03:22:23Z&quot;
  generation: 2
  labels:
    app.kubernetes.io/instance: sts-test-integration
    app.kubernetes.io/managed-by: Tiller
    app.kubernetes.io/name: sts-test
    app.kubernetes.io/version: &quot;1.0&quot;
    helm.sh/chart: sts-test-0.1.0
  managedFields:
  - apiVersion: apps/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:app.kubernetes.io/instance: {}
          f:app.kubernetes.io/managed-by: {}
          f:app.kubernetes.io/name: {}
          f:app.kubernetes.io/version: {}
          f:helm.sh/chart: {}
      f:spec:
        f:podManagementPolicy: {}
        f:revisionHistoryLimit: {}
        f:selector:
          f:matchLabels:
            .: {}
            f:app.kubernetes.io/instance: {}
            f:app.kubernetes.io/name: {}
        f:serviceName: {}
        f:template:
          f:metadata:
            f:labels:
              .: {}
              f:app.kubernetes.io/instance: {}
              f:app.kubernetes.io/name: {}
          f:spec:
            f:containers:
              k:{&quot;name&quot;:&quot;sts-test&quot;}:
                .: {}
                f:image: {}
                f:imagePullPolicy: {}
                f:name: {}
                f:ports:
                  .: {}
                  k:{&quot;containerPort&quot;:3306,&quot;protocol&quot;:&quot;TCP&quot;}:
                    .: {}
                    f:containerPort: {}
                    f:name: {}
                    f:protocol: {}
                f:readinessProbe:
                  .: {}
                  f:failureThreshold: {}
                  f:initialDelaySeconds: {}
                  f:periodSeconds: {}
                  f:successThreshold: {}
                  f:tcpSocket:
                    .: {}
                    f:port: {}
                  f:timeoutSeconds: {}
                f:resources: {}
                f:securityContext: {}
                f:terminationMessagePath: {}
                f:terminationMessagePolicy: {}
                f:volumeMounts:
                  .: {}
                  k:{&quot;mountPath&quot;:&quot;/data/mysql&quot;}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                    f:subPath: {}
                  k:{&quot;mountPath&quot;:&quot;/var/log/mysql&quot;}:
                    .: {}
                    f:mountPath: {}
                    f:name: {}
                    f:subPath: {}
            f:dnsPolicy: {}
            f:restartPolicy: {}
            f:schedulerName: {}
            f:securityContext: {}
            f:serviceAccount: {}
            f:serviceAccountName: {}
            f:terminationGracePeriodSeconds: {}
        f:updateStrategy:
          f:type: {}
        f:volumeClaimTemplates: {}
    manager: Go-http-client
    operation: Update
    time: &quot;2022-06-09T03:22:23Z&quot;
  - apiVersion: apps/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        f:replicas: {}
    manager: kubectl
    operation: Update
    time: &quot;2022-06-24T11:37:22Z&quot;
  - apiVersion: apps/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        f:collisionCount: {}
        f:currentRevision: {}
        f:observedGeneration: {}
        f:replicas: {}
        f:updateRevision: {}
    manager: kube-controller-manager
    operation: Update
    time: &quot;2022-06-24T11:37:24Z&quot;
  name: sts-test
  namespace: proxy
  resourceVersion: &quot;5821333&quot;
  selfLink: /apis/apps/v1/namespaces/proxy/statefulsets/sts-test
  uid: 8bb73b11-8ee9-44e1-8ead-f5b7c07c5f2e
spec:
  podManagementPolicy: Parallel
  replicas: 0
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: sts-test-integration
      app.kubernetes.io/name: sts-test
  serviceName: sts-test-svc
  template:
    metadata:
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: sts-test-integration
        app.kubernetes.io/name: sts-test
    spec:
      containers:
      - image: sts-test-integration:v0.1.0
        imagePullPolicy: IfNotPresent
        name: sts-test
        ports:
        - containerPort: 3306
          name: mysql
          protocol: TCP
        resources: {}
        securityContext: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /data/mysql
          name: sts-test-data
          subPath: mysqldata-pvc
        - mountPath: /var/log/mysql
          name: sts-test-data
          subPath: mysqllog-pvc
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: sts-test
      serviceAccountName: sts-test
      terminationGracePeriodSeconds: 30
  updateStrategy:
    type: RollingUpdate
  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      creationTimestamp: null
      name: sts-test-data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 50G
      storageClassName: local-path
      volumeMode: Filesystem
    status:
      phase: Pending
status:
  collisionCount: 0
  currentRevision: sts-test-6f95c95b57
  observedGeneration: 2
  replicas: 0
  updateRevision: sts-test-6f95c95b57
</code></pre>

moluzhui
<pre><code>...
- apiVersion: apps/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        f:replicas: {}  # &lt;-- replicas count has changed
    manager: kubectl
    operation: Update
    time: &quot;2022-06-24T11:37:22Z&quot;  # &lt;-- at this time
...
</code></pre>
<p><code>kubectl scale statefulset sts-test --replicas=0</code> will not create a new history record by default.</p>
