k3s部署项目
This commit is contained in:
60
k8s/deployment.yaml
Normal file
60
k8s/deployment.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: data-engine
|
||||
namespace: default
|
||||
labels:
|
||||
app: data-engine
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: data-engine
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: data-engine
|
||||
spec:
|
||||
containers:
|
||||
- name: data-engine
|
||||
image: data-engine:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3001
|
||||
protocol: TCP
|
||||
name: http
|
||||
env:
|
||||
- name: TZ
|
||||
value: "Asia/Seoul"
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /usr/local/bin/app/config.yml
|
||||
subPath: config.yml
|
||||
- name: log-volume
|
||||
mountPath: /usr/local/bin/app/resource/log
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "1000m"
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 3001
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 3001
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: report-engine-config
|
||||
- name: log-volume
|
||||
emptyDir: {}
|
||||
restartPolicy: Always
|
||||
Reference in New Issue
Block a user