67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: student-frontend
|
||
|
|
namespace: student-enrollment
|
||
|
|
labels:
|
||
|
|
app: student-frontend
|
||
|
|
spec:
|
||
|
|
replicas: 2
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: student-frontend
|
||
|
|
strategy:
|
||
|
|
type: RollingUpdate
|
||
|
|
rollingUpdate:
|
||
|
|
maxSurge: 1
|
||
|
|
maxUnavailable: 0
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: student-frontend
|
||
|
|
spec:
|
||
|
|
containers:
|
||
|
|
- name: frontend
|
||
|
|
image: docker.io/library/academia-frontend:v2
|
||
|
|
imagePullPolicy: IfNotPresent
|
||
|
|
ports:
|
||
|
|
- containerPort: 80
|
||
|
|
name: http
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
memory: "64Mi"
|
||
|
|
cpu: "50m"
|
||
|
|
limits:
|
||
|
|
memory: "128Mi"
|
||
|
|
cpu: "200m"
|
||
|
|
livenessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /
|
||
|
|
port: 80
|
||
|
|
initialDelaySeconds: 10
|
||
|
|
periodSeconds: 30
|
||
|
|
readinessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /
|
||
|
|
port: 80
|
||
|
|
initialDelaySeconds: 5
|
||
|
|
periodSeconds: 10
|
||
|
|
securityContext:
|
||
|
|
runAsNonRoot: false
|
||
|
|
allowPrivilegeEscalation: false
|
||
|
|
---
|
||
|
|
apiVersion: v1
|
||
|
|
kind: Service
|
||
|
|
metadata:
|
||
|
|
name: student-frontend
|
||
|
|
namespace: student-enrollment
|
||
|
|
spec:
|
||
|
|
selector:
|
||
|
|
app: student-frontend
|
||
|
|
ports:
|
||
|
|
- port: 80
|
||
|
|
targetPort: 80
|
||
|
|
name: http
|
||
|
|
type: ClusterIP
|