2019-03-19 14:06:12 +02:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
|
|
|
name: game-web
|
|
|
|
labels:
|
|
|
|
originalLabel : isHere
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2019-05-21 17:54:55 +03:00
|
|
|
app: nginxo # has to match .spec.template.metadata.labels
|
|
|
|
serviceName: "nginxo"
|
2019-03-19 14:06:12 +02:00
|
|
|
replicas: 3 # by default is 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2019-05-21 17:54:55 +03:00
|
|
|
app: nginxo # has to match .spec.selector.matchLabels
|
2019-03-19 14:06:12 +02:00
|
|
|
spec:
|
|
|
|
terminationGracePeriodSeconds: 10
|
|
|
|
containers:
|
2019-05-21 17:54:55 +03:00
|
|
|
- name: nginxo
|
2019-03-19 14:06:12 +02:00
|
|
|
image: k8s.gcr.io/nginx-but-no-slim:0.8
|
|
|
|
ports:
|
|
|
|
- containerPort: 8780
|
|
|
|
name: webp
|
|
|
|
volumeMounts:
|
|
|
|
- name: www
|
2019-05-21 17:54:55 +03:00
|
|
|
mountPath: /usr/share/nginxo/html
|
2019-03-19 14:06:12 +02:00
|
|
|
volumeClaimTemplates:
|
|
|
|
- metadata:
|
|
|
|
name: www
|
|
|
|
spec:
|
|
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
|
|
storageClassName: "my-storage-class"
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|