26 lines
495 B
YAML
26 lines
495 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: red
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: red
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: red
|
|
spec:
|
|
containers:
|
|
- image: nginx
|
|
name: nginx
|
|
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: node-role.kubernetes.io/master
|
|
operator: Exists
|