Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5f2da47

Browse filesBrowse files
committed
add docs for PodTopologyLabelsAdmission feature
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
1 parent 6e84135 commit 5f2da47
Copy full SHA for 5f2da47

File tree

Expand file treeCollapse file tree

2 files changed

+32
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+32
-0
lines changed
Open diff view settings
Collapse file

‎content/en/docs/concepts/scheduling-eviction/assign-pod-node.md‎

Copy file name to clipboardExpand all lines: content/en/docs/concepts/scheduling-eviction/assign-pod-node.md
+28Lines changed: 28 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,34 @@ overall utilization.
675675
Read [Pod topology spread constraints](/docs/concepts/scheduling-eviction/topology-spread-constraints/)
676676
to learn more about how these work.
677677

678+
## Pod topology labels
679+
680+
{{< feature-state feature_gate_name="PodTopologyLabelsAdmission" >}}
681+
682+
Pods inherit the topology labels (`topology.kubernetes.io/zone` and `topology.kubernetes.io/region`) from their assigned Node if those labels are present. These labels can then be utilized via the Downward API to provide the workload with node topology awareness.
683+
684+
Here is an example of a Pod using downward API for it's zone and region:
685+
```yaml
686+
apiVersion: v1
687+
kind: Pod
688+
metadata:
689+
name: pod-with-topology-labels
690+
spec:
691+
containers:
692+
- name: app
693+
image: alpine
694+
command: ["sh", "-c", "env"]
695+
env:
696+
- name: MY_ZONE
697+
valueFrom:
698+
fieldRef:
699+
fieldPath: metadata.labels['topology.kubernetes.io/zone']
700+
- name: MY_REGION
701+
valueFrom:
702+
fieldRef:
703+
fieldPath: metadata.labels['topology.kubernetes.io/region']
704+
```
705+
678706
## Operators
679707

680708
The following are all the logical operators that you can use in the `operator` field for `nodeAffinity` and `podAffinity` mentioned above.
Collapse file

‎content/en/docs/reference/command-line-tools-reference/feature-gates/PodTopologyLabelsAdmission.md‎

Copy file name to clipboardExpand all lines: content/en/docs/reference/command-line-tools-reference/feature-gates/PodTopologyLabelsAdmission.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ stages:
99
- stage: alpha
1010
defaultValue: false
1111
fromVersion: "1.33"
12+
toVersion: "1.34"
13+
- stage: beta
14+
defaultValue: true
15+
fromVersion: "1.35"
1216
---
1317
Enables the `PodTopologyLabels` admission plugin.
1418
See [Pod Topology Labels](docs/reference/access-authn-authz/admission-controllers#podtopologylabels)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.