Repository: kubernetes
Issue: Container remains ready causing Pod and EndpointSlice to Report False Ready State for the entire terminationGracePeriod
Labels: kind/bug,priority/backlog,sig/node,triage/accepted

### What happened?

containerStatuses.ready is not set to false immediately when a pod it deleted. This is results in pod reporting ready status when the pod is deleted after terminationGracePeriodSeconds have passed. 

### What did you expect to happen?

After the pod termination starts, the containerStatuses should set ready: false for all the containers in the pod and hence pod status should report as ready: false. 

### How can we reproduce it (as minimally and precisely as possible)?

```
apiVersion: v1
kind: Pod
metadata:
  name: "b382559131"
  namespace: "default"
spec:
  terminationGracePeriodSeconds: 60
  restartPolicy: Never
  containers:
  - name: c1
    image: "k8s.gcr.io/busybox"
    command: ["/bin/sh", "-c"]
    args:
      - |
        _term() {
          rm -f /tmp/ready
        }
        trap _term SIGTERM

        touch /tmp/ready

        while true; do
          echo 'helloc1'
          ls /tmp/die_now && echo 'dying in 5s...' && sleep 5 && exit 0
          sleep 1
        done
    readinessProbe:
      exec:
        command:
        - sh
        - -c
        - |
          if [ -f "/tmp/ready" ]; then
            exit 0
          else
            touch /tmp/die_now
            exit 1
          fi
  - name: c2
    image: "k8s.gcr.io/busybox"
    command:
      - sh
      - -c
      - "_term() { while true; do echo \"hello_term_c2\"; sleep 1; done } ; trap _term SIGTERM; while true; do echo \"helloc2\"; sleep 1; done"
    
```

Run the above pod and issue a delete call when the containers become ready

$ kubectl delete pod b382559131

Monitor the readiness status:

$ while true; do date && kubectl get pod b382559131 -o json | jq .status.containerStatuses.[].ready && sleep 1; done
Sat Dec 21 11:05:16 PM PST 2024
true
true
Sat Dec 21 11:05:17 PM PST 2024
true
true

< snip > 

Sat Dec 21 11:06:21 PM PST 2024
true
true
Sat Dec 21 11:06:22 PM PST 2024
Error from server (NotFound): pods "b382559131" not found
Sat Dec 21 11:06:24 PM PST 2024
Error from server (NotFound): pods "b382559131" not found

The pod has a termination grace period of 60s. The delete was issued at 11:05:21 and we see that the ready status was true until the pod was deleted at 11:06:22 (60s later). 

The pod reports ready status until the last container exits. 

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

v1.30.6

</details>


### Cloud provider

<details>
None
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>