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.
${KYMA_VERSION}=1.2.0
Invoke-WebRequest -OutFile kyma.zip https://github.com/kyma-project/cli/releases/download/${KYMA_VERSION}/kyma_Windows_x86_64.zip
Expand-Archive -Path kyma.zip -DestinationPath .\kyma-cli
cd kyma-cli
To install Kyma CLI on Windows using Chocolatey, run:
choco install kyma-cli
To install a different release, change the path to point to the desired version and architecture:
curl -Lo kyma.tar.gz https://github.com/kyma-project/cli/releases/download/${KYMA_VERSION}/kyma_${ARCH}.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} specifies 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 |
minikube gardener gke aks |
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 |
definitions delete list run status 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
If the Homebrew formula of the CLI does not get updated by the Homebrew team within three days of the release, update the formula of the CLI manually to the most recent version by following this guide. For a sample Homebrew Kyma CLI formula version bump, see this PR.
The Kyma CLI Chocolatey package does not need to be bumped when there is a new release, as it has a script that will automatically check for new releases and update the package to the latest release.
Nevertheless, the package still needs some maintenance to keep its dedicated site at chocolatey.org up to date (e.g. update description, details, screenshots, etc...).
In order to maintain the site, send a pull request to Chocolatey's GitHub repository.