Skip to main content Skip to complementary content

Using dynctl to troubleshoot Dynamic Engine

Availability-noteBeta

Use dynctl to monitor, debug, and troubleshoot a Dynamic Engine cluster and services running in it.

The dynctl commands allow you to
  • Check dynctl version.
  • Generate shell completion scripts.
  • Retrieve cluster details.
  • View logs of running services in the Dynamic Engine cluster.

The dynctl syntax

The general syntax for dynctl commands is:

dynctl [command] [params] [flags]

In this syntax:

command
Specifies the operation to perform, such as collecting logs or listing environments.
params
Provides additional details required for the command, such as resource IDs.
flags
Sets additional instructions, such as --kubeconfig to override the default Kubeconfig file.
Information noteImportant: Command-line flags take precedence over default values, configuration file settings, and environment variables. The order of precedence for configuration values is:
  1. Command-line flags (highest priority).
  2. Environment variables.
  3. Configuration in YAML file (lowest priority).

The dynctl commands

Command Syntax Description
version dynctl version Shows the current dynctl version.
completion dynctl completion [shell] Creates shell-specific completion scripts (Bash, Zsh, PowerShell, and Fish). For more details, see Optional: Installing the dynctl auto-completion feature.
get dynctl get [flags] Retrieves Dynamic Engine details from the cluster.
get environment dynctl get environment <name> [flags]

dynctl get env <name> [flags]

  • name: The name of the Dynamic Engine environment to print details of. If omitted, lists all environments.
Lists Dynamic Engine environments or provides details about a specific environment.
help dynctl help <command> Gets help for a specific command.
logs dynctl logs [flags] Displays logs for running Dynamic Engine services in the cluster.
logs environment dynctl logs environment <name> [flags]

dynctl logs env <name> [flags]

  • name: The name of the Dynamic Engine environment to print details of. If omitted, lists all environments.
Displays logs of running services for the specified Dynamic Engine environment.

The dynctl command flags

Flags modify command behavior by overriding default settings. They fall into two categories:

  1. Global flags: Apply to all commands.
  2. Command-specific flags: Apply only to designated commands.
Command-line flags take precedence over default values in the configuration file and environment variables. The order of precedence for configuration values is:
  1. Command-line flags as explained above (highest priority).
  2. Environment variables.
  3. Configuration in YAML file (lowest priority).
Global flags
--config
Overrides the default dynctl configuration file, $HOME/.dynctl/config.
--kubeconfig
Overrides the default kubectl configuration for cluster connection.
--kubecontext
Overrides the Kubernetes context that defaults to default-context in the kubeconfig file.
-d, --debug
Enables debug mode, converting dynctl logs from JSON to human-readable format.
-v, --verbose
Enables verbose mode, logging all dynctl log levels.
-h, --help
Displays help information for the command.
Command-specific flags for logs and logs environment
--follow, -f
Continuously streams logs as they are generated. Default: false.
--output, -o
Specifies log output format, either stdout or zip. Default: stdout.
--output-file
Sets the path for the output file. Default: autogenerated.
--service, -s
Filters logs by specified service. You can use this flag multiple times to filter for multiple services.
--since
Shows log output generated within a specified duration, for example, 300ms, -1.5h, 2h45m. Valid time units are ns, us (or µs), ms, s, m, h. Default: all logs.
--tail
Specifies the number of log output lines to display. Default: all lines.

The dynctl configuration methods

The dynctl tool can be configured using multiple methods, listed in order of precedence:

  1. Command-line flags as explained above (highest priority).
  2. Environment variables.
  3. Default values in YAML file (lowest priority).
Configuration method mapping
Flag Environment variable YAML key Default Description
--config DYNCTL_CONFIG config $HOME/.dynctl/config The dynctl configuration file path
--kubeconfig DYNCTL_KUBECONFIG k8s.config kubectl's default Kubernetes configuration file(s) for dynctl
--kubecontext DYNCTL_KUBECONTEXT k8s.context kubectl's current context Kubernetes context for dynctl
--debug DYNCTL_DEBUG debug false Debug mode
--verbose DYNCTL_VERBOSE verbose false Verbose mode

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!