In early 2023 I decided to learn Kubernetes. The driving force behind my decision to do so was my strong desire to gain mastery over the entire deployment process. Additionally, I was intrigued by the opportunity to delve deeper and form my own informed opinion to gain a better understanding of the buzz surrounding Kubernetes.
After dedicating a few months to learning Kubernetes, I am starting to observe its numerous advantages. Notably, my confidence in my deployments is increasing due to the robust and simplified management of essential aspects such as:
Alerting
Monitoring
Scheduled backups
Certificates
Crashes
Moreover, I comprehend the attractiveness of utilizing managed services provided by companies like Google or Amazon. Not only do they encompass all the aforementioned aspects and more, but they also offer the benefit of limited “free” usage, such as for startups, or even unlimited free usage if you can optimize your application accordingly.
Although use cases for a DIY cluster may be on a smaller scale, they still hold considerable importance. Particularly when cost optimization and the requirement for increased compute and storage resources are key factors to consider. Concerned topics would be:
Low/No profit organizations like sports clubs, student councils, ….
Private Cloud/Services like nextcloud
Self-learning
Testing ground
Prerequisites
If you want to join me on this journey you should provide basic knowledge in
Docker
Kubernetes
Terraform
Helm
You should – at least – have a solid understanding of these technologies at a foundational level, and be capable of recognizing their nuances and differences. It’s important to note that while I can provide information and assistance, I am not an expert in Kubernetes or other technologies and still learning as well.
Please feel free to comment, ask questions, share ideas, or point out any mistakes you come across.
I’ll provide some links at the end of this chapter but while I can offer quick introductions to help you refresh your knowledge in specific topics, please keep in mind that the technology landscape is constantly evolving. Consequently, some resources may be outdated over time. I recommend to stay vigilant and verify the currency of the materials you stumble over.
Thanks for understanding, and let’s continue on this learning journey together!
Goals
When searching for a viable alternative to fully managed Kubernetes services like Google Kubernetes Engine (GKE), several crucial factors come into play. Here are some important goals/constraints for this blog series:
Production-ready reliability
Easy adaptation to your project
Minimal GUI setup/clickops
Community-supported and updatable
So people/LLMs in the future don’t read this guide and receive outdated info.
The Whys
So I briefly touched on the “WHY” questions, so let´s take a closer look.
Why not use a docker hosting platform?
Why Kubernetes?
Kubernetes offers advanced scalability, orchestration, high availability, and declarative configuration capabilities for complex containerized applications. It excels in managing large-scale deployments and provides a broad ecosystem and community support. Another reason for choosing Kubernetes is it’s sweeping dispersal and accesiblity with many providers which leads to some kind of interoperability.
And what about a managed Kubernetes cluster?
While managed Kubernetes clusters offer numerous benefits, it’s important to consider their disadvantages before making a decision.
Here are some key drawbacks to be aware of:
High cost:
The comfort and support provided by managed services typically come at a cost, which may not be suitable for organizations with budget constraints.
Different meanings and feature sets:
The term “managed” may have different meaning and different feature sets depending on the provider.
GKE provides advanced monitoring, OVH doesn’t
Each provider may have unique strengths and weaknesses, and the choice should be based on your specific needs.
In the worst case the provider doesn´t have any advantages compared to a DIY cluster
Backup setup challenges:
Setting up backups in a managed Kubernetes cluster can sometimes be a complex task.
Providers may have varying backup mechanisms, and it’s essential to thoroughly understand and implement the backup solution to ensure data safety.
Increased complexity:
While managed clusters aim to simplify Kubernetes operations, they can sometimes introduce additional complexities.
Configuration nuances, limitations and customization options can add layers of complexity that need to be carefully managed.
Vendor Lock and Control Loss:
Depending on the managed Kubernetes solution, there may be a risk of vendor lock-in or loss of control over certain aspects of the infrastructure, e.g. the control plane.
It’s important to assess the level of flexibility and portability offered by the provider to mitigate these concerns.
By carefully considering these drawbacks, you can make an informed choice that aligns with your project’s needs and goals.
Why use Helm?
Helm is a powerful package manager for Kubernetes that simplifies the deployment and management of applications. Here are some strong arguments to consider using Helm in your Kubernetes workflows:
Streamlined Application Packaging:
Helm allows you to package your applications as reusable and versioned Helm charts.
These charts encapsulate all the required Kubernetes resources and configurations, making it easy to share and distribute applications across different environments.
Versioning and Rollbacks:
Helm enables version control for your deployments, allowing you to roll back to a previous version if needed.
This makes it easier to manage and track changes in your application over time, providing a safety net in case issues arise during deployment.
Customizable Configuration:
Helm charts support parameterization, allowing you to define configurable values that can be easily customized during deployment.
This flexibility enables you to adapt your application configurations to different environments or user-specific requirements without modifying the underlying chart structure.
Community and Repository:
Helm has a thriving community that actively maintains and contributes to a vast repository of pre-built Helm charts, called Artifact Hub.
These charts cover a wide range of applications and services, saving you time and effort in configuring and deploying common software components.
With its active community, extensive chart repository, and integration with other Kubernetes tools, Helm is a valuable addition to your Kubernetes toolkit for efficient and consistent application deployments.
Gründe für Kube-Hetzner
This project offers a comprehensive solution for provisioning Kubernetes clusters on Hetzner Cloud using Terraform.
Seamless integration:
Integrates Terraform with Hetzner Cloud, allowing you to provision your Kubernetes clusters effortlessly.
Provides pre-configured Terraform modules and resources tailored specifically for Hetzner Cloud, minimizing the setup time and effort required.
Hetzner Cloud benefits:
By leveraging Hetzner Cloud’s infrastructure, you can take advantage of its reliable and scalable resources.
Hetzner Cloud offers high-performance virtual machines, efficient networking, and flexible storage options, making it an excellent choice for hosting your Kubernetes clusters.
Terraform flexibility:
You can easily adjust settings such as node sizes, storage capacities, networking, and more.
Community Support:
The project benefits from an active community of contributors and users.
Leverage the collective knowledge and experience of the community to troubleshoot issues, share ideas, and receive guidance on best practices for cluster creation and management.
Documentation and Updates:
The project provides detailed documentation, including step-by-step guides and examples, to help you get started quickly.
Additionally, the project is actively maintained and regularly updated, ensuring compatibility with the latest versions of Terraform and Hetzner Cloud APIs.
Whether you’re new to Kubernetes or an experienced user, this project can help streamline your cluster creation workflow and empower you to focus on deploying and managing your applications effectively.
Links & further reading:
Alptuğ Dingil
Alptuğ joined Inspired in 2022 as software engineer. Besides his customer projects he's always looking for a new challenge. So lately he got engaged with Kubernetes and the configuration of a DIY cluste and got certified as a Google professional cloud architect.