Search…
CLI commands

deploy

1
create or update apis
2
3
Usage:
4
cortex deploy [CONFIG_FILE] [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-f, --force override the in-progress api update
9
-y, --yes skip prompts
10
-o, --output string output format: one of pretty|json (default "pretty")
11
-h, --help help for deploy
Copied!

get

1
get information about apis or jobs
2
3
Usage:
4
cortex get [API_NAME] [JOB_ID] [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-w, --watch re-run the command every 2 seconds
9
-o, --output string output format: one of pretty|json (default "pretty")
10
-v, --verbose show additional information (only applies to pretty output format)
11
-h, --help help for get
Copied!

describe

1
describe an api
2
3
Usage:
4
cortex describe [API_NAME] [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-w, --watch re-run the command every 2 seconds
9
-h, --help help for describe
Copied!

logs

1
get the logs for a workload
2
3
Usage:
4
cortex logs API_NAME [JOB_ID] [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-y, --yes skip prompts
9
--random-pod stream logs from a random pod
10
-h, --help help for logs
Copied!

refresh

1
restart all replicas for an api (without downtime)
2
3
Usage:
4
cortex refresh API_NAME [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-f, --force override the in-progress api update
9
-o, --output string output format: one of pretty|json (default "pretty")
10
-h, --help help for refresh
Copied!

delete

1
delete an api or stop a job
2
3
Usage:
4
cortex delete API_NAME [JOB_ID] [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-f, --force delete the api without confirmation
9
-c, --keep-cache keep cached data for the api
10
-o, --output string output format: one of pretty|json (default "pretty")
11
-h, --help help for delete
Copied!

cluster up

1
spin up a cluster on aws
2
3
Usage:
4
cortex cluster up CLUSTER_CONFIG_FILE [flags]
5
6
Flags:
7
-e, --configure-env string name of environment to configure (default: the name of your cluster)
8
-y, --yes skip prompts
9
-h, --help help for up
Copied!

cluster info

1
get information about a cluster
2
3
Usage:
4
cortex cluster info [flags]
5
6
Flags:
7
-c, --config string path to a cluster configuration file
8
-n, --name string name of the cluster
9
-r, --region string aws region of the cluster
10
-o, --output string output format: one of pretty|json|yaml (default "pretty")
11
-e, --configure-env string name of environment to configure
12
-d, --debug save the current cluster state to a file
13
--print-config print the cluster config
14
-y, --yes skip prompts
15
-h, --help help for info
Copied!

cluster configure

1
update the cluster's configuration
2
3
Usage:
4
cortex cluster configure CLUSTER_CONFIG_FILE [flags]
5
6
Flags:
7
-y, --yes skip prompts
8
-h, --help help for configure
Copied!

cluster down

1
spin down a cluster
2
3
Usage:
4
cortex cluster down [flags]
5
6
Flags:
7
-c, --config string path to a cluster configuration file
8
-n, --name string name of the cluster
9
-r, --region string aws region of the cluster
10
-y, --yes skip prompts
11
--keep-aws-resources skip deletion of resources that cortex provisioned on aws (bucket contents, ebs volumes, log group)
12
-h, --help help for down
Copied!

cluster export

1
download the configurations for all APIs
2
3
Usage:
4
cortex cluster export [flags]
5
6
Flags:
7
-c, --config string path to a cluster configuration file
8
-n, --name string name of the cluster
9
-r, --region string aws region of the cluster
10
-h, --help help for export
Copied!

cluster health

1
inspect the health of components in the cluster
2
3
Usage:
4
cortex cluster health [flags]
5
6
Flags:
7
-c, --config string path to a cluster configuration file
8
-n, --name string name of the cluster
9
-r, --region string aws region of the cluster
10
-o, --output string output format: one of pretty|json (default "pretty")
11
-h, --help help for health
Copied!

env configure

1
configure an environment
2
3
Usage:
4
cortex env configure [ENVIRONMENT_NAME] [flags]
5
6
Flags:
7
-o, --operator-endpoint string set the operator endpoint without prompting
8
-h, --help help for configure
Copied!

env list

1
list all configured environments
2
3
Usage:
4
cortex env list [flags]
5
6
Flags:
7
-o, --output string output format: one of pretty|json (default "pretty")
8
-h, --help help for list
Copied!

env default

1
set the default environment
2
3
Usage:
4
cortex env default [ENVIRONMENT_NAME] [flags]
5
6
Flags:
7
-h, --help help for default
Copied!

env rename

1
rename an environment
2
3
Usage:
4
cortex env rename EXISTING_NAME NEW_NAME [flags]
5
6
Flags:
7
-h, --help help for rename
Copied!

env delete

1
delete an environment configuration
2
3
Usage:
4
cortex env delete [ENVIRONMENT_NAME] [flags]
5
6
Flags:
7
-h, --help help for delete
Copied!

version

1
print the cli and cluster versions
2
3
Usage:
4
cortex version [flags]
5
6
Flags:
7
-e, --env string environment to use
8
-h, --help help for version
Copied!

completion

1
generate shell completion scripts
2
3
to enable cortex shell completion:
4
bash:
5
add this to ~/.bash_profile (mac) or ~/.bashrc (linux):
6
source <(cortex completion bash)
7
8
note: bash-completion must be installed on your system; example installation instructions:
9
mac:
10
1) install bash completion:
11
brew install bash-completion
12
2) add this to your ~/.bash_profile:
13
source $(brew --prefix)/etc/bash_completion
14
3) log out and back in, or close your terminal window and reopen it
15
ubuntu:
16
1) install bash completion:
17
apt update && apt install -y bash-completion # you may need sudo
18
2) open ~/.bashrc and uncomment the bash completion section, or add this:
19
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion; fi
20
3) log out and back in, or close your terminal window and reopen it
21
22
zsh:
23
option 1:
24
add this to ~/.zshrc:
25
source <(cortex completion zsh)
26
if that failed, you can try adding this line (above the source command you just added):
27
autoload -Uz compinit && compinit
28
option 2:
29
create a _cortex file in your fpath, for example:
30
cortex completion zsh > /usr/local/share/zsh/site-functions/_cortex
31
32
Note: this will also add the "cx" alias for cortex for convenience
33
34
Usage:
35
cortex completion SHELL [flags]
36
37
Flags:
38
-h, --help help for completion
Copied!
Last modified 3mo ago