Alias
Botkube can define multiple aliases for arbitrary commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a k
alias for kubectl
, or kgp
for kubectl get pods
.
Aliases work for all commands, including executor plugins and Botkube built-in ones. To learn more about how to configure Executors, see the Executor section.
Aliases are defined globally for the whole Botkube installation. Once they are configured, read the Aliases section in Usage document.
Botkube Cloud​
You can configure aliases in the Botkube Cloud dashboard.
If you don't have an existing Botkube instance, create a new one, according to the Installation docs.
From the Botkube Cloud homepage, click the Aliases link in the top right corner.
Click Create new button.
Provide display name, alias and command.
For example, for
exec
plugin, you can provide display name asExec alias
, alias asx
, and command asexec
.Select instances for which you want to enable the alias.
Click Apply button.
Self-hosted Botkube syntax​
To configure the aliases for the self-hosted Botkube installation, use the following syntax:
# Custom aliases for given commands.
# The aliases are replaced with the underlying command before executing it.
# Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`.
#
## Format: aliases.{alias}
aliases:
kc:
command: kubectl
displayName: "Kubectl alias"
k:
command: kubectl
displayName: "Kubectl alias"
## Multi-word alias example:
# kgp:
# command: kubectl get pods
# displayName: "Get pods"
The default configuration for Helm chart can be found in the values.yaml file.