sync assign-pod-node overview jsonpath device-plugin-api-versions
This commit is contained in:
parent
057d5de5f4
commit
dfc2b9afc2
|
|
@ -60,15 +60,13 @@ specific Pods:
|
|||
|
||||
Like many other Kubernetes objects, nodes have
|
||||
[labels](/docs/concepts/overview/working-with-objects/labels/). You can [attach labels manually](/docs/tasks/configure-pod-container/assign-pods-nodes/#add-a-label-to-a-node).
|
||||
Kubernetes also populates a standard set of labels on all nodes in a cluster. See [Well-Known Labels, Annotations and Taints](/docs/reference/labels-annotations-taints/)
|
||||
for a list of common node labels.
|
||||
Kubernetes also populates a [standard set of labels](/docs/reference/node/node-labels/) on all nodes in a cluster.
|
||||
-->
|
||||
## 节点标签 {#built-in-node-labels}
|
||||
|
||||
与很多其他 Kubernetes 对象类似,节点也有[标签](/zh-cn/docs/concepts/overview/working-with-objects/labels/)。
|
||||
你可以[手动地添加标签](/zh-cn/docs/tasks/configure-pod-container/assign-pods-nodes/#add-a-label-to-a-node)。
|
||||
Kubernetes 也会为集群中所有节点添加一些标准的标签。
|
||||
参见[常用的标签、注解和污点](/zh-cn/docs/reference/labels-annotations-taints/)以了解常见的节点标签。
|
||||
Kubernetes 也会为集群中所有节点添加一些[标准的标签](/zh-cn/docs/reference/node/node-labels/)。
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
|
|
@ -233,7 +231,7 @@ For example, consider the following Pod spec:
|
|||
你可以使用 Pod 规约中的 `.spec.affinity.nodeAffinity` 字段来设置节点亲和性。
|
||||
例如,考虑下面的 Pod 规约:
|
||||
|
||||
{{< codenew file="pods/pod-with-node-affinity.yaml" >}}
|
||||
{{% code file="pods/pod-with-node-affinity.yaml" %}}
|
||||
|
||||
<!--
|
||||
In this example, the following rules apply:
|
||||
|
|
@ -333,7 +331,7 @@ For example, consider the following Pod spec:
|
|||
|
||||
例如,考虑下面的 Pod 规约:
|
||||
|
||||
{{< codenew file="pods/pod-with-affinity-anti-affinity.yaml" >}}
|
||||
{{% code file="pods/pod-with-affinity-anti-affinity.yaml" %}}
|
||||
|
||||
<!--
|
||||
If there are two possible nodes that match the
|
||||
|
|
@ -536,7 +534,7 @@ Consider the following Pod spec:
|
|||
|
||||
考虑下面的 Pod 规约:
|
||||
|
||||
{{< codenew file="pods/pod-with-pod-affinity.yaml" >}}
|
||||
{{% code file="pods/pod-with-pod-affinity.yaml" %}}
|
||||
|
||||
<!--
|
||||
This example defines one Pod affinity rule and one Pod anti-affinity rule. The
|
||||
|
|
@ -913,13 +911,13 @@ The following operators can only be used with `nodeAffinity`.
|
|||
<!--
|
||||
| Operator | Behaviour |
|
||||
| :------------: | :-------------: |
|
||||
| `Gt` | The supplied value will be parsed as an integer, and that integer is less than or equal to the integer that results from parsing the value of a label named by this selector |
|
||||
| `Lt` | The supplied value will be parsed as an integer, and that integer is greater than or equal to the integer that results from parsing the value of a label named by this selector |
|
||||
| `Gt` | The supplied value will be parsed as an integer, and that integer is less than the integer that results from parsing the value of a label named by this selector |
|
||||
| `Lt` | The supplied value will be parsed as an integer, and that integer is greater than the integer that results from parsing the value of a label named by this selector |
|
||||
-->
|
||||
| 操作符 | 行为 |
|
||||
| :------------: | :-------------: |
|
||||
| `Gt` | 提供的值将被解析为整数,并且该整数小于等于通过解析此选择算符命名的标签的值所得到的整数 |
|
||||
| `Lt` | 提供的值将被解析为整数,并且该整数大于等于通过解析此选择算符命名的标签的值所得到的整数 |
|
||||
| `Gt` | 提供的值将被解析为整数,并且该整数小于通过解析此选择算符命名的标签的值所得到的整数 |
|
||||
| `Lt` | 提供的值将被解析为整数,并且该整数大于通过解析此选择算符命名的标签的值所得到的整数 |
|
||||
|
||||
{{<note>}}
|
||||
<!--
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ IaaS 提供商 | 链接 |
|
|||
Alibaba Cloud | https://www.alibabacloud.com/trust-center |
|
||||
Amazon Web Services | https://aws.amazon.com/security |
|
||||
Google Cloud Platform | https://cloud.google.com/security |
|
||||
Huawei Cloud | https://www.huaweicloud.com/securecenter/overallsafety |
|
||||
Huawei Cloud | https://www.huaweicloud.com/intl/zh-cn/securecenter/overallsafety |
|
||||
IBM Cloud | https://www.ibm.com/cloud/security |
|
||||
Microsoft Azure | https://docs.microsoft.com/en-us/azure/security/azure-security |
|
||||
Oracle Cloud Infrastructure | https://www.oracle.com/security |
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ JSONPath regular expressions are not supported. If you want to match using regul
|
|||
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
|
||||
|
||||
# The following command achieves the desired result
|
||||
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
|
||||
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).metadata.name'
|
||||
```
|
||||
-->
|
||||
{{< note >}}
|
||||
|
|
@ -172,6 +172,6 @@ kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-
|
|||
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
|
||||
|
||||
# 下面的命令可以获得所需的结果
|
||||
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
|
||||
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).metadata.name'
|
||||
```
|
||||
{{< /note >}}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
content_type: "reference"
|
||||
title: Kubelet 设备管理器 API 版本
|
||||
weight: 10
|
||||
weight: 50
|
||||
---
|
||||
<!--
|
||||
content_type: "reference"
|
||||
title: Kubelet Device Manager API Versions
|
||||
weight: 10
|
||||
weight: 50
|
||||
-->
|
||||
|
||||
<!--
|
||||
|
|
|
|||
Loading…
Reference in New Issue