apoctl provides the following main commands:
Here are the main global flags you can set:
In general, every flag can be also set from an environment variable. You can easily guess the environment variable by
For instance, the variable used to set the above flags are:
APOCTL_API APOCTL_NAMESPACE APOCTL_TOKEN APOCTL_LOG_LEVEL APOCTL_CONFIG
The resolution order is as follows from low to high priority:
- built-in default value
- value set in a configuration profile
- value set the environment variables
- value set using the flags.
To take advantages of this feature, you must add a command in your shell configuration.
echo "source <(apoctl completion bash)" >> ~/.bashrc
echo "source <(apoctl completion zsh)" >> ~/.zshrc
On CentOS, you may need to install the bash-completion package which is not installed by default.
sudo yum install bash-completion -y
On macOS, you may need to install the bash-completion package which is not installed by default.
- If running Bash 3.2 included with macOS:brew install bash-completion
- If running Bash 4.1+:brew install bash-completion@2
A profile is a simple YAML file setting default values for any flags of apoctl. The most useful one is to set up your default namespace as well as an app credential to use.
All values defined in the profile, can be overridden by an environment variable or by setting the flag when you call apoctl.
apoctl profile use my-profile
In any case, to verify which profile is used, you can run apoctl profiles.
Note that the value of the variable must omit the extension.
$ cat ~/.apoctl/default.yaml api: https://api.east-01.network.prismacloud.io namespace: /acme creds: ~/.apoctl/default.creds output: yaml
Recommended For You
Recommended videos not found.