Containerizing Django Unchained on Kubernetes

akugel | Dec. 12, 2022, 3:56 p.m.

Time passes, things change, and evaluation is required. Recently I've been working on containerizing this website. This will result in a more cloud native application that is resilient and scalable.

First, I need to provision a cluster. I have decided to go with aks, as azure not chagrin for the control plane makes this the most cost effective option. I provision the cluster using the terraform code here.

Next comes the kubernetes manifests. These are represented by this repository. Two deployments for the postgres db and the django application. Two respective services, a configmap, and ingress to route traffic to the services. I decided to use the managed-csi storageclass.

Tying this all together is a bash script that kicks off everything. I may move this to a github actions pipeline at some point, I’m not sure yet.

The end result is a completely containerized django unchained website running on aks in azure? I still need to figure out how to get https working on the ingress controller. That will be the next todo.

Leave a comment

About Me

I'm Anthony Kugel, a cloud engineer and freelance web developer. I made this site with the help of djangocentral.com.

LinkedIn
What I'm listening To