Files
coal/k8s/base/api.yaml
2023-08-12 14:56:06 +08:00

60 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: coal-api
labels:
app: coal-api
spec:
replicas: 1
selector:
matchLabels:
app: coal-api
template:
metadata:
name: coal-api
labels:
app: coal-api
spec:
containers:
- name: coal-api
image: coal
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 7456
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 7456
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 3
ports:
- containerPort: 7456
env:
- name: PG_HOST
value: ""
- name: REDIS_HOST
value: ""
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: coal-api
spec:
selector:
app: coal-api
ports:
- protocol: TCP
port: 7456
targetPort: 7456
type: ClusterIP