first commit
This commit is contained in:
30
affinity/pod-affinity.yaml
Normal file
30
affinity/pod-affinity.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: web-disk
|
||||
labels:
|
||||
app: web-disk
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: web-disk
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: web-disk
|
||||
spec:
|
||||
containers:
|
||||
- name: web-disk
|
||||
image: nginx:latest
|
||||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- app-disk
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
Reference in New Issue
Block a user