How to select a specific physical location
Our clusters extends to multiple locations in NYU. If you want, you can choose to have your workloads run in specific buildings by adding a nodeSelector
to your workloads with the label topology.kubernetes.io/zone
.
For example:
apiVersion: v1
kind: Pod
metadata:
name: edge-compute
spec:
containers:
- name: python:3.10
nodeSelector:
topology.kubernetes.io/zone: "wwh"
Another option is nodeAffinity
, which is more verbose but a little more powerful:
apiVersion: v1
kind: Pod
metadata:
name: edge-compute
spec:
containers:
- name: python:3.10
affinity:
nodeAffinity:
# Prefer running in 60fifthave
preferredDuringSchedulingIgnoredDuringExecution
- weight: 1
preference:
matchExpressions:
- key: topology.kubernetes.io/zone
operator: In
values:
- "60fifthave"
# Only run in either 60fifthave or 7e12
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: topology.kubernetes.io/zone
operator: In
values:
- "60fifthave"
- "7e12"
The zones available for your use are:
Zone | Number of machines | Location |
---|---|---|
rcdc |
16 | Data Center in Secaucus New Jersey |
7e12 |
4 | 7 East 12th St (Union Square) |
60fifthave |
3 | 60 Fifth Ave (Union Square) |
wwh |
3 | Warren Weaver Hall, 251 Mercer St (Washington Square) |
12wvpl |
5 | 12 Waverly Place (Washington Square) |
meyer |
1 | 4 Washington Place (Washington Square) |
370j |
4 | 370 Jay St (Downtown Brooklyn) |
2mt |
1 | 2 MetroTech Center (Downtown Brooklyn) |
See also Assigning Pods to Nodes in the official Kubernetes documentation.
Make sure to use quotes around 7e12
If you put 7e12
in YAML, it will be recognized as the number 7000000000000.0
.
You need to put quotes around it: "7e12"