kr8+

kr8+ is a fork of kr8 with some additional features and improvements.
kr8 was used in production to great success at Apptio for managing components of multiple Kubernetes clusters.
kr8+ is a very opinionated tool used for rendering jsonnet manifests for multiple Kubernetes clusters.
It has been designed to work as a simple configuration management framework, allowing operators to specify configurations at different cluster context levels to generate component manifests across multiple clusters.
Kr8+ is pre-1.0.
This means that breaking changes will still happen from time to time, but it's stable enough for both scripting and interactive use.
Features
- Generate and customize component configuration for Kubernetes clusters across environments, regions and platforms
- Opinionated config, flexible deployment. kr8+ simply generates manifests for you, you decide how to deploy them
- Render and override component config from multiple sources, such as Helm, Kustomize and static manifests
- CI/CD friendly
For more information about the inspiration and the problem kr8+ solves, check out this blog post.
kr8+ consists of:
kr8+ is not designed to be a tool to help you install and deploy applications.
It's specifically designed to manage and maintain configuration for the cluster level services.
For more information, see the components section.
In order to use kr8, you'll need a configuration repository to go with this binary.
See the example directory for more information.
Configuration layering and updating jsonnet with +.
A typical repo that uses kr8 will have the following parts:
- Cluster Configurations
- Component Configurations
- Jsonnet Libraries
Cluster Config
A cluster is a Kubernetes cluster running in a cloud provider, datacenter or elsewhere.
You will more than likely have multiple clusters across multiple environments and regions.
See the Clusters documentation.
Component
A component is something you install in your cluster to make it function and work as you expect.
Some examples of components might be:
- cluster core resources: cert-manager or sealed-secrets
- argo applications: generate argo cd applications for managing applying cluster configuration to live nodes
- application: a single application that you want to run in your cluster. This is usually a web application, but it can also be a database, cron job, or documentation.
Components are applications you want to run in your cluster.
Components are generally applications you'd run in your cluster to make those applications function and work as expected.
See the Components documentation.
Jsonnet
All configuration for kr8 is written in Jsonnet.
Jsonnet was chosen because it allows us to use code for configuration, while staying as close to JSON as possible.
Building
Prerequisites
Steps to Build
go build
# or
task build-snapshot
See the Building documentation.
Testing
Prerequisites
- Go 1.23 or later
git for cloning submodules
git submodule init
git submodule update --remote --init
To test:
go task test
Contributing
Fork the repo in github and send a merge request!
Caveats
There are currently no tests, and the code is not very DRY.
This was (one of) Apptio's first exercise in Go, and pull requests are very welcome.