CLI Reference

In this section you will learn about:

  • ways to configure ike (through flags, files et al.)

  • complete list of commands, and their available flags

Autocomplete

If you are using zsh or bash you can easily enable autocomplete for ike by invoking . <(ike completion SHELL).

Configuration

There are several ways to configure ike commands:

  1. Flags

  2. Environment variables

  3. Configuration file

Each item takes precedence over the item below it.

Environment variables are prefixed with IKE and have fully qualified names, for example in case of develop command and its port flag corresponding environment variable is IKE_DEVELOP_PORT.

Each of the commands can be persisted in the configuration file with all their flags respectively.

In case of develop command yaml file could look like:

develop:
  deployment: test
  run: "java -jar config.jar"
  port: 9876

See ike root command to learn about the global config flag and available formats.

Below you can find a documented list of all commands and their available flags.

Available commands

ike

Main command, which holds global flags and prints the overall usage of the tool.

Option Purpose Format Default

--config (-c)

config file (supported formats: json, toml, yaml, yml, properties, props, prop, hcl, dotenv, env, ini)

string

.ike.config.yaml

--version

prints the version number of ike cli

bool

false

ike install

Simple installation process of the istio-workspace in the cluster.

Connection configuration is taken from KUBECONFIG context. It’s important to have user with sufficient privileges. In case of OpenShift you can add cluster-user role for your user by executing oc adm policy add-cluster-role-to-user cluster-admin USER.
Option Purpose Format Default

--local (-l)

Install as local to the namespace only

bool

false

--namespace (-n)

Target namespace to which istio-workspace operator is deployed to.

string

istio-workspace-operator

ike serve

Starts the controller in the cluster.

Option Purpose Format Default

ike create

Creates or joins existing development session in the cluster. Allows to re-route cluster network traffic to your local process.

The create command requires an image-reference to a repository which is reachable from within the cluster. It will prepare a session with the given image.

The create command will exit and leave the Session alive in the cluster as soon as it’s created.
Option Purpose Format Default

--deployment (-d)

name of the deployment or deployment config

string

--image (-i)

create a prepared session with the given image

string

--json

return result in json

bool

false

--namespace (-n)

target namespace to develop against (defaults to default for the current context)

string

--route

specifies traffic route options in the format of type:name=value. Defaults to X-Workspace-Route header with current session name value

string

--session (-s)

create or join an existing session

string

ike delete

Deletes or leaves existing development session in the cluster.

Option Purpose Format Default

--deployment (-d)

name of the deployment or deployment config

string

--namespace (-n)

target namespace to develop against (defaults to default for the current context)

string

--session (-s)

create or join an existing session

string

ike develop

Creates or joins existing development session in the cluster. Allows to re-route cluster network traffic to your local process.

Option Purpose Format Default

--build (-b)

command to build your application before run

string

--deployment (-d)

name of the deployment or deployment config

string

--method (-m)

telepresence proxying mode - see https://www.telepresence.io/reference/methods

string

inject-tcp

--namespace (-n)

target namespace to develop against (defaults to default for the current context)

string

--no-build

always skips build

bool

false

--port (-p)

list of ports to be exposed in format local[:remote].

repeat flag and/or comma-separated list of strings

[]

--route

specifies traffic route options in the format of type:name=value. Defaults to X-Workspace-Route header with current session name value

string

--run (-r)

command to run your application

string

--session (-s)

create or join an existing session

string

--watch

enables watch

bool

false

--watch-exclude

list of patterns to exclude (always excludes [*.log .git/])

repeat flag and/or comma-separated list of strings

[*.log,.git/]

--watch-include (-w)

list of directories to watch (relative to the one from which ike has been started)

repeat flag and/or comma-separated list of strings

[.]

Watching for changes

ike develop provides --watch functionality to trigger build and relaunch the process whenever you modify something in your project. This way you can immediately introduce your changes in your cluster.

By default all log files (*.log) and .git folder are not monitored.

For details on how define what should be watched see ike develop reference.

If you have .gitignore in the root directory, from where ike has been started, rules defined in this file are also respected.

Have a look at official Git documentation to learn more about the .gitignore format.
Only root .gitignore is handled. If you happen to have additional .gitignore files in subdirectories those won’t be respected.

ike version

Prints version of the binary and build metadata.

$ ike version
Option Purpose Format Default

--short (-s)

prints only version without build details

bool

false