---
schema_version: "1"
id: 30c82c81fed9ee3490eabba4232d47ad50f7b547313fa23fb0d63a2b47ae2bb6
title: Using the Runtime Fabric Command Line Tool
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/runtime-fabric/2.5/install-rtfctl.md
canonical_url: https://docs.mulesoft.com/runtime-fabric/2.5/install-rtfctl
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8e42fba53a687c0f36ad248c0350e276f53cc5b758937a2e02ef4ead0218a0b2
description: MuleSoft Documentation Site
release: "2.5"
latest: false
---
---
product: Runtime Fabric
version: 2.5
---

# Using the Runtime Fabric Command Line Tool

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Install and use the `rtfctl` command line tool to locally manage Runtime Fabrics. The `rtfctl` tool
supports the following actions:

- Get the status of a Runtime Fabric.

- Perform a heap dump or a thread dump of a running application.

- Display memory usage of a running application.

- Manage proxy settings.

- Manage secure properties.

- Manage a Mule license.

- Manage the alert sender email address.

If you are using the default namespace (rtf), you do not need to specify the additional flag
`--namespace <rtf_namespace>`. Note that this flag is introduced only as of rtfctl version 0.4.1.

## Install rtfctl

> [!IMPORTANT] The tasks in the section must be performed by an IT administrator.
>
> If you’re using Runtime Fabric for AKS and have the AKS-managed Azure AD integration enabled, the
> following command returns the credentials needed to run rtfctl commands:
>
> `az aks get-credentials --name <NAME> --resource-group <RESOURCE_GROUP> --admin`

1.  Download the `rtfctl` command-line tool:

    `rtfctl` is supported on Windows, MacOS (Darwin), and Linux. Choose the appropriate method:

    - Windows

      curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl-windows/latest -o
      rtfctl.exe

    - MacOS (Darwin)

      curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl-darwin/latest -o
      rtfctl

    - Linux

      curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl/latest -o rtfctl

2.  Change file permissions for the `rtfctl` command-line tool:

    chmod +x rtfctl

### Running Commands

The `rtfctl` command line tool consumes kubeconfig files as described in
[Organizing Cluster Access Using kubeconfig Files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/).
Use this method to configure which cluster you want to manage. Confirm that the `rtfctl` binary is
present in the current working directory and in the user `$PATH`.

- Run `rtfctl` commands as a privileged user.

- To list all supported commands, run `rtfctl -h`.

- For more information about a specific command, run `rtfctl <command> -h`.

### Checking for Proxy Settings

When you run commands, `rtfctl` checks for any proxy settings in your environment. The tool looks
for a `NO_PROXY` key (in upper case) and will accept a `no_proxy` key (in lower case) if `NO_PROXY`
is not used. If both keys are present, `rtfctl` uses `NO_PROXY`. The `rtfctl` tool sets the key in
your local Kubernetes context to honor your proxy settings.

## Commands for Configuring Runtime Fabric

Use the following commands to configure Runtime Fabric.

<table><colgroup><col> <col></colgroup><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><a href="#apply"><code>apply</code></a></p></div></div></td><td><div><div><p>Applies changes to a Runtime Fabric configuration</p></div></div></td></tr><tr><td><div><div><p><a href="#update"><code>update</code></a></p></div></div></td><td><div><div><p>Updates rtfctl</p></div></div></td></tr><tr><td><div><div><p><a href="#wait"><code>wait</code></a></p></div></div></td><td><div><div><p>Waits for Runtime Fabric components to become ready</p></div></div></td></tr></tbody></table>

### `apply`

Applies changes to a Runtime Fabric configuration.

> [!NOTE] You can use the `rtfctl apply system-configuration` command to update OpenShift
> system-configuration values. Other rtfctl apply commands are not effective for OpenShift. For any
> other updates, modify the values in the OpenShift console.

- Applies an HTTP proxy configuration

  rtfctl apply http-proxy http://<host>:<port> --namespace <rtf\_namespace>

- Applies an HTTP proxy configuration with hostnames bypassing the proxy

  rtfctl apply http-proxy http://<host>:<port> --no-proxy "DOMAIN1.com,DOMAIN2.com" --namespace
  <rtf\_namespace>

