前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
apiVersion: apps/v1beta1 kind: Deployment metadata: name: affinity labels: app: affinity spec: replicas: 3 revisionHistoryLimit: 10 template: metadata: labels: app: affinity spec: containers: - name: nginx image: nginx:1.7.9 ports: - name: http containerPort: 80 affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - busybox-pod topologyKey: kubernetes.io/hostname