Skip to content

Commit

Permalink
cgroup containerd k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
s50600822 committed Mar 12, 2024
1 parent a70c6b1 commit 2ac3f86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tut/k8s/wasted/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ k apply -f wasted.yml

```

it should be killed and an attempt to restart will occur, then CrashLoopBackOff
it should be killed by container runtime (containerd), then k8s comes and replaced the status with Crashbackloop (the OOMKilled status will be replaced with Crashbackloop ).
If no other monitoring were there to record the OOM moment and nobody sees when it happens, like below(last until K8S perform the check and replaced status = Crashbackloop):
```bash
NAME READY STATUS RESTARTS AGE
memory-usage-deployment-7d787c4d74-krs4n 0/1 OOMKilled 1 (10s ago) 39s
```

it may not be obvious why the pod is in Crashbackloop state since there is no k8s event to record the observation of OOMKilled(refer to k8s code below).

clean up
```bash
Expand All @@ -22,3 +23,5 @@ k delete deployment memory-usage-deployment -n musage


https://github.com/kubernetes/kubernetes/commit/4e20a8f52bcce054459f4df537c12e889a02b86c

https://github.com/kubernetes/kubernetes/blob/3ec6a387955b1240ad6d795663513f1ee12ceaec/pkg/kubelet/kuberuntime/helpers.go#L159
2 changes: 2 additions & 0 deletions vs/java/cgroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,5 @@ https://github.com/KimMachineGun/automemlimit
https://github.com/google/cadvisor

https://github.com/kubernetes/kubernetes/commit/4e20a8f52bcce054459f4df537c12e889a02b86c

https://github.com/kubernetes/kubernetes/blob/3ec6a387955b1240ad6d795663513f1ee12ceaec/pkg/kubelet/kuberuntime/helpers.go#L159

0 comments on commit 2ac3f86

Please sign in to comment.