kuttl

CLI Usage

This document demonstrates how to use the KUTTL CLI

Setup the KUTTL Kubectl Plugin

Requirements

Installation

You can either download CLI binaries for linux or MacOS from our release page, or install the CLI plugin using brew:

brew tap kudobuilder/tap
brew install kuttl-cli

or you can compile and install the plugin from your $GOPATH/src/github.com/kudobuilder/kuttl root folder via:

make cli-install

Another alternative is krew, the package manager for kubectl plugins.

kubectl krew install kuttl

Commands

Flags

[!NOTE] Usage

kubectl kuttl test <name> [flags]

Flags are:

Examples

KUTTL Test

KUTTL test command is the heart of the test harness. It requires a kuttl-test.yaml which defines the test setup.

apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- ./test/integration
parallel: 4

The default can be run as follows:

kubectl kuttl test  internal/harness/test_data/

When running with no defined test environment, the default is a preconfigured cluster defined in $KUBECONFIG.

To run with the mocked control plane run:

kubectl kuttl test --start-control-plane internal/harness/test_data/

In order to run with the full kind cluster stack, run:

kubectl kuttl test --start-kind internal/harness/test_data/