-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·33 lines (23 loc) · 952 Bytes
/
run.sh
File metadata and controls
executable file
·33 lines (23 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh
set -x
k3d cluster create demo-cluster
docker build -t task-producer -f Dockerfile-producer .
docker build -t task-consumer -f Dockerfile-consumer .
k3d image import task-producer --cluster demo-cluster
k3d image import task-consumer --cluster demo-cluster
echo "taskpassword" > postgres-password.txt
kubectl create secret generic postgres-secret --from-file=password=postgres-password.txt
kubectl create secret generic postgres-secret \
--from-literal=host=postgres-service \
--from-literal=port=5432 \
--from-literal=dbName=taskdb \
--from-literal=user=taskuser \
--from-literal=password=taskpassword \
--from-literal=sslmode=disable
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm install keda kedacore/keda
kubectl apply -f postgres-deployment.yaml
kubectl apply -f task-producer-deployment.yaml
kubectl apply -f task-consumer-deployment.yaml
kubectl apply -f keda-scaledobject.yaml