add kubernetes configuration

This commit is contained in:
sid palas
2023-02-10 09:54:56 -05:00
parent 4b29fb6534
commit f8dda04c6f
8 changed files with 184 additions and 1 deletions

View File

@ -0,0 +1,56 @@
apiVersion: v1
kind: Service
metadata:
name: api-node
spec:
selector:
app: api-node
ports:
- protocol: TCP
port: 3000
targetPort: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-node
labels:
app: api-node
spec:
replicas: 1
selector:
matchLabels:
app: api-node
template:
metadata:
labels:
app: api-node
spec:
containers:
- name: api-node
image: sidpalas/devops-directive-docker-course-api-node:8
env:
- name: PORT
value: "3000"
envFrom:
- secretRef:
name: database-url
ports:
- containerPort: 3000
protocol: TCP
readinessProbe:
httpGet:
path: /ping
port: 3000
resources:
limits:
memory: "100Mi"
requests:
memory: "100Mi"
cpu: "50m"
securityContext:
allowPrivilegeEscalation: false
privileged: false
securityContext:
seccompProfile:
type: RuntimeDefault