34 lines
769 B
YAML
34 lines
769 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: main-server
|
|
namespace: online-back
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: main-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: main-server
|
|
spec:
|
|
containers:
|
|
- name: main-server
|
|
image: main-app:k8s-lesson
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 5050
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 5050
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: public-storage
|
|
mountPath: /app/public
|
|
volumes:
|
|
- name: public-storage
|
|
persistentVolumeClaim:
|
|
claimName: main-app-public-pvc
|