DEV Community

Cover image for ☸️ Why Managed Kubernetes is a Viable Solution for Even Modest but Actively Developed Applications
Benoit COUETIL 💫 for Zenika

Posted on • Edited on

☸️ Why Managed Kubernetes is a Viable Solution for Even Modest but Actively Developed Applications

Initial thoughts

Kubernetes, has emerged as a transformative force in the world of software development and deployment. Born as an open-source project under the guidance of the Cloud Native Computing Foundation (CNCF), Kubernetes has evolved into one of the most influential technologies powering modern infrastructure and application management.

Kubernetes has gained so much traction within the community that people started to use it for small usages, where the need for a container orchestrator is far from necessary. We now see Kubernetes jokes, memes, and even Kubernetes bashing.

dilbert-techy-things

I like Kubernetes. but I've bin an even bigger fan of the KISS principle. An efficient monolith is beautiful. An application working seamlessly on a single server is beautiful. And yet, I still recommend Kubernetes for modest commercial applications. More precisely, for modest teams (at least 3 full time developers working efficiently). Modest team and not below, because lots of advantages concerns active and collaborative development.

We choose the managed side of Kubernetes, because let's face it, it is hard (and costly) to maintain on your own below a certain tech team size. At least it better be managed from the dev team perspective.

k8s-learning-curve

In this article, we will uncover the reasons why Kubernetes still stands as a great choice for a wide array of commercial applications, even small and/or starting ones, for a various reasons, beyond scalability and self-healing.

For development/developers

Way too often, we underestimate the impact of an architecture choice on the team velocity. Yes, these choices do not only impact our production environment. I would dare to say that it is the least of challenges for modest teams. The biggest challenge we face is to build a product at a fast and yet sustainable pace, to hopefully become successful someday.

Some people choose an architecture or another depending on minor cloud cost differences. But the infrastructure cost on an actively maintained modest application is relatively rarely the problem. The biggest cost is (or should be) the team itself. How impactful is a 30$ a day kubernetes service when the team costs more than 2000$ a day ? Trying to save 10$ a day on these servers often leads to more than 100$ a day of team inefficiency. And there is always room for cost optimization for a given architecture without impacting performance, as described for Kubernetes in the article FinOps EKS: 10 Tips to Reduce the Bill up to 90% on AWS Managed Kubernetes Clusters).

Now that we advocated for the cost of Kubernetes clusters to not be a problem for development environments, let's talk about real advantages.

Also, Kubernetes empowers efficient development git workflows:

  • One Environment Per Branch: Kubernetes allows you to create dedicated environments for each Git branch. This isolation aids testing, development, and collaboration.

  • Rapid Feedback Loops: Developers can quickly iterate by deploying changes to their own environments, ensuring that new features and bug fixes are thoroughly tested.

  • Collaboration: Kubernetes fosters collaborative development by providing, if needed, an environment for each contributor to validate their work before integration, each one in their single namespace.

Advantage 1: A rich ecosystem of development tools

Kubernetes offers an extensive set of development productivity tools that are particularly valuable for developers. These tools streamline the development process, making it more efficient and enabling developers to focus on writing code rather than dealing with infrastructure complexities. From local development environments to continuous integration and deployment (CI/CD) pipelines, Kubernetes provides a wide array of resources that enhance development productivity.

You can check some maintained lists mentioned in Kubernetes: Awesome Maintained Links You Will Keep Using Next Year.

Advantage 2: A desired-state system to ease changes

Kubernetes, with its declarative constructs and its ops friendly approach, has fundamentally changed deployment methodologies: it allows teams to use GitOps, Thanks to the desired-state principle.

When applying small changes such has configuration or single module code, Kubernetes will perform the necessary minimal actions to meet the new desired state. Once a developer understands the basics of kubernetes manifests (or Helm configuration), he can request changes without knowing how they will be performed by the system.

Advantage 3: advanced networking and subdomain management

Kubernetes provides advanced networking capabilities:

  • Ingress Controller: Kubernetes offers an Ingress Controller that allows you to manage subdomains, routing, and load balancing effectively.

  • Subdomain Routing: With Kubernetes, you can route traffic to different services based on subdomains, enabling you to host multiple applications under a single domain.

Once an Ingress Controller is installed and a wildcard domain is affected to a cluster, developers can easily affect sub-domains to sub-environment and/or services, without the need of any additional service or operational teams ((always busy, aren't they ?).

Advantage 4: ready-made solutions for stateful services

Even if we mostly move stateful services outside Kubernetes clusters in production, Kubernetes simplifies the deployment of stateful services for development and testing purposes:

  • Databases: Kubernetes offers pre-packaged solutions for popular databases like MySQL, PostgreSQL, and MongoDB, making it easy to manage and scale your data stores.

  • Message Brokers: You can deploy message brokers like Apache Kafka or RabbitMQ as stateful services on Kubernetes, enabling reliable communication between microservices.

For other less common stateful usages, Kubernetes provides StatefulSets, a controller that ensures stable, unique network identities and persistent storage for stateful applications.

These solutions streamline the management of stateful components, allowing you to focus on building your commercial applications.

blue sailboat, ((blue sails)), tropical

For early stages of production

Early stages of production life can be summed-up too often as: no time, no money, no product support, lots of bugs.

In this stressful period, various reason make Kubernetes a wise choice.

We still do not need those high-availability features that make funny jokes on small applications, but some others are valuable in this phase.

zero-user

Advantage 5: a rich ecosystem of production tools

Kubernetes boasts a robust ecosystem of production tools that contribute to the three pillars of observability. Let's explore these essential components:

  • Monitoring: Kubernetes provides powerful solutions such as Prometheus and Grafana for real-time monitoring and alerting. These tools ensure you can proactively maintain the health and performance of your applications.

  • Logging: Efficient log management is crucial for troubleshooting issues in a distributed environment. Kubernetes offers tools like Fluentd and Elasticsearch to centralize and analyze logs, providing insights into the behavior of your applications.

  • Tracing: Observing the flow of requests through various microservices is vital for understanding the performance of complex systems. Kubernetes supports tracing solutions, such as Jaeger or Zipkin, enabling you to trace requests as they traverse different components.

These production tools collectively enhance the reliability, performance, and overall observability of commercial applications deployed on Kubernetes.

Advantage 6: self-healing and self-management mechanisms

Kubernetes has been built with self-healing and self-management in mind.

  • Self-Healing: Kubernetes automatically restarts containers that fail, replaces containers, and kills containers that don't respond to your user-defined health check.

  • Self-Management: Kubernetes automatically manages the lifecycle of your containers, including scaling, upgrading, and rolling back.

Hardware failure is also handled, and failing nodes/servers will trigger automatic workload balance on healthy nodes.

blue sailboat, ((blue sails)), tropical

When the product is successful

Advantage 7: the features and stability of one of the most maintained open source projects

In the realm of open-source software, Kubernetes shines as one of the most well-maintained projects. It began as an internal tool at Google called Borg and later became open-source in 2014. Since then, it has grown into a thriving community of developers, users, and contributors who keep it actively maintained.

Community-powered advancements

Kubernetes benefits from a diverse global community. People from various backgrounds, organizations, and cloud providers work together to continuously enhance the platform. This collaborative effort drives innovation, ensuring that Kubernetes stays at the forefront of container orchestration technology.

Swift updates and issue fixes

A well-maintained project delivers updates and fixes problems promptly. Kubernetes exemplifies this by regularly releasing updates and addressing issues efficiently. Users can rely on a stable and evolving platform that keeps up with the fast-paced world of cloud-native technology.

Extensive documentation

Kubernetes places a strong emphasis on providing clear documentation and resources. This commitment to transparency ensures that users, regardless of their expertise, can easily access the information they need. The Kubernetes website, along with community-contributed guides, tutorials, and forums, offers valuable knowledge for users of all skill levels.

Neutral governance

Kubernetes is governed by the Cloud Native Computing Foundation (CNCF), a neutral body that ensures no single entity dominates decision-making. This neutrality encourages a fair and adaptable solution, free from corporate bias. As a result, Kubernetes serves as a versatile and reliable option for various commercial applications.

Advantage 8: a portable vendor-neutral platform with tight integrations

Kubernetes is versatile when it comes to deployment platforms. It can be set up on:

  • Cloud Providers: Kubernetes is supported on major cloud platforms like AWS, Google Cloud, and Azure, making it easy to deploy and manage your applications in the cloud.

  • Private Clouds: If you prefer to run Kubernetes in your private data center, it's fully adaptable to private cloud environments, offering control and security.

  • On-Premises: For complete control over your infrastructure, you can deploy Kubernetes on on-premises servers, ensuring data stays within your network.

  • Lightweight or Full-Fledged: Whether you need a lightweight setup on a single VM for development or a large-scale deployment spanning multiple VMs for production, Kubernetes can accommodate your needs.

Kubernetes' adaptability across these platforms makes it a viable choice for various commercial applications.

Advantage 9: scalability for diverse workloads

Kubernetes offers architecture scalability that can adapt to diverse workloads:

  • Lightweight Distribution: You can use a lightweight Kubernetes distribution on a single virtual machine (VM) for smaller workloads, development, and testing.

  • Full-Fledged Deployment: For heavy production workloads, Kubernetes can scale across multiple VMs or nodes. It can handle a wide range of applications and services efficiently.

Scalability can also be considered at the application level, with a manual update of the number of pods or automatically using pods autoscalers.

Advantage 10: high availability in continuous delivery context

Sure, a single VM is fine for serving a single starting application, and we can accommodate downtimes twice a month for deployment. But the more you lean toward continuous delivery, the more you need to consider the availability of your applications.

Kubernetes offers high-availability solutions:

  • Deployments, Daemonsets, Statefulsets: Kubernetes offers multiple controllers and deployment strategies, which allows you to create multiple replicas of a single application. This ensures that your application is highly available and can handle any unexpected load.

  • Canary Deployments: Canary deployments allow you to roll out new versions of your application in a controlled manner, ensuring that users are not impacted by the new features.

  • Blue/Green Deployments: Blue/Green deployments allow you to roll out new versions of your application alternatively to blue and green production environments, allowing complex upgrades with zero downtime deployments

These solutions ensure that your applications are highly available and can handle any type of deployment anytime.

Advantage 11: security tools for peace of mind

Kubernetes offers robust security features:

  • mTLS Support: Kubernetes supports mutual TLS (mTLS) authentication, ensuring secure communication between services within your applications.

  • Role-Based Access Control (RBAC): RBAC in Kubernetes allows you to define fine-grained access control policies, ensuring that only authorized users can perform specific actions.

  • Integration with secret managers: Kubernetes ecosystem provides secure ways to manage secrets, ensuring sensitive information remains protected.

These security tools empower you to build and operate commercial applications with confidence, safeguarding your data and infrastructure.

Wrapping up

In summary, Kubernetes stands out as a robust choice for commercial applications. It boasts active maintenance, a rich development toolset, diverse production tools, and adaptability across cloud providers, private clouds, and on-premises environments. Its scalability, advanced networking, security features, and compatibility with various stateful components further reinforce its viability.

Moreover, Kubernetes facilitates streamlined development workflows with efficient Git branching strategies. By leveraging Kubernetes, businesses can enhance productivity, ensure scalability, and navigate the challenges of modern software development effectively.

When considering architectures for commercial applications, Kubernetes should be a top contender, given its impressive capabilities and comprehensive ecosystem.

blue sailboat, ((blue sails)), tropical

Illustrations generated locally by Automatic1111 using ToonYou model

Further reading

This article was enhanced with the assistance of an AI language model to ensure clarity and accuracy in the content, as English is not my native language.

Top comments (0)