Software, Cloud & DevOps


Hi! My name is Kim Lehtinen, and I’m a Software Engineer. I’m currently on a journey of specialising in backend development, and learning Cloud Native technologies. These technologies are truly powerful and changing the computing world. Here you can follow along on my journey where I write about things I’ve learned lately.

Task-based containers using Kubernetes Jobs

Containers Kubernetes
Containers are widely used for deploying and running applications. There are several benefits for containerizing applications. They offer a consistent environment for applications to be deployed to together with their dependencies. Containers are able to isolate workloads, and guarantee a certain amount of resources for each workload. In addition, they can be created fast, on the fly. This makes containers good for running resource-intensive workloads. Why not just use serverless? Serverless functions are great for events and on-demand services, and would probably be my first choice for smaller tasks.

Read More →

Flask Unit Testing

Flask Python
For the longest time I haven’t found good examples online on how to unit test Flask applications. Especially when following clean architecture, and when using dependency injection. That is why I decided to write this post. Flask is a minimalistic web framework, so I understand that most examples are small and simple. However, I know there are people out there building larger and more complex applications that requires good quality code, clean architecture and maintainability over time.

Read More →

Flask database migrations using Flask-Migrate

Flask Python
Flask-Migrate is a python package that configures SQLAlchemy and Alembic for your Flask application. Alembic is the migration tool that actually takes care of database migrations under the hood. It can automatically generate migration files based on database schema models, and apply those migrations to databases. This is truly powerful, since it enables you to have a single source of truth and a history of your database changes in source control.

Read More →

Python Flask Dependency Injection

Flask Python
One the best features of Flask is that it’s a “microframework”, meaning it’s easy to get started and to extend as the project grows. However, sometimes projects grow so large that it becomes hard to maintain all the dependencies and coupling between components. This is where dependency injection can help, by decoupling components and dependencies. This will make the code more reusable and easier to test through mocking the interfaces that a component uses.

Read More →

Local Kubernetes cluster using kubeadm and Weave Ignite

Kubernetes
As someone who is just learning Kubernetes, I want a local cluster where I can learn the basics of Kubernetes by testing and breaking things! I have lately been testing different tools for creating local kubernets clusters, and there are many good tools for doing so. However, many of them only spin up a single node cluster, I wanted multiple nodes. In addition, many tools make it difficult to control the amount of ram and cpu in each node.

Read More →