antiaffinities and namespaces

This commit is contained in:
2021-10-16 18:23:19 +02:00
parent f006923f61
commit 688485987f
5 changed files with 45 additions and 50 deletions

View File

@@ -2,8 +2,10 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs-hdd-ebin01
namespace: live-infra
labels:
app: nfs-hdd-ebin01
service: nfs
spec:
replicas: 1
strategy:
@@ -30,6 +32,16 @@ spec:
value: ebin01
- name: NFS_PATH
value: /data/raid1-hdd/k8s-data
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: service
operator: In
values:
- nfs
topologyKey: kubernetes.io/hostname
volumes:
- name: nfs-client-root
nfs: