Skip to content

Commit 204cad8

Browse files
authored
Merge pull request #46173 from my-git9/pt-20106
[zh-cn]sync assign-pod-node persistent-volumes
2 parents 2678b79 + 8662b30 commit 204cad8

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ For example, consider the following Pod spec:
333333

334334
例如,考虑下面的 Pod 规约:
335335

336-
{{% code_sample file="pods/pod-with-affinity-anti-affinity.yaml" %}}
336+
{{% code_sample file="pods/pod-with-affinity-preferred-weight.yaml" %}}
337337

338338
<!--
339339
If there are two possible nodes that match the

content/zh-cn/docs/concepts/storage/persistent-volumes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,11 +878,11 @@ PV 持久卷是用插件的形式来实现的。Kubernetes 目前支持以下插
878878

879879
<!--
880880
The following types of PersistentVolume are deprecated but still available.
881-
If you are using these volume types except for `flexVolume`, `cephfs` and `rbd`,
881+
If you are using these volume types except for `flexVolume`, `cephfs` and `rbd`,
882882
please install corresponding CSI drivers.
883883

884884
* [`awsElasticBlockStore`](/docs/concepts/storage/volumes/#awselasticblockstore) - AWS Elastic Block Store (EBS)
885-
(**migration on by default** starting v1.23)
885+
(**migration on by default** starting v1.23)
886886
* [`azureDisk`](/docs/concepts/storage/volumes/#azuredisk) - Azure Disk
887887
(**migration on by default** starting v1.23)
888888
* [`azureFile`](/docs/concepts/storage/volumes/#azurefile) - Azure File
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: with-affinity-preferred-weight
5+
spec:
6+
affinity:
7+
nodeAffinity:
8+
requiredDuringSchedulingIgnoredDuringExecution:
9+
nodeSelectorTerms:
10+
- matchExpressions:
11+
- key: kubernetes.io/os
12+
operator: In
13+
values:
14+
- linux
15+
preferredDuringSchedulingIgnoredDuringExecution:
16+
- weight: 1
17+
preference:
18+
matchExpressions:
19+
- key: label-1
20+
operator: In
21+
values:
22+
- key-1
23+
- weight: 50
24+
preference:
25+
matchExpressions:
26+
- key: label-2
27+
operator: In
28+
values:
29+
- key-2
30+
containers:
31+
- name: with-node-affinity
32+
image: registry.k8s.io/pause:2.0

0 commit comments

Comments
 (0)