ahervias77 / flask-website

Dockerized version of my website running on Flask
0 stars 0 forks source link

flask-website

https://www.ahervias.dev

Docker Build Status Website Status

Requirements

Setting up the environment

DigitalOcean

Set up Kubernetes cluster

Create a deployment and expose it with a load balancer

Take note of the load balancer IP address and add it to the terraform.tfvars file

Terraform

terraform init

terraform plan - Stage changes to Cloudflare infrastructure (DNS records)

terraform apply - Push changes to Cloudflare infrastructure

terraform destroy - Remove all Cloudflare infrastructure

Updates

kubectl scale deployments/flask-deployment --replicas=# - Scale deployment to specified # of pods

kubectl set image deployments/flask-deployment flask-website=ahervias77/flask-website:tag - Rolling update

kubectl rollout status deployments/flask-deployment - Rollout status

kubectl rollout undo deployments/flask-deployment - Undo rolling update

Logging

LogDNA Agent v2 Setup: https://docs.logdna.com/docs/logdna-agent-kubernetes

Datadog: https://docs.datadoghq.com/agent/kubernetes/?tab=helm