You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/docker-to-sealos/references/conversion-mappings.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -991,7 +991,9 @@ metadata:
991
991
### Existing Template Resource Tuning
992
992
- Tune CPU and memory through the Sealos resource ladder.
993
993
- Preserve existing `ephemeral-storage` requests and limits exactly during template refreshes.
994
-
- Change `ephemeral-storage` only when runtime evidence shows `EphemeralStorage`, eviction, or disk-pressure failures for that workload.
994
+
- Change `ephemeral-storage` only when live evidence shows `EphemeralStorage`, eviction, or disk-pressure failures for that workload.
995
+
- Adjust `requests.ephemeral-storage` and `limits.ephemeral-storage` together for the same container.
996
+
- Choose the smallest common Mi value that covers observed writable-layer usage plus startup margin; Dify sandbox uses `512Mi` after `300Mi` eviction and observed runner expansion under `/opt` and `/var/sandbox`.
Copy file name to clipboardExpand all lines: skills/docker-to-sealos/references/runtime-log-hygiene.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,32 @@ Fix pattern:
63
63
3. Keep PVCs for real user data and writable runtime state.
64
64
4. Redeploy fresh and re-run setup/login plus log scan.
65
65
66
+
## Ephemeral Local Storage Pressure
67
+
68
+
Tune `ephemeral-storage` only from live runtime evidence.
69
+
70
+
Detection signals:
71
+
72
+
- Events contain `Pod ephemeral local storage usage exceeds the total limit of containers ...`.
73
+
- The pod is repeatedly `Evicted` while the workload's main process otherwise starts.
74
+
-`kubectl describe pod` shows tight `requests.ephemeral-storage` and `limits.ephemeral-storage` values for the failing container.
75
+
- Logs show large runtime extraction or dependency bootstrap shortly before eviction.
76
+
77
+
Debug pattern:
78
+
79
+
1. Inspect recent events with `kubectl get events --sort-by=.lastTimestamp` and filter for the workload name, `Evicted`, or `ephemeral`.
80
+
2. Inspect the failing container resources with `kubectl describe pod` or `kubectl get pod -o jsonpath`.
81
+
3. When the pod survives long enough, run `du -sh /opt /var /var/sandbox /tmp /root /var/cache 2>/dev/null` inside the container to identify runtime-expanded directories.
82
+
4. Patch the live workload to the smallest Mi value that covers observed writable-layer usage with startup margin.
83
+
5. Observe beyond the previous eviction window, then update both `requests.ephemeral-storage` and `limits.ephemeral-storage` together in the template.
84
+
85
+
Dify sandbox case study:
86
+
87
+
-`langgenius/dify-sandbox:0.2.15` expands Node and Python runner assets during startup.
88
+
- Observed writable-layer directories included `/opt/node-v20.20.0-linux-x64` at about `167Mi` and `/var/sandbox` at about `174Mi`.
89
+
-`300Mi` caused repeated eviction with `Pod ephemeral local storage usage exceeds the total limit of containers 300Mi`.
90
+
-`512Mi` kept `dify-sandbox` Ready with zero restarts after the old eviction window.
91
+
66
92
## Restricted-Compatible Security Context
67
93
68
94
When the image default UID is verified as non-root through image metadata, upstream docs, or `id` inside a live container, set restricted-compatible security context on managed app workloads and init Jobs:
0 commit comments