summaryrefslogtreecommitdiff
path: root/kubernetes/app-deployment.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/app-deployment.yaml')
-rw-r--r--kubernetes/app-deployment.yaml56
1 files changed, 56 insertions, 0 deletions
diff --git a/kubernetes/app-deployment.yaml b/kubernetes/app-deployment.yaml
new file mode 100644
index 0000000..bfc77ec
--- /dev/null
+++ b/kubernetes/app-deployment.yaml
@@ -0,0 +1,56 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: app-deployment
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: app
+ template:
+ metadata:
+ labels:
+ app: app
+ spec:
+ containers:
+ - name: app
+ image: "<link of docker image>"
+ ports:
+ - containerPort: 5000
+ env:
+ - name: RABBITMQ_HOST
+ value: "<rabbitmq-public-ip>"
+ - name: RABBITMQ_PORT
+ value: "5672"
+ readinessProbe:
+ httpGet:
+ path: /health
+ port: 5000
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ livenessProbe:
+ httpGet:
+ path: /health
+ port: 5000
+ initialDelaySeconds: 15
+ periodSeconds: 20
+ resources:
+ requests:
+ cpu: "200m"
+ memory: "256Mi"
+ limits:
+ cpu: "500m"
+ memory: "512Mi"
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: app-service
+spec:
+ selector:
+ app: app
+ ports:
+ - protocol: TCP
+ port: 80
+ targetPort: 5000
+ type: LoadBalancer