Skip to content

Commit 23b156b

Browse files
committed
add email address for EasyCLA
1 parent 83e9766 commit 23b156b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

content/vi/docs/tasks/configure-pod-container/assign-memory-resource.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Trang này hướng dẫn cách cấp phát bộ nhớ _request_ (tối thiểu)
1010

1111
## {{% heading "prerequisites" %}}
1212

13+
1314
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
1415

1516
Mỗi Node trong Cluster của bạn phải có ít nhất 300 MiB bộ nhớ.
@@ -35,6 +36,8 @@ NAME
3536
v1beta1.metrics.k8s.io
3637
```
3738

39+
40+
3841
<!-- steps -->
3942

4043
## Tạo namespace
@@ -78,12 +81,13 @@ Kết quả cho thấy Container trong Pod có bộ nhớ tối thiểu là 100
7881
và bộ nhớ tối đa là 200 MiB.
7982

8083
```yaml
81-
---
84+
...
8285
resources:
8386
requests:
8487
memory: 100Mi
8588
limits:
8689
memory: 200Mi
90+
...
8791
```
8892

8993
Chạy lệnh `kubectl top` để xem các thông số của Pod:
@@ -146,12 +150,12 @@ Kết quả cho thấy Container đã dừng hoạt động vì hết bộ nhớ
146150

147151
```yaml
148152
lastState:
149-
terminated:
150-
containerID: 65183c1877aaec2e8427bc95609cc52677a454b56fcb24340dbd22917c23b10f
151-
exitCode: 137
152-
finishedAt: 2017-06-20T20:52:19Z
153-
reason: OOMKilled
154-
startedAt: null
153+
terminated:
154+
containerID: 65183c1877aaec2e8427bc95609cc52677a454b56fcb24340dbd22917c23b10f
155+
exitCode: 137
156+
finishedAt: 2017-06-20T20:52:19Z
157+
reason: OOMKilled
158+
startedAt: null
155159
```
156160
157161
Container trong phần thực hành này có thể được khởi động lại, vì vậy kubelet sẽ khởi động lại nó. Lặp lại lệnh này vài lần để thấy Container liên tục bị dừng hoạt động và khởi động lại:
@@ -167,7 +171,6 @@ kubectl get pod memory-demo-2 --namespace=mem-example
167171
NAME READY STATUS RESTARTS AGE
168172
memory-demo-2 0/1 OOMKilled 1 37s
169173
```
170-
171174
```
172175
173176
kubectl get pod memory-demo-2 --namespace=mem-example
@@ -289,6 +292,8 @@ Xóa namespace của bạn. Thao tác này sẽ xóa tất cả các Pod bạn
289292
kubectl delete namespace mem-example
290293
```
291294

295+
296+
292297
## {{% heading "whatsnext" %}}
293298

294299
### Dành cho nhà phát triển ứng dụng

0 commit comments

Comments
 (0)