My simple web app, deploy using containerization for Dev-ops learning
- Flask
- WGIS
- Containerization (Docker, Kubernetes, Minikube)
- SQL (Postgres)
This simple webapp provided user's interface for sign up and sign in. Using Flask (python). Containerized app with docker and deploy on Kubernetes.
-
Install docker, kubernetes, and minikube
-
Create namespace
kubectl create namespace webapp
- Deploy Postgres server to Kubernetes
kubectl apply -f ./k8s/database-postgres -n webapp
NOTE: Postgres server ClusterIP have to be hard coded.
-
Create database following file
./db/schema.sql
using provided user name and password created in k8s secret. -
(Optional) Created docker image and push to registry. Add SQL_URI (AlchemySQL connection URI) to docker enviroment variable.
-
Create deployment for webapp. using created docker image (Currently my docker image)
kubectl apply -f ./k8s/web-app -n webapp
- Verify deployment, service
kubectl get depolyment -n webapp
kubectl get service -n webapp
NOTE: Using
minkibe tunnel
if LoadBalancer not exposes External-IP