1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# test-node-selector.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/instance: test
app.kubernetes.io/name: example
name: test-node-selector
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: test
app.kubernetes.io/name: example
template:
metadata:
labels:
app.kubernetes.io/instance: test
app.kubernetes.io/name: example
spec:
containers:
- args:
- |
sleep 100;
echo hell0;
command:
- /bin/bash
- -c
image: busybox:latest
imagePullPolicy: IfNotPresent
name: busybox
resources:
limits:
cpu: "1"
memory: "6G"
requests:
cpu: "1"
memory: "30Mi"
nodeSelector:
node-role.kubernetes.io/some-role: ""
|