Merge pull request #23195 from tengqm/zh-links-tasks-4
[zh] Tidy up and fix links in tasks section (4/10)
This commit is contained in:
@@ -5,11 +5,9 @@ weight: 30
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
title: Configure Quality of Service for Pods
|
||||
content_type: task
|
||||
weight: 30
|
||||
---
|
||||
-->
|
||||
|
||||
<!-- overview -->
|
||||
@@ -19,20 +17,13 @@ This page shows how to configure Pods so that they will be assigned particular
|
||||
Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about
|
||||
scheduling and evicting Pods.
|
||||
-->
|
||||
|
||||
本文介绍怎样配置 Pod 让其获得特定的服务质量(QoS)类。Kubernetes 使用 QoS 类来决定 Pod 的调度和驱逐策略。
|
||||
|
||||
|
||||
|
||||
本页介绍怎样配置 Pod 让其获得特定的服务质量(QoS)类。Kubernetes 使用 QoS 类来决定 Pod 的调度和驱逐策略。
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
<!--
|
||||
@@ -40,8 +31,7 @@ scheduling and evicting Pods.
|
||||
|
||||
When Kubernetes creates a Pod it assigns one of these QoS classes to the Pod:
|
||||
-->
|
||||
|
||||
## QoS 类
|
||||
## QoS 类 {#qos-classes}
|
||||
|
||||
Kubernetes 创建 Pod 时就给它指定了下列一种 QoS 类:
|
||||
|
||||
@@ -75,7 +65,6 @@ For a Pod to be given a QoS class of Guaranteed:
|
||||
Here is the configuration file for a Pod that has one Container. The Container has a memory limit and a
|
||||
memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU:
|
||||
-->
|
||||
|
||||
## 创建一个 QoS 类为 Guaranteed 的 Pod
|
||||
|
||||
对于 QoS 类为 Guaranteed 的 Pod:
|
||||
@@ -134,14 +123,13 @@ status:
|
||||
qosClass: Guaranteed
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes
|
||||
automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own
|
||||
CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches
|
||||
the limit.
|
||||
-->
|
||||
|
||||
{{< note >}}
|
||||
如果容器指定了自己的内存限制,但没有指定内存请求,Kubernetes 会自动为它指定与内存限制匹配的内存请求。
|
||||
同样,如果容器指定了自己的 CPU 限制,但没有指定 CPU 请求,Kubernetes 会自动为它指定与 CPU 限制匹配的 CPU 请求。
|
||||
{{< /note >}}
|
||||
@@ -167,7 +155,6 @@ A Pod is given a QoS class of Burstable if:
|
||||
Here is the configuration file for a Pod that has one Container. The Container has a memory limit of 200 MiB
|
||||
and a memory request of 100 MiB.
|
||||
-->
|
||||
|
||||
## 创建一个 QoS 类为 Burstable 的 Pod
|
||||
|
||||
如果满足下面条件,将会指定 Pod 的 QoS 类为 Burstable:
|
||||
@@ -225,7 +212,6 @@ status:
|
||||
<!--
|
||||
Delete your Pod:
|
||||
-->
|
||||
|
||||
删除 Pod:
|
||||
|
||||
```shell
|
||||
@@ -241,7 +227,6 @@ have any memory or CPU limits or requests.
|
||||
Here is the configuration file for a Pod that has one Container. The Container has no memory or CPU
|
||||
limits or requests:
|
||||
-->
|
||||
|
||||
## 创建一个 QoS 类为 BestEffort 的 Pod
|
||||
|
||||
对于 QoS 类为 BestEffort 的 Pod,Pod 中的容器必须没有设置内存和 CPU 限制或请求。
|
||||
@@ -249,14 +234,11 @@ limits or requests:
|
||||
下面是包含一个容器的 Pod 配置文件。
|
||||
容器没有设置内存和 CPU 限制或请求。
|
||||
|
||||
|
||||
|
||||
{{< codenew file="pods/qos/qos-pod-3.yaml" >}}
|
||||
|
||||
<!--
|
||||
Create the Pod:
|
||||
-->
|
||||
|
||||
创建 Pod:
|
||||
|
||||
```shell
|
||||
@@ -266,7 +248,6 @@ kubectl create -f https://k8s.io/examples/pods/qos/qos-pod-3.yaml --namespace=qo
|
||||
<!--
|
||||
View detailed information about the Pod:
|
||||
-->
|
||||
|
||||
查看 Pod 详情:
|
||||
|
||||
```shell
|
||||
@@ -276,7 +257,6 @@ kubectl get pod qos-demo-3 --namespace=qos-example --output=yaml
|
||||
<!--
|
||||
The output shows that Kubernetes gave the Pod a QoS class of BestEffort.
|
||||
-->
|
||||
|
||||
结果表明 Kubernetes 为 Pod 配置的 QoS 类为 BestEffort。
|
||||
|
||||
```yaml
|
||||
@@ -292,7 +272,6 @@ status:
|
||||
<!--
|
||||
Delete your Pod:
|
||||
-->
|
||||
|
||||
删除 Pod:
|
||||
|
||||
```shell
|
||||
@@ -305,14 +284,12 @@ kubectl delete pod qos-demo-3 --namespace=qos-example
|
||||
Here is the configuration file for a Pod that has two Containers. One container specifies a memory
|
||||
request of 200 MiB. The other Container does not specify any requests or limits.
|
||||
-->
|
||||
|
||||
## 创建包含两个容器的 Pod
|
||||
|
||||
下面是包含两个容器的 Pod 配置文件。
|
||||
一个容器指定了内存请求 200 MiB。
|
||||
另外一个容器没有指定任何请求和限制。
|
||||
|
||||
|
||||
{{< codenew file="pods/qos/qos-pod-4.yaml" >}}
|
||||
|
||||
<!--
|
||||
@@ -321,7 +298,6 @@ criteria for QoS class Guaranteed, and one of its Containers has a memory reques
|
||||
|
||||
Create the Pod:
|
||||
-->
|
||||
|
||||
注意此 Pod 满足 Burstable QoS 类的标准。
|
||||
也就是说它不满足 Guaranteed QoS 类标准,因为它的一个容器设有内存请求。
|
||||
|
||||
@@ -334,7 +310,6 @@ kubectl create -f https://k8s.io/examples/pods/qos/qos-pod-4.yaml --namespace=qo
|
||||
<!--
|
||||
View detailed information about the Pod:
|
||||
-->
|
||||
|
||||
查看 Pod 详情:
|
||||
|
||||
```shell
|
||||
@@ -344,7 +319,6 @@ kubectl get pod qos-demo-4 --namespace=qos-example --output=yaml
|
||||
<!--
|
||||
The output shows that Kubernetes gave the Pod a QoS class of Burstable:
|
||||
-->
|
||||
|
||||
结果表明 Kubernetes 为 Pod 配置的 QoS 类为 Burstable:
|
||||
|
||||
```yaml
|
||||
@@ -366,7 +340,6 @@ status:
|
||||
<!--
|
||||
Delete your Pod:
|
||||
-->
|
||||
|
||||
删除 Pod:
|
||||
|
||||
```shell
|
||||
@@ -378,7 +351,6 @@ kubectl delete pod qos-demo-4 --namespace=qos-example
|
||||
|
||||
Delete your namespace:
|
||||
-->
|
||||
|
||||
## 环境清理
|
||||
|
||||
删除命名空间:
|
||||
@@ -387,12 +359,8 @@ Delete your namespace:
|
||||
kubectl delete namespace qos-example
|
||||
```
|
||||
|
||||
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
### For app developers
|
||||
|
||||
@@ -400,12 +368,11 @@ kubectl delete namespace qos-example
|
||||
|
||||
* [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/)
|
||||
-->
|
||||
|
||||
### 应用开发者参考
|
||||
|
||||
* [为 Pod 和容器分配内存资源](/docs/tasks/configure-pod-container/assign-memory-resource/)
|
||||
* [为 Pod 和容器分配内存资源](/zh/docs/tasks/configure-pod-container/assign-memory-resource/)
|
||||
|
||||
* [为 Pod 和容器分配 CPU 资源](/docs/tasks/configure-pod-container/assign-cpu-resource/)
|
||||
* [为 Pod 和容器分配 CPU 资源](/zh/docs/tasks/configure-pod-container/assign-cpu-resource/)
|
||||
|
||||
<!--
|
||||
### For cluster administrators
|
||||
@@ -429,21 +396,20 @@ kubectl delete namespace qos-example
|
||||
|
||||
### 集群管理员参考
|
||||
|
||||
* [为命名空间配置默认的内存请求和限制](/docs/tasks/administer-cluster/memory-default-namespace/)
|
||||
* [为命名空间配置默认的内存请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)
|
||||
* [为命名空间配置默认的 CPU 请求和限制](/zh/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace)
|
||||
|
||||
* [为命名空间配置默认的 CPU 请求和限制](/docs/tasks/administer-cluster/cpu-default-namespace/)
|
||||
* [为命名空间配置最小和最大内存限制](/zh/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/)
|
||||
|
||||
* [为命名空间配置最小和最大内存限制](/docs/tasks/administer-cluster/memory-constraint-namespace/)
|
||||
* [为命名空间配置最小和最大 CPU 限制](/zh/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/)
|
||||
|
||||
* [为命名空间配置最小和最大 CPU 限制](/docs/tasks/administer-cluster/cpu-constraint-namespace/)
|
||||
* [为命名空间配置内存和 CPU 配额](/zh/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)
|
||||
|
||||
* [为命名空间配置内存和 CPU 配额](/docs/tasks/administer-cluster/quota-memory-cpu-namespace/)
|
||||
* [为命名空间配置 Pod 配额](/zh/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/)
|
||||
|
||||
* [为命名空间配置 Pod 配额](/docs/tasks/administer-cluster/quota-pod-namespace/)
|
||||
* [为 API 对象配置配额](/zh/docs/tasks/administer-cluster/quota-api-object/)
|
||||
|
||||
* [为 API 对象配置配额](/docs/tasks/administer-cluster/quota-api-object/)
|
||||
|
||||
* [控制节点上的拓扑管理策略](/docs/tasks/administer-cluster/topology-manager/)
|
||||
* [控制节点上的拓扑管理策略](/zh/docs/tasks/administer-cluster/topology-manager/)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user