OpenStack host maintenance and upgrade in interaction with application on top of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 lines
1.1 KiB

apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: demo-ha
labels:
app: demo-ha
spec:
replicas: 2
selector:
matchLabels:
app: demo-ha
template:
metadata:
labels:
app: demo-ha
active: None
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- demo-ha
topologyKey: "kubernetes.io/hostname"
spec:
containers:
- name: nginx
image: nginx
resources:
requests:
cpu: "15"
ports:
- containerPort: 80
volumeMounts:
- name: workdir
mountPath: /usr/share/nginx/html
initContainers:
- name: install
image: busybox
command:
- wget
- "-O"
- "/work-dir/index.html"
- http://kubernetes.io
volumeMounts:
- name: workdir
mountPath: "/work-dir"
dnsPolicy: Default
volumes:
- name: workdir
emptyDir: {}