- Applies an HTTP proxy configuration with authentication

  rtfctl apply http-proxy http://<username>:<password>@<host>:<port> --namespace <rtf\_namespace>

- Clears an HTTP proxy configuration

  rtfctl apply http-proxy "" --no-proxy "" --namespace <rtf\_namespace>

- Applies a secure property

  rtfctl apply secure-property --key <key> --value <value> --app-namespace <app\_namespace>
  --namespace <rtf\_namespace>

- Applies a system configuration on a host node

  rtfctl apply system-configuration

- Applies a system configuration on a host node without downloading the latest scripts

  rtfctl apply system-configuration --skip-download

- Applies a Mule license

  rtfctl apply mule-license <base64\_encoded\_license> --namespace <rtf\_namespace>

- Applies a monitoring proxy

  rtfctl apply monitoring-proxy http://<host>:<port> --namespace <rtf\_namespace>

- Clears a monitoring proxy configuration

  rtfctl apply monitoring-proxy "" --namespace <rtf\_namespace>

### `update`

Updates `rtfctl`.

- Updates from the US control plane

  rtfctl update

- Updates `rtfctl` from the EU control plane

  rtfctl update --host eu1.anypoint.mulesoft.com

### `wait`

Waits for Runtime Fabric components to become ready

- Specifies the number of seconds to wait

rtfctl wait <value\_in\_seconds> --namespace <rtf\_namespace>

- Specifies the number of seconds to pass before timing out the wait (Default is 600 seconds)

rtfctl wait --timeout <value\_in\_seconds> --namespace <rtf\_namespace>

## Commands for Installing and Upgrading Runtime Fabric

Use the following commands when installing or upgrading Runtime Fabric, or when performing a back up
or restore.

<table><colgroup><col> <col></colgroup><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><a href="#install"><code>install</code></a></p></div></div></td><td><div><div><p>Installs Runtime Fabric</p></div></div></td></tr><tr><td><div><div><p><a href="#backup"><code>backup</code></a></p></div></div></td><td><div><div><p>Performs a back up of the local Runtime Fabric state</p></div></div></td></tr><tr><td><div><div><p><a href="#restore"><code>restore</code></a></p></div></div></td><td><div><div><p>Restores local Runtime Fabric state from a backup</p></div></div></td></tr><tr><td><div><div><p><a href="#validate"><code>validate</code></a></p></div></div></td><td><div><div><p>Validates the cluster for Runtime Fabric installation</p></div></div></td></tr><tr><td><div><div><p><a href="#version"><code>version</code></a></p></div></div></td><td><div><div><p>Displays the Runtime Fabric version information</p></div></div></td></tr></tbody></table>

### `install`

- Installs Runtime Fabric

rtfctl install <activation\_data>

- Override the Docker image registry URL and secret

  rtfctl install <activation\_data> --image-pull-registry <string> --image-pull-secret <string>

### `backup`

Performs a back up of the local Runtime Fabric state.

rtfctl backup <backup\_file\_name>.tar.gz --namespace <rtf\_namespace>

### `restore`

Restores the local Runtime Fabric state from a backup

rtfctl restore <backup\_file\_name>.tar.gz --namespace <rtf\_namespace>

### `validate`

Validates the cluster for a Runtime Fabric installation

- Performs a validation check

  rtfctl validate <activation\_data>

- Performs a validation check and passes the `fabric.tf` configuration file that contains proxy
  settings

  rtfctl validate -f <path\_to\_settings\_file>

  To validate installation with a proxy, you must specify proxy settings in your `settings` file:

MULE\_LICENSE=<your-mule-license> ACTIVATION\_DATA=<activation\_data>
HTTP\_PROXY=http://<proxy\_domain>.com:<port>

- Override the Docker image registry URL and secret

  rtfctl validate <activation\_data> --image-pull-registry <string> --image-pull-secret <string>

### `version`

Displays the Runtime Fabric version information

rtfctl version --namespace <rtf\_namespace>

## Commands for Managing Applications on Runtime Fabric

Use the following commands to manage applications deployed to Runtime Fabric.

<table><colgroup><col> <col></colgroup><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><a href="#delete"><code>delete</code></a></p></div></div></td><td><div><div><p>Deletes a secure property</p></div></div></td></tr><tr><td><div><div><p><a href="#disk"><code>disk</code></a></p></div></div></td><td><div><div><p>Displays disk usage for an application</p></div></div></td></tr><tr><td><div><div><p><a href="#restart"><code>restart</code></a></p></div></div></td><td><div><div><p>Restarts an application</p></div></div></td></tr></tbody></table>

### `delete`

Deletes a secure property

rtfctl delete secure-property <sample\_key> -n <app\_namespace>

### `disk`

Displays disk usage for an application

- Displays the disk usage for an application, using the first replica by default

  rtfctl disk <app\_name> --app-namespace <app\_namespace> --namespace <rtf\_namespace>

- Displays the disk usage for an application, using a specific replica

  rtfctl disk <app\_name> --details --pod <replica\_name> --app-namespace <app\_namespace>
  --namespace <rtf\_namespace>

### `restart`

Restarts an application

rtfctl restart <app\_name> --app-namespace <app\_namespace> --namespace <rtf\_namespace>

## Commands for Troubleshooting Runtime Fabric

Use the following commands to troubleshoot Runtime Fabric.

<table><colgroup><col> <col></colgroup><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><a href="#get"><code>get</code></a></p></div></div></td><td><div><div><p>Displays one or more resources</p></div></div></td></tr><tr><td><div><div><p><a href="#ping"><code>ping</code></a></p></div></div></td><td><div><div><p>Tests network connectivity</p></div></div></td></tr><tr><td><div><div><p><a href="#report"><code>report</code></a></p></div></div></td><td><div><div><p>Generates a diagnostics report</p></div></div></td></tr><tr><td><div><div><p><a href="#status"><code>status</code></a></p></div></div></td><td><div><div><p>Displays the status of Runtime Fabric</p></div></div></td></tr><tr><td><div><div><p><a href="#test"><code>test</code></a></p></div></div></td><td><div><div><p>Verifies outbound network connectivity to the Runtime Fabric control plane</p></div></div></td></tr></tbody></table>

### `get`

Displays one or more resources

- Prints a list of all applications in all environments

  rtfctl get apps --namespace <rtf\_namespace>

- Prints a list of all applications in a specific environment

  rtfctl get apps --app-namespace <app\_namespace> --namespace <rtf\_namespace>

- Displays an HTTP proxy configurations

  rtfctl get http-proxy --namespace <rtf\_namespace>

- Displays a monitoring proxy configuration

  rtfctl get monitoring-proxy --namespace <rtf\_namespace>

- Displays secure properties

  rtfctl get secure-properties --app-namespace <app\_namespace> --namespace <rtf\_namespace>

- Displays the Mule license

  rtfctl get mule-license --namespace <rtf\_namespace>

- Displays Runtime Fabric registry credentials

  rtfctl get registry-credentials <activation\_data>

### `ping`

Tests network connectivity

- Pings example.com from inside an application, using the first replica by default

  rtfctl ping <app\_name> <host\_or\_ip\_address> --app-namespace <app\_namespace> --namespace
  <rtf\_namespace>

- Attempts to connect to example.com on port `12345` from inside an application, using the first
  replica by default

  rtfctl ping <app\_name> <host\_or\_ip\_address> --port <port> --app-namespace <app\_namespace>
  --namespace <rtf\_namespace>

### `report`

Generates a diagnostics report at `rtf-report.tar.gz`

rtfctl report --namespace <rtf\_namespace>

Run rtfctl report tasks in parallel by using the `workers` flag that controls the number of tasks to
run in parallel. The default value is 10.

rtfctl report --workers <num\_of\_workers>

Faster compression of the tarball generated by `rtfctl report` with the `--use-fast-compression`
flag. The default value is false.

rtfctl report --use-fast-compression=true

Select which application namespaces to include in the report besides the installation namespace by
using the `--namespaces` flag. The flag controls what to include in the reports and can result in
faster collection if only selected namespaces are reported.

# Reports rtf installation default namespace (rtf)

rtfctl report

# Reports only <rtf\_namespace>

rtfctl report -n <rtf\_namespace>

# Reports for <app\_namespace\_1> and <app\_namespace\_2> application namespaces that belong to <rtf\_namespace>

rtfctl report -n <rtf\_namespace> --app-namespaces <app\_namespace\_1>,<app\_namespace\_2> rtfctl
report -n <rtf\_namespace> --app-namespaces <app\_namespace\_1> --app-namespaces <app\_namespace\_2>

# Report for all application namespaces that belong to <rtf\_namespace>

rtfctl report -n <rtf\_namespace> --app-namespaces all

### `status`

Displays the status of Runtime Fabric

- Displays status output in JSON

  rtfctl status --output json --namespace <rtf\_namespace>

- Checks Kubernetes DNS health

  rtfctl status dns-check --node-label "<k>:<v>"

### `test`

Verifies outbound network connectivity to the Runtime Fabric control plane.

- Schedules a check on any nodes

  rtfctl test outbound-network --namespace <rtf\_namespace>

- Schedules a check the nodes satisfying the `node-label` parameter

  rtfctl test outbound-network --node-label "<k>:<v>" --namespace <rtf\_namespace>

- Schedules a check on all nodes

  rtfctl test outbound-network --all --namespace <rtf\_namespace>

## Usage

### Install a Mule license

1.  Make sure to base64 encode the license.

2.  Run the following command:

    ./rtfctl apply mule-license '<license-key-information>' --namespace rtf1 Updating rtf
    namespace... OK

### Capture a Heap Dump

/usr/local/bin/rtfctl heapdump hello-world /tmp/dump.hprof --app-namespace bed42b62-XXXX --namespace
rtf1 Dumping heap for hello-world-f76484d8-l44qv... Heap dump written to /tmp/dump.hprof

For additional information, run the `rtfctl heapdump -h` command.

### Working with Multiple Replicas

For application management commands that accept a `--pod` flag, you can obtain the list of replicas
using the `describe` command:

./rtfctl describe apps hello-world --app-namespace bed42b62-XXXX --namespace rtf1 Name: hello-world
Namespace: bed42b62-XXXX Status: PROGRESSING Runtime: 2 ID: Version: Organization ID: d30f74c0-XXXX
Replicas: 1 desired | 1 updated | 1 total | 0 available | 1 unavailable

Name Status

---

hello-world-77f5897949-z54gb Pending

## Auditing rtfctl Operations

The `rtfctl` command line tool (from v1.0.29 and above) audits the `rtfctl` operations on the
cluster and it helps cluster administrators and you to track operations that impact Runtime Fabric
core software.

Consider the following points:

- Audit logs are stored in a Kubernetes secret in the `rtfctl-audit` namespace.

- Audit logs are cluster scoped and not attached to Runtime Fabric core software lifecycle.

- Command executions remain operational even if the auditing process fails to audit the operation.

To audit the operations, run the following command:

./rtfctl audit-logs

An output example:

\[{"timestamp":"2023-10-26 00:52:24.446 +0000
UTC","kubeContext":"test-k8scontext","command":\["./rtfctl","restart","test-application","--app-namespace","8456f9c7-2149-4983-b02b-6b18ddd28efe","--namespace","rtf"\]}\]

> [!NOTE] Currently audit logs rollover or rotation is not supported.

## Understanding rtfctl Output

The `rtfctl` command line tool commonly calls other applications and system tools, and the output of
those calls is sent to standard output and standard error output. This output is written in the
context of each operation performed.

The `rtfctl` command line tool includes a last output line on the most verbose commands to make it
clear whether the operation succeed or failed. Normal operation may include some intermediate
_failure_ messages, such as when a stopped system unit is attempted to be stopped again.

If you are in doubt about whether a message represents a problem or not, discuss it with your system
administrator or contact MuleSoft support.

## Download Previous rtfctl CLI Versions

Use the following rest API call to download different rtfctl tool CLI versions:

curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl/{version} -o rtfctl

## See Also

- [Manage Proxies Used by Runtime Fabric](https://docs.mulesoft.com/runtime-fabric/2.5/manage-proxy-self)

- [Manage Secure Properties in Runtime Fabric](https://docs.mulesoft.com/runtime-fabric/2.5/manage-secure-properties)
