Simple dockerized application that can be deployed to kubernetes
- Linux or MacOS
- Python 3.x
- pip3 (
python3 -m pip install --upgrade pip
) - flask (
python3 -m pip install flask
)
- pip3 (
- AWS credentials configured so you can get your terraform resources created
- Docker
- kubectl
- Terraform
- Minikube
Create two secrets in Secret Manager with the RDS user and password to be used
- rds_pass
- rds_user
cd terraform
terraform init
terraform plan -var-file="dev"
terraform apply -var-file="dev"
# terraform destroy -var-file="dev"
export FLASK_APP=app.py
export FLASK_ENV=development
python app/app.py
docker build . -t docker build . -t androzo/hello-app-image
docker push androzo/hello-app-image:latest
docker run -it -p 8080:8080 androzo/hello-app-image
(Optional) Install minikube
chmod +x scripts/install-minikube.sh
scripts/install-minikube.sh
Deployment
kubectl apply -f k8s
# destroy => kubectl delete -f k8s