Developing with Kubernetes: a list of tools

Kubernetes Logo
Kubernetes Logo

Kubernetes is the container orchestration king, usually accompanied by Docker, it dominates the container scene. The “containerization race” has begun with one fundamental actor stopped at the starting point: developers. While Kubernetes is hard, developing with Kubernetes is harder. This article aims to provide insights for new and seasoned developers who want to include Kubernetes in their workflow.

Whilst Kubernetes gains adoption and more and more applications include either a Kubernetes manifest or a Helm chart, it requires extensive knowledge to set up a Kubernetes cluster. On top of that the developer needs to containerize an application and, preferably, set up optional dependencies. All in all, a new developer may be stunned by the steep learning curve and a seasoned developer may not have a functioning cluster and a CI/CD pipeline already set up. The following solutions are open source or open core (with the exception of cloud providers), I’ve deliberately compiled this list including only software that you can (also) run on your machine.

The base: Kubernetes clusters on sale

Developing against a production cluster is not a good thing, developing against a non-existent cluster might be even worse for a new developer. Here’s a list of alternatives that you can use:

  • A functioning cluster: while not everyone have access to a cluster already set up and ready to shine, this might be the best if you already have one set up by someone else. This includes clouds services such as EKS, GKE and AKS albeit with a price.
  • Minikube: the go-to solution for local Kubernetes is still one of the best at what it does. Minikube takes care of virtualization, operating system and storage without blinking.
  • MicroK8s: Canonical’s approach to local Kubernetes. A good solution, but in contrast with Minikube you will need an existing Linux operating system.

For advanced users

  • Kubeadm: the surefire way to get a CKC is Kubeadm, the tool of choice when bootstrapping a “vanilla” Kubernetes.
  • Rancher: Rancher is a Certified Kubernetes distribution (in-depth article here) that empowers Kubernetes and can be bootstrapped in a matter of minutes.
  • K3s: a lightweight Kubernetes distribution with only 512mb needed to run (in-depth article here) built for the edge. This might be a great choice if you plan to use a Raspberry PI.

The winner: Minikube

While there are many alternatives out there, Minikube takes the least amount of steps to set up, doesn’t require fiddling with complex things such as Rook or Ceph, and isolates the underlying operating system from the cluster. If you make a mistake you can tear down the whole cluster and start anew in a matter of seconds (friendly reminder: you should always try to fix your own mess and take it as a good learning opportunity!). Here’s my guide to it:

Tools: to make your development experience easier

Yes, you can containerize, push to your Docker Hub, pull, and mark it as complete. But in the end you’re still relying on an external service (Docker Hub registry) and you don’t really have automation. Every step you’re taking is manual. That’s what tools are made for!

  • Skaffold: a Google project that aims to create a development workflow. This enables the developer to write code and immediately see the changes without manually building, pushing, pulling.
  • DevSpace: a all-in-one solutions that excels at defining complex microservices architectures with the least amount of work. It supports many options and can also manage raw Kubernetes manifests. On top of that you can also manage deployments to production clusters using the same configuration files.
  • Draft: a Microsoft project that can help you with simple applications, and even containerization. If you’re just starting and prefer a learning-by-dissecting approach, this is the choice.
  • Garden: a project that aims to guide the developer “from source to finish”. Much like DevSpace, Garden creates a reproducible environment to develop against Kubernetes.
  • Kaniko: a Google project that allows to build images within the Kubernetes cluster, without a local Docker Engine. While not a solution per se, it is a great tool if you don’t have/don’t want to use a local Docker Engine.

The winner: it depends

If you’re a beginner Draft may be your best friend, but if you’re an advanced developer or you are developing a complex/microservices-oriented application you may be better off going with DevSpace or Garden. Skaffold is a great tool, but in my opinion it is not suited to be used directly by a developer.

CI/CD: the real stuff

While you may want a local environment to test your new application, you can level up your game with a DevOps approach using Continuous Integration/Delivery (CI/CD).

  • Jenkins: is the de-facto open-source go-to solution for CI/CD pipelines. Born over a decade ago, if you count the Hudson days, it is still one of the most prominent software in its field. Jenkins supports a wide variety of sources and destinations, including Kubernetes.
  • Jenkins X: is another version of Jenkins with a focus on Kubernetes. If you don’t already have a Jenkins instance up and running, this might be a better choice.
  • GitLab CI/CD: GitLab is a popular GitHub, open source, alternative. GitLab supports CI/CD pipelines and also has a feature called “Auto DevOps”, and works well with Kubernetes. Downside: you need a GitLab instance to use it.
  • Drone: is a CI/CD software that leverages containers to perform its duties.
  • Gradle: is a CI/CD tool inspired by Apache Ant and Maven. Gradle currently targets the Java language, with more to come in the roadmap.
  • Concourse-CI: is a self-proclaimed thing-doer. It can do CI/CD but has a steeper learning curve since it offers much flexibility.

The winner(s)?

Drone is compact, complete and easy-to-use, while not the most mature solution in the list, it is gaining traction, rapidly. Jenkins X is a close competitor but it has a steeper learning curve and may be complicated at first. While not part of this list, many great CI/CD solutions are not self-hostable and/or paid ones. Nevertheless, you may want to look into them so here’s a few names: CircleCI, Travis, Codeship.

Developing with Kubernetes: a few useful adds

While you may be already set up and ready to start developing with Kubernetes, there are a few more, useful, solutions that you might find perfect for you right from the get-go or later down the road:

  • Traefik: is a layer-7 router that operates as a reverse proxy/load balancer. Traefik can work as a Kubernetes Ingress Controller. You will most likely need an Ingress Controller during your development, Traefik is simple, easy to use, immediate and has a great Kubernetes integration.
  • Helm: is the de-facto package manager for Kubernetes. You will use it sooner or later.
  • Docker Registry: is a registry implementation by Docker, it provides a simple registry. You may need this if you can’t or don’t want to push your images to Docker Hub.
  • Harbor: is a cloud-native registry for images, Helm charts, that includes vulnerability scanning and RBAC. You may want to have a little more control over the foundation of your environment, that’s where/when Harbor comes in handy.
  • Minio: is a S3-compatible object storage server. When developing applications for the cloud, using local, persistent storage might not be the best decision.
  • Sentry: is an error-tracking software that helps developer monitor code in real time. It may also be a good idea to set it up and use it after development phase.
Image courtesy of mark | marksei
mark

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.