File tree Expand file tree Collapse file tree 5 files changed +53
-0
lines changed
biometric-nbi/src/kubernetes Expand file tree Collapse file tree 5 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ Biometric Backend
88#### Helm
99#### Kubernetes
1010see https://github.com/ObrienlabsDev/biometric-backend/tree/main/biometric-nbi/src/kubernetes
11+
12+ The following script runs both the mysql and biometric-nbi springboot containers
13+
1114```
1215kubernetes % ./deploy.sh
1316(venv-t214) michaelobrien@mbp8 kubernetes % kubectl get pods -n mysql
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : biometric-nbi
5+ labels :
6+ app : biometric-nbi
7+ spec :
8+ replicas : 1
9+ selector :
10+ matchLabels :
11+ app : biometric-nbi
12+ template :
13+ metadata :
14+ labels :
15+ app : biometric-nbi
16+ spec :
17+ containers :
18+ - name : biometric-nbi
19+ image : obrienlabs/biometric-nbi:latest
20+ ports :
21+ - containerPort : 8080
22+ env :
23+ - name : SPRING_DATASOURCE_URL
24+ value : jdbc:mysql://mysql.mysql.svc.cluster.local:3306/biometric
25+ - name : SPRING_DATASOURCE_USERNAME
26+ value : root
27+ - name : SPRING_DATASOURCE_PASSWORD
28+ value : password
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : biometric-nbi
5+ labels :
6+ app : biometric-nbi
7+ spec :
8+ type : NodePort
9+ selector :
10+ app : biometric-nbi
11+ ports :
12+ - protocol : TCP
13+ port : 8080
14+ targetPort : 8080
15+ nodePort : 30888
Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ kubectl apply -f mysql-storage.yaml
55kubectl apply -f mysql-secret.yaml
66kubectl apply -f mysql-deployment.yaml
77kubectl apply -f mysql-service.yaml
8+ # job to create and populated the database
9+ kubectl apply -f biometric-nbi-springboot-deployment.yaml
10+ kubectl apply -f biometric-nbi-springboot-service.yaml
11+
12+
813
914
1015# kubectl get namespaces
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ kubectl delete -f biometric-nbi-springboot-service.yaml
4+ kubectl delete -f biometric-nbi-springboot-deployment.yaml
35kubectl delete -f mysql-service.yaml
46kubectl delete -f mysql-deployment.yaml
57kubectl delete -f mysql-secret.yaml
You can’t perform that action at this time.
0 commit comments