Skip to content

kuadrantctl

License

kuadrantctl is a CLI tool for managing Kuadrant configurations and resources.

Installing

kuadrantctl can be installed either by downloading pre-compiled binaries or by compiling from source. For most users, downloading the binary is the easiest and recommended method.

Installing Pre-compiled Binaries

  1. Download the latest binary for your platform from the kuadrantctl Releases page.
  2. Unpack the binary.
  3. Move it to a directory in your $PATH so that it can be executed from anywhere.

Compiling from Source

If you prefer to compile from source or are contributing to the project, you can install kuadrantctl using go install. This method requires Golang 1.21 or newer.

go install github.com/kuadrant/kuadrantctl@latest

This command will compile kuadrantctl and install the binary executable in $GOBIN (defaulting to $GOPATH/bin).

Usage

Below is a high-level overview of its commands, along with links to detailed documentation for more complex commands.

General Syntax

kuadrantctl [command] [subcommand] [flags]

Commands Overview

Command Description
completion Generate autocompletion scripts for the specified shell
generate Commands related to Kubernetes Gateway API and Kuadrant resource generation from OpenAPI 3.x specifications
help Help about any command
version Print the version number of kuadrantctl

Flags

Flag Description
-h, --help Help for kuadrantctl
-v, --verbose Enable verbose output

Commands Detail

completion

Generate an autocompletion script for the specified shell.

Subcommand Description
bash Generate script for Bash
fish Generate script for Fish
powershell Generate script for PowerShell
zsh Generate script for Zsh

generate

Commands related to Kubernetes Gateway API and Kuadrant resource generation from OpenAPI 3.x specifications.

Subcommand Description
gatewayapi Generate Gateway API resources
kuadrant Generate Kuadrant resources
generate gatewayapi

Generate Gateway API resources from an OpenAPI 3.x specification

Subcommand Description Flags
httproute Generate Gateway API HTTPRoute from OpenAPI 3.0.X --oas string Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). -o Output format: 'yaml' or 'json'. Default: yaml
generate kuadrant

Generate Kuadrant resources from an OpenAPI 3.x specification

Subcommand Description Flags
authpolicy Generate a Kuadrant AuthPolicy from an OpenAPI 3.0.x specification --oas string Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). -o Output format: 'yaml' or 'json'. Default: yaml
ratelimitpolicy Generate Kuadrant RateLimitPolicy from an OpenAPI 3.0.x specification --oas string Path to OpenAPI spec file (in JSON or YAML format), URL, or '-' to read from standard input (required). -o Output format: 'yaml' or 'json'. Default: yaml

version

Print the version number of kuadrantctl.

No additional flags or subcommands.

Additional Guides

Generating Gateway API HTTPRoute Objects

  • Generates Gateway API HTTPRoute objects from an OpenAPI Specification (OAS) 3.x.
  • Supports reading from a file, URL, or stdin.
  • Example usages and more information can be found in the detailed guide.

Generating Kuadrant AuthPolicy Objects

  • Generates Kuadrant AuthPolicy objects for managing API authentication.
  • Supports openIdConnect and apiKey types from the OpenAPI Security Scheme Object.
  • Example usages and more information can be found in the detailed guide.

Generating Kuadrant RateLimitPolicy Objects

  • Generates Kuadrant RateLimitPolicy objects for managing API rate limiting.
  • Supports reading from a file, URL, or stdin.
  • Example usages and more information can be found in the detailed guide.

For more detailed information about each command, including options and usage examples, use kuadrantctl [command] --help.

Using with GitHub Actions

- name: Install kuadrantctl
  uses: jaxxstorm/action-install-gh-release@v1.10.0
  with: # Grab the latest version
    repo: Kuadrant/kuadrantctl

Commands

Contributing

The Development guide describes how to build the kuadrantctl CLI and how to test your changes before submitting a patch or opening a PR.

Licensing

This software is licensed under the Apache 2.0 license.

See the LICENSE and NOTICE files that should have been provided along with this software for details.