kr8

command module
v0.0.2-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 1 Imported by: 0

README

kr8+

CI status Go Version

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.

Once installed, 99% percent of your usage will be running kr8 generate.

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.

Installation

The latest version is available for download from the Github releases page.

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.

Concepts & Tools

Configuration layering and updating jsonnet with +.

A typical repo that uses kr8+ will have the following parts:

  • Cluster Configurations
  • Component Configurations
  • Jsonnet Libraries
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.

Further Information

Development

kr8+ is coded in Golang. Currently, version 1.23.0 is used.

Common tasks can be executed with go-task.

Tasks are described in Taskfile.yml.

Prerequisites

Once go-task is installed, you can setup your environment by running:

# Install dev tools
task setup

# View available tasks
task -l

# Build kr8+ for your local system
task build

# Run tests
task test

# Build snapshot
task build-snapshot
Build Troubleshooting
  • Dependencies download fail: There is a big number of reasons this could fail but the most important might be:
    • Networking problems: Check your connection to: github.com, golang.org and k8s.io.
    • Disk space: If no space is available on the disk, this step might fail.
  • The comand go build does not start the build:
    • Confirm you are in the correct project directory
    • Make sure your go installation works: go --version

Contributing

Fork the repo in github and send a merge request!

Caveats

There are currently no tests.

Pull requests are very welcome.

License

The project is licensed under the MIT license.

Parts of the code are derived from:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
jnetvm
Package jvm contains the jsonnet rendering logic.
Package jvm contains the jsonnet rendering logic.
util
Utility functions for directories and files
Utility functions for directories and files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL