Hi, I'm Hugo running on K8s, did you miss me?

Welcome to my blog !


11 Working With Compute Resource Requests and Limits

Published at November 10, 2021 ·  7 min read

A long time ago, in a blog post far, far away… …we talked about Resource Quotas and set Object limits to our new Namespace called Playpen. In this post, we will look at Compute Resource Requests and Limits. Compute Resource Requests and Limits Before we proceed it is good to understand the difference between a request and a limit. As the name suggests, both are used to control resources, such as CPU and Memory, and are set on a contrainer level....

10 Working With Namespaces

Published at August 9, 2021 ·  5 min read

Today, we will look at Namespaces. Namespaces give us an option to divide our Kubernetes cluster to multiple virtual clusters. This may be useful if you want to create different environments, for example for Prod, Dev, and Test, or if you want to assign specific permissions and policies to users. It also allows you to define resource quotas, defining how many resources can a given namespace use. Default Namespace Before we start creating custom namespaces, we can have a look at namespaces that already exist in our cluster by running kubectl get namespaces command:...

9 Blue/Green and Canary Deployments

Published at July 25, 2021 ·  5 min read

Previously, we talked about Rolling Updates and how we are able to update the application with zero downtime. In that scenario, all old pods were gradually replaced by new pods running the updated version of our application. While this method was very efficient, it did not really allow us to perform any kind of testing of the updated application in the new setting, and in case of a failure, our only option was to fully roll back....

8 Configuring Update Strategies

Published at June 30, 2021 ·  9 min read

One thing I did not talk about yet is how I keep the website updated. This is what we will discuss in today’s post. Current update process I am a firm believer in KISS rule (Keep It Simple, Stupid), especially when I am working with new technologies. While I will be looking at automating this process at some stage, for now I update my blog by executing 5 simple steps:...

7 Configuring Topology Spread Constraints

Published at June 15, 2021 ·  6 min read

In previous post, we have scaled our deployment by defining number of replicas required but we weren’t able to control where they get deployed. Today, we’ll look into this further. Understanding default restart behaviour It is important to note that if a node fails, pods running on that node are scheduled for deletion. Pods only get scheduled on a node once, when they are created, and remain running on that node until it stops or is terminated....

6 Creating a Deployment

Published at June 9, 2021 ·  5 min read

Our website is now running and we can access it, however it is running in a single pod. That means that if it fails, our website will be down. To prevent this, we need to introduce some self-healing and scaling, and that’s why we’ll create a Deployment. Working with Deployments Before we create a Deployment, let’s have a look what happens when we delete our single pod: katarinabrookfield@KatsMac hugo-site % kubectl get pod hugo-site-pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES hugo-site-pod 1/1 Running 0 27h 10....

5 Creating a Loadbalancer

Published at June 7, 2021 ·  2 min read

Our pod is now running but we need to be able to connect to it. To do that, we will deploy a Service. One of the reasons why we are running this on a cloud-based cluster is the ability to deploy load-balancers. I know what you are thinking; “Why are we deploying a load-balancer for a single pod?". At this stage, we’re doing it to prepare for next steps which will include scaling-out of our application....

4 Creating a Pod

Published at June 7, 2021 ·  1 min read

We are now ready to deploy our Hugo app. To start, we will create a single Pod. Create a pod Create a file called pod.yml: katarinabrookfield@KatsMac hugo-site % vi pod.yml Enter the following info into the pod.yml file: apiVersion: v1 kind: Pod metadata: name: hugo-site-pod labels: project: hugo-site spec: containers: - name: web-ctr image: katbrookfield/hugo-site ports: - containerPort: 8080 Deploy the app Run the following command to deploy the app:...

3 Creating a Linode Kubernetes Cluster

Published at June 7, 2021 ·  2 min read

In previous post, we have containerized Hugo and pushed the image to our Docker Hub registry. Now we need a Kubernetes cluster to run this container on. There are several options, from using local kind, building your own Kubernetes cluster to multiple cloud offerings. I will be using Linode to host my Kubernetes cluster as it is a simple and cost-effective solution that allows me to run this test app, as well as to deploy load-balancers and other tools further down the line....

2 Creating a Docker Container

Published at June 7, 2021 ·  3 min read

Now that we have Hugo site created locally, we need to put it in a container. You don’t have to use Docker as your container runtime but it still seems to be the most popular option so I’m going to stick to it. Creating a Docker file I have tried to write the Dockerfile from scratch, however it is still not working exactly how I want it to. I will keep working on it and once done, I will publish an update....