Kyma CLI is a command line tool which supports Kyma developers. It provides a set of commands you can use to install, manage, and test Kyma.
Kyma CLI requires the following software:
Use the following options to install Kyma CLI from the latest release.
To install Kyma CLI using Homebrew, run:
brew install kyma-cli
To install Kyma CLI on macOS, run:
curl -Lo kyma.tar.gz "https://github.com/kyma-project/cli/releases/download/$(curl -s https://api.github.com/repos/kyma-project/cli/releases/latest | grep tag_name | cut -d '"' -f 4)/kyma_Darwin_x86_64.tar.gz" \
&& mkdir kyma-release && tar -C kyma-release -zxvf kyma.tar.gz && chmod +x kyma-release/kyma && sudo mv kyma-release/kyma /usr/local/bin \
&& rm -rf kyma-release kyma.tar.gz
To install Kyma CLI on Linux, run:
curl -Lo kyma.tar.gz "https://github.com/kyma-project/cli/releases/download/$(curl -s https://api.github.com/repos/kyma-project/cli/releases/latest | grep tag_name | cut -d '"' -f 4)/kyma_Linux_x86_64.tar.gz" \
&& mkdir kyma-release && tar -C kyma-release -zxvf kyma.tar.gz && chmod +x kyma-release/kyma && sudo mv kyma-release/kyma /usr/local/bin \
&& rm -rf kyma-release kyma.tar.gz
To install Kyma CLI on Windows, download and unzip the artifact. Remember to adjust your PATH environment variable.
NOTE: To install a different release, change the path to point to the desired version:
curl -Lo kyma.tar.gz https://github.com/kyma-project/cli/releases/download/1.2.0/kyma_Darwin_i386.tar.gz
Use the following syntax to run the commands from your terminal:
kyma {COMMAND} {FLAGS}
where:
- {COMMAND} specifies the operation you want to perform.
- {FLAGS} specify optional flags.
Example:
kyma install --source=latest
Kyma CLI comes with a set of commands, each of which has its own specific set of flags.
NOTE: For the full list of commands and flags, see this document.
Command | Child commands | Description | Example |
---|---|---|---|
completion |
None | Generates and displays the bash or zsh completion script. | kyma completion |
console |
None | Launches Kyma Console in a browser window. | kyma console |
install |
None | Installs Kyma on a cluster based on the current or specified release. | kyma install |
provision |
provision minikube provision gardener provision gcp provision azure |
Provisions a new cluster on a platform of your choice. Currently, this command supports cluster provisioning on GCP, Azure, Gardener, and Minikube. | kyma provision minikube |
test |
test definitions test delete test list test run test status test logs |
Runs and manages tests on a provisioned Kyma cluster. Using child commands, you can run tests, view test definitions, list and delete test suites, display test status, and fetch the logs of the tests. | kyma test run |
version |
None | Shows the cluster version and the Kyma CLI version. | kyma version |
Further usage examples include:
-
Install Kyma with Minikube on Mac:
kyma provision minikube kyma install
-
Install Kyma with Minikube on Windows:
kyma provision minikube kyma install
-
Install Kyma with Minikube on Windows using HyperV:
kyma provision minikube --vm-driver hyperv --hypervVirtualSwitch {YOUR_SWITCH_NAME} kyma install
NOTE: To use Kyma CLI as a kubectl plugin, use Kubernetes version 1.12.0 or higher.
A plugin is a standalone executable file with a name prefixed with kubectl-
.To use the plugin, perform the following steps:
- Rename the
kyma
binary tokubectl-kyma
and place it anywhere in your {PATH}:
sudo mv ./kyma /usr/local/bin/kubectl-kyma
-
Run
kubectl plugin list
command to see your plugin on the list of all available plugins. -
Invoke your plugin as a kubectl command:
$ kubectl kyma version
Kyma CLI version: v0.6.1
Kyma cluster version: 1.0.0
For more information on extending kubectl with plugins, read Kubernetes documentation.
Kyma CLI is used in continuous integration jobs that install or test Kyma or provision clusters. To effectively support this, we publish the stable binaries created from the stable
tag which corresponds to the latest stable version of Kyma CLI.
To download the binaries, run:
curl -Lo kyma https://storage.googleapis.com/kyma-cli-stable/kyma-darwin # kyma-linux or kyma.exe
chmod +x kyma