DevOps

Posts about DevOps, infrastructure, Kubernetes, CI/CD, and cloud.

Using sidecar containers in k8s

Using sidecar containers in k8s

· 3 min read

Pods are the basic unit of deployment in k8s and in a typical k8s setup, your application container is probably running inside a pod. Pods themselves are containers, and you can run multiple containers sharing the same volume and network interfaces of the pod concurrently. This is called the sidecar pattern. We run an emr django application connected to a RDS postgres database using RDS IAM auth. To make this work, we run a cronjob which generates a token every 10 minutes which is used by the a

Moving from AWS Loadbalancers to Nginx

Moving from AWS Loadbalancers to Nginx

· 2 min read

We run a k8s cluster for our healthcare EMR application. At the time, we only had one public facing service, so we used a Kubernetes Service of Type LoadBalancer. resource "kubernetes_service" "django" { metadata { name = "django" namespace = kubernetes_namespace.app_namespace.metadata[0].name annotations = tomap( { "service.beta.kubernetes.io/aws-load-balancer-ssl-cert" = var.django_acm_arn, "service.beta.kubernetes.io/aws-load-balancer-ssl-por

Connecting Django to RDS via pgbouncer using IAM auth

Connecting Django to RDS via pgbouncer using IAM auth

· 3 min read

Setting up the infra We primarily use a django backend with RDS postgres in a kubernetes cluster for production environments. We were trying to setup an environment which would be HIPAA compliant and secure as well, as well as keep complexity to a minimum in the backend layer.  We decided to go with IAM authentication to connect to RDS for the django application. The tricky part was to figure out how we would add pgbouncer between RDS and django to manage connection pooling issues. We setup a