1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: whoami
- labels:
- run: whoami
- spec:
- ports:
- - port: 80
- protocol: TCP
- selector:
- run: whoami
- type: LoadBalancer
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: whoami
- spec:
- selector:
- matchLabels:
- run: whoami
- replicas: 2
- template:
- metadata:
- labels:
- run: whoami
- spec:
- # affinity:
- # podAntiAffinity:
- # requiredDuringSchedulingIgnoredDuringExecution:
- # - labelSelector:
- # matchExpressions:
- # - key: app
- # operator: In
- # values:
- # - whoami
- # topologyKey: kubernetes.io/hostname
- containers:
- - name: whoami
- image: traefik/whoami
- ports:
- - containerPort: 80
|