kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch19/numbers/web.yaml

36 lines
773 B
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: numbers-web
labels:
kiamol: ch19
app: numbers
spec:
selector:
matchLabels:
app: numbers
component: web
template:
metadata:
labels:
app: numbers
component: web
spec:
containers:
- name: web
image: kiamol/ch03-numbers-web
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- numbers
- key: component
operator: In
values:
- api
topologyKey: "kubernetes.io/hostname"