Skip to content

kubeshop/kusk-gen

Repository files navigation

kusk-gen - use OpenAPI to configure Kubernetes

What is kusk-gen?

Developers deploying their REST APIs in Kubernetes shouldn't have to worry about managing resources that do not directly relate to their applications or services.

kusk-gen (coachman in Swedish) treats your OpenAPI/Swagger definition as a source of truth for generating supplementary Kubernetes resources for your REST APIs in regard to mappings, security, traffic-control, monitoring, etc.

Read the Introductory blog-post to get an overview.

kusk-gen-overview

Quick Start

Homebrew

brew install kubeshop/kusk/kusk-gen

Latest release on Github

go install github.com/kubeshop/kusk-gen@$VERSION

If you don't want to build it yourself, the Releases page contains already built binaries for all supported platforms.

Download it and unpack kusk-gen to the directory of you choice.

From source

git clone git@github.com:kubeshop/kusk-gen.git && \
cd kusk-gen && \
go install

Read more at Getting Started

Why kusk-gen?

Using OpenAPI as the source-for-truth for client, servers, testing, documentation, etc. is a common approach when building microservice architectures with REST APis. Kusk extends this paradigm to also include Kubernetes configurations, allowing you to

  • Cut down on development time when deploying your REST APIs to your clusters
  • Remove the need to learn tools-specific formats and configurations
  • Easily switch between supported tools without having to learn new formats/configurations

Features

  • kusk-gen can inspect your cluster for the tools it supports and generate corresponding resources automatically.
  • the Kusk OpenAPI Extension allows you to specify extended QoS and k8s related metadata which will be used to configure your cluster accordingly.
  • kusk-gen plays nicely with both manual and automated/GitOps/CD workflows.
  • The underlying architecture makes it straight-forward to extend kusk-gen with new generators

kusk-gen currently supports (click for configuration options)

Some of the upcoming tools we'd like to support are Kong and Contour. Please don't hesitate to suggest others or contribute your own generator!

Documentation & Support

To learn more about kusk-gen check out the complete documentation

Join our Discord Server to ask questions, suggest ideas, etc.

How to contribute

  • Check out our Contributor Guide and Code of Conduct
  • Fork/Clone the repo and make sure you can run it as shown above
  • Check out open issues here on GitHub
  • Get in touch with the team by starting a discussion on GitHub or on our Discord Server. or open an issue of your own that you would like to contribute to the project.
  • Fly like the wind!