Tagged: Kubernetes

K8s: Stopping kube-system pods from preventing cluster scale-down

I’m now at the point where I run a fair few production services from Kubernetes, the most successful being departureboard.io and the departureboard.io API. To make sure I can meet the fluctuating demand for these services, in a cost-efficient fashion, I take advantage of the Kubernetes Cluster Autoscaler. I won’t go into too much detail about how this works, but in short, it enables my cluster to automatically scale up if the total resource requests from my application pods exceed the available capacity in the cluster.

Kubernetes Cronjob: Automated MySQL database backups

Update: This project has been renamed to kubernetes-s3-mysql-backup, which better describes its function. The remainder of the post remains accurate. As mentioned in my last post about my Kubernetes Architecture. I recently started investigating how I could perform regular backups of the MySQL database that sits behind this blog. The goal was to have an automated backup taken at least once every 24 hours, saved to a durable location external to my current hosting provider.

This blog now runs on Kubernetes: Here's my architecture

As I alluded too in my previous post, I’ve recently been working in moving my blog (and all of my services) to Kubernetes. Up until this point, I’ve been running all of my services in containers, but on specific machines with Docker installed. I had a pretty sophisticated and automated deployment process but it was only ever an interim solution before I delved into Kubernetes. The decision to move to Kubernetes was further expedited by being given access to the Digital Ocean Kubernetes Limited Availability Preview.

Kubernetes & ingress-nginx: Performing HTTP Redirects

I’ve recently been doing a lot of work with Kubernetes (in fact, this whole blog now runs on Kubernetes, with more posts to follow). To avoid lots of load balancer charges, I’ve been using ingress-nginx. This allows me to have one load balancer for all of my web traffic (pointing to the ingress-nginx service) and offload traffic to the appropriate backend based on ingress definitions. The below diagram shows how this works.