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.

62 lines
1.3 KiB

apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-webui-frontend
namespace: k8s-webui
spec:
replicas: 1
selector:
matchLabels:
app: k8s-webui-frontend
template:
metadata:
labels:
app: k8s-webui-frontend
spec:
containers:
- name: frontend
image: k8s-webui-frontend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: http
env:
- name: NODE_ENV
value: "production"
- name: BACKEND_URL
value: "http://k8s-webui-backend:3001"
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: k8s-webui-frontend
namespace: k8s-webui
spec:
selector:
app: k8s-webui-frontend
ports:
- port: 3000
targetPort: http
name: http
type: ClusterIP