An opinionated Kubernetes cluster configuration management tool
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8455de3 Oct 18, 2018
Permalink
Failed to load latest commit information.
cmd Remove configfile flag Oct 18, 2018
docs Initial commit Oct 17, 2018
.gitignore Initial commit Oct 17, 2018
.goreleaser.yml Disable CGO Oct 18, 2018
.travis.yml Change default install Oct 18, 2018
Dockerfile Adding release config Oct 18, 2018
Dockerfile-goreleaser Final dockerfile Oct 18, 2018
LICENSE Initial commit Oct 17, 2018
LICENSE-apache.txt Initial commit Oct 17, 2018
NOTICE.txt Initial commit Oct 17, 2018
README.md Initial commit Oct 17, 2018
glide.lock Add new deps Oct 18, 2018
glide.yaml Initial commit Oct 17, 2018
main.go Initial commit Oct 17, 2018

README.md

kr8

kr8 is a very opinionated tool used for rendering jsonnet manifests for numerous Kubernetes clusters.

It has been designed to work like a simple configuration management framework, allowing operators to specify configuration for components across multiple clusters.

kr8 is a work in progress (currently in Alpha), but is in use at Apptio for managing components of multiple Kubernetes clusters.

For more information about the inspiration and the problem kr8 solves, check out this blog post.

kr8 consists of:

  • kr8 - a Go binary for rendering manifests
  • Task - a third party Go binary for executing tasks
  • Configs - A configuration directory which contains config for clusters and the components installed into those clusters

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 repo for more information.

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

Concepts & Tools

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:

Components are not the 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.

Clusters

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.

Clusters have:

  • cluster configuration, which can be used as part of the Jsonnet configuration later. This consists of things like the cluster name, type, region etc
  • components, which you'd like to install in a cluster
  • component configuration, which is modifications to a component which are specific to a cluster. An example of this might be the path to an SSL certificate for the nginx-ingress controller, which may be different across cloud providers.

Taskfiles

Instead of reinventing the wheel, the kr8 ecosystem makes uses of the Task tool to generate the cluster configuration. The task files generally call kr8 in order to render the manifests for a component. We chose task because it supports yaml and json configuration files, which mean we can continue to leverage jsonnet to write taskfiles where needed.

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

See the docs

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.