π₯Our TOP 13 DEPLOYMENT & TEMPLATING tools for KUBERNETES π
Philip Miglinci
Posted on December 14, 2023
TL;DR π
Feeling a bit lost in the Kubernetes deployment and packaging tool jungle? Don't worry!
We've got your back with a comprehensive cheat sheet. Dive into our curated list, breaking down each tool, its purpose, and a user-friendliness rating to make your Kubernetes journey a breeze.
Say goodbye to overwhelm and hello to clarity with our go-to guide! ππ
We Want Your Feedback! π«Ά
Share your thoughts in the comments below! Let us know what topics you'd like more content on. If this guide helps, click on the cat and leave a star to support us in creating more developer-centric content. Your feedback matters!
Define Kubernetes native apps and abstractions using object-oriented programming
Cloud Development Kit for Kubernetes
cdk8s is an open-source software development framework for defining Kubernetes applications and reusable abstractions using familiar
programming languages and rich object-oriented APIs. cdk8s apps synthesize into standard Kubernetes
manifests which can be applied to any Kubernetes cluster.
What it is: Cloud Development Kit for Kubernetes (cdk8s) lets you write Kubernetes Manifests / Helm-charts in an object orientated way.
You can easily extend existing classes, use interfaces and make sure you don't have to repeat yourself.
All your code will get compiled to yaml resources which than can easily deployed to your cluster.
Strengths: Beginner-friendly, object-oriented APIs, integrates with AWS CDK.
Ease of Use: ββββ
kubectl: The Swiss Army Knife for Kubernetes Deployments
The k8s.io/kubectl repo is used to track issues for the kubectl cli distributed
with k8s.io/kubernetes. It also contains packages intended for use by client
programs. E.g. these packages are vendored into k8s.io/kubernetes for use in
the kubectl
cli client. That client will eventually move here too.
Contribution Requirements
Full unit-test coverage.
Go tools compliant (go get, go test, etc.). It needs to be vendorable
somewhere else.
No dependence on k8s.io/kubernetes. Dependence on other repositories is fine.
Code must be usefully commented
Not only for developers on the project, but also for external users of these packages.
When reviewing PRs, you are encouraged to use Golang's code review
comments page.
Packages in this repository should aspire to implement sensible, small
interfaces and import a limited set of dependencies.
Community, discussion, contribution, and support
See this document for how to reach the maintainers of thisβ¦
What it is: Meet the command-line hero! kubectl is Kubernetes' official command-line interface.
It's your go-to tool for applying configurations, managing clusters, and handling everything Kubernetes from the terminal.
Using kubectl edit you can even directly edit and modify resources. (NOT RECOMMENDED)
Strengths: Standard, versatile, direct control over resources.
Ease of Use: ββββ
Glasskube: The simple Path to Kubernetes Deployment
Turn on autopilot and deploy and manage Open Source Tools fully automated on Kubernetes. Our Open Source Glasskube Operator is the simplest and fastest way to manage all your favorite Open Source Tools and the related infrastructure components like databases, caches, and keep them up to date without manual hassle.
β¨ Features
π Easy installation with little to no configuration
β Automatic setup of databases and caches
π Automate and schedule version updates and patches
What it is: Glasskube is your window into transparent Kubernetes deployments.
It pre-packages popular open-source apps and components and abstracts them via custom resources.
Glasskube utilizes a Kubernetes operator to install components in the correct namespaces and directly make sure apps and components are probably connected and configured.
Strengths: User-friendly, transparent deployment, emphasis on simplicity.
What it is: Helm is a common package manager for Kubernetes.
It simplifies complex app deployments by packaging them into "charts" that can be shared and deployed.
Strengths: Package management, community charts, versioning.
Ease of Use: βββ
Kustomize: Tailoring Kubernetes Configurations Like a Pro
kustomize lets you customize raw, template-free YAML
files for multiple purposes, leaving the original YAML
untouched and usable as is.
kustomize targets kubernetes; it understands and can
patch kubernetes style API objects. It's like
make, in that what it does is declared in a file
and it's like sed, in that it emits edited text.
To find the kustomize version embedded in recent versions of kubectl, run kubectl version:
> kubectl version --client
Client Version: v1.31.0
Kustomize Version: v5.4.2
The kustomize build flow at v2.0.3 was added
to kubectl v1.14. The kustomize
flow in kubectl remained frozen at v2.0.3 until kubectl v1.21,
which updated it to v4.0.5. It will
be updated on a regular basis going forward, and such updates
will be reflected in the Kubernetes release notes.
What it is: Kustomize is part of kubectl and helps you to not duplicate your Kubernetes manifests.
You can reuse the same resources in multiple kustomizations and apply patches to modify only specific values.
You can also create reusable components to better organize your kustomize projects.
Strengths: Config customization, simplicity, integrates with GitOps.
Open and extensible continuous delivery solution for Kubernetes. Powered by GitOps Toolkit.
Flux version 2
Flux is a tool for keeping Kubernetes clusters in sync with sources of
configuration (like Git repositories and OCI artifacts)
and automating updates to configuration when there is new code to deploy.
Flux version 2 ("v2") is built from the ground up to use Kubernetes'
API extension system, and to integrate with Prometheus and other core
components of the Kubernetes ecosystem. In version 2, Flux supports
multi-tenancy and support for syncing an arbitrary number of Git
repositories, among other long-requested features.
Flux v2 is constructed with the GitOps Toolkit, a
set of composable APIs and specialized tools for building Continuous
Delivery on top of Kubernetes.
Flux is a Cloud Native Computing Foundation (CNCF) graduated project, used in
production by various organisations and cloud providers.
Quickstart and documentation
To get started check out this guide
on how to bootstrap Flux on Kubernetes and deployβ¦
What it is: Flux is a complete CD solution for Kubernetes.
It syncs your Kubernetes cluster with Manifests stored in a git repository.
It also has controllers for kustomizations and helm repositories which interact with the Kubernetes api by packaging helm in helm-controller.
With weaveworks there is also an UI and commercial support available.
What it is: Argo CD is an alternative to flux with a stronger focus on a user interface to sync your manifests to your cluster.
It also follows the declarative approach where manifests should be stored in a git repository.
Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.
timoni
Timoni is a package manager for Kubernetes
powered by CUE
and inspired by Helm.
The Timoni project strives to improve the UX of authoring Kubernetes configs
Instead of mingling Go templates with YAML like Helm,
or layering YAML on top of each-other like Kustomize,
Timoni relies on cuelang's type safety, code generation and data validation features
to offer a better experience of creating, packaging and delivering apps to Kubernetes.
Important
Note that Timoni in under active development and is still in its infancy.
The APIs and command-line interface may change in a backwards incompatible manner.
Get Started
To get started with Timoni please visit the documentation website at timoni.sh.
Concepts
Module - App definition containing Kubernetes CUE templates and configuration schema, distributed as OCI artifacts.
Instance - App instantiation referencing the module and workloads deployed on a Kubernetes cluster.
What it is: Timoni is an alternative to helm that.
It uses the nomenclature "bundle" to package applications. It also aims to manage the life cycle of applications and its CRDs.
It uses the CUE data validation language.
Carvel provides a set of reliable, single-purpose, composable tools that aid in your application building, configuration, and deployment to Kubernetes. This repo contains information regarding the Carvel open-source community.
Carvel
Carvel provides a set of reliable, single-purpose, composable tools that aid in your application building, configuration, and deployment to Kubernetes.
This is a list of repos associated with the Carvel project.
ytt - Template and overlay Kubernetes configuration via YAML structures, not text documents
kapp - Install, upgrade, and delete multiple Kubernetes resources as one "application"
kbld - Build or reference container images in Kubernetes configuration in an immutable way
imgpkg - Bundle and relocate application configuration (with images) via Docker registries
kapp-controller - Capture application deployment workflow in App CRD. Reliable GitOps experience powered by kapp.
vendir - Declaratively state what files should be in a directory.
secretgen-controller - Provides CRDs to specify what secrets need to be on a cluster (generated or not).
What it is: Carvel is your all-in-one toolkit for managing Kubernetes configurations. It offers a suite of tools, including ytt for templating and kapp for deploying applications.
Think of it as a Swiss Army Knife for fine-tuning your Kubernetes setup.
Pulumi - Infrastructure as Code in any programming language π
Pulumi's Infrastructure as Code SDK is the easiest way to build and deploy infrastructure, of any architecture and on any cloud, using programming languages that you already know and love. Code and ship infrastructure faster with your favorite languages and tools, and embed IaC anywhere with Automation API.
Simply write code in your favorite language and Pulumi automatically provisions and manages your resources on
AWSAzureGoogle Cloud PlatformKubernetes, and 120+ providers using an
infrastructure-as-code approach.
Skip the YAML, and use standard language features like loops, functions, classes,
and package management that you already know and love.
What it is: Pulumi brings a unique twist to Kubernetes deployments by allowing you to define infrastructure as code using your favorite programming languages.
It can we used as an alternative to cdk8s.
Strengths: Infrastructure as code, multi-language support, easy to integrate.
Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.
The key features of Terraform are:
Infrastructure as Code: Infrastructure is described using a high-level configuration syntax. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastructure can be shared and re-used.
Execution Plans: Terraform has a "planning" step where it generates an execution plan. The execution plan shows what Terraform will do when you call apply. This lets you avoid any surprises when Terraform manipulates infrastructure.
Resource Graph: Terraform builds a graph of all your resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform buildsβ¦
What it is: Terraform is the seasoned veteran in the infrastructure-as-code realm.
It extends its prowess to Kubernetes, providing a declarative way to manage infrastructure.
If you're comfortable with HashiCorp's templating language hcl it can be valid alternative to using kustomize.
Strengths: Infrastructure as code, robust ecosystem, widely adopted.
Ease of Use: β
Grafana Tanka with Jsonnet: Templating Magic for Kubernetes Configurations
What it is: Grafana Tanka is another alternative to kustomize using the Jsonnet templating to create more powerful and extensible libraries of Kubernetes manifests
Typecheck, template and modularize your Kubernetes definitions with Dhall
dhall-kubernetes
dhall-kubernetes contains Dhall bindings to Kubernetes
so you can generate Kubernetes objects definitions from Dhall expressions
This will let you easily typecheck, template and modularize your Kubernetes definitions.
Why do I need this
Once you build a slightly non-trivial Kubernetes setup, with many objects floating
around, you'll encounter several issues:
Writing the definitions in YAML is really verbose, and the actually important
things don't stand out that much
Ok I have a bunch of objects that'll need to be configured together, how do I share data?
I'd like to reuse an object for different environments, but I cannot make it parametric..
In general, I'd really love to reuse parts of some definitions in other definitions
Oh no, I typoed a key and I had to wait until I pushed to the cluster to get an error back :(
The natural tendency is to reach for a templating languageβ¦
What it is: Dhall brings functional programming goodness to Kubernetes configuration as an alternative to kustomize and tanka with jsonnet.
It offers a declarative language that's both human-readable and type-safe.
Strengths: Functional programming, type safety, human-readable syntax.
Ease of Use: βββ
Conclusion
In conclusion, the Kubernetes deployment landscape is undoubtedly vast, but armed with our comprehensive cheat sheet, you're now equipped to navigate it like a seasoned explorer.
From the simplicity of cdk8s to the coding magic of Pulumi, the Swiss Army finesse of Carvel, the templating sorcery of Jsonnet, and the functional purity of Dhall, each tool offers a unique journey in the realm of Kubernetes.
With user-friendliness ratings as your compass, embark on your deployment adventure with confidence.
Say goodbye to overwhelm and hello to clarity β you're now ready to conquer the Kubernetes universe! ππβ¨