Deckhouse CLI is a command line interface for cluster management created by the developers of Deckhouse Kubernetes Platform (DKP). Starting with version 1.59, the D8 CLI is automatically installed on all cluster nodes. You can also install the CLI on any machine and use it to operate clusters that are not managed by DKP.
On the command line, the utility can be invoked using the d8
alias. All the commands are grouped by their function:
The d8 d
and d8 mirror
command groups are not available for Community Edition (CE) and Basic Edition (BE).
d8 k
— thekubectl
command family.
For example,d8 k get pods
is the same askubectl get pods
.-
d8 dk
— the range of delivery-related commands (see thewerf
tool).
For example, you can rund8 d plan --repo registry.deckhouse.io
instead ofwerf plan --repo registry.deckhouse.io
. -
d8 mirror
— the range of commands that allow you to copy DKP distribution images to a private container registry (previously thedhctl mirror
tool was used for this purpose). For example, you can rund8 mirror pull -l <LICENSE> <TAR-BUNDLE-PATH>
instead ofdhctl mirror --license <LICENSE> --images-bundle-path <TAR-BUNDLE-PATH>
.Usage scenarios:
-
d8 v
— the set of commands for managing virtual machines created by Deckhouse Virtualization Platform.
For example, thed8 virtualization console
command execs you into the VM console.More virtualization commands...
d8 v console
execs you into the VM console.d8 v port-forward
forwards local ports to the virtual machine.d8 v scp
uses the SCP client to work with files on the virtual machine.d8 v ssh
connects you to the virtual machine over SSH.d8 v vnc
connects you to the virtual machine over VNC.
How do I install Deckhouse CLI?
Starting from Deckhouse CLI 0.10 it can be installed using trdl.
Please note that since version 0.10, installation is available only via trdl. If you have a version lower than 0.10 installed, then you must first uninstall it.
If you need to install one of the versions below 0.10, use the outdated installation method.
-
Add the Deckhouse CLI repository to trdl:
URL=https://trrr.flant.dev/trdl-deckhouse-cli ROOT_VERSION=1 ROOT_SHA512=$(curl -Ls ${URL}/${ROOT_VERSION}.root.json | sha512sum | tr -d '\-[:space:]\n') REPO=trdl-deckhouse-cli trdl add $REPO $URL $ROOT_VERSION $ROOT_SHA512
-
Install stable release:
trdl update $REPO $ROOT_VERSION stable
-
Validate that the
d8
binary is installed:. $(trdl use $REPO $ROOT_VERSION stable) && d8 --version
On macOS you might need to remove the quarantine attribute from binary to prevent Gatekeeper from blocking it.
(sudo xattr -d com.apple.quarantine /path/to/d8
)