---
schema_version: "1"
id: 9a7e6be46c416a2b71a1ab330cd532080a456f801c7ae0ae50f9562f24589994
title: Install 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.9/install-rtfctl.md
canonical_url: https://docs.mulesoft.com/runtime-fabric/2.9/install-rtfctl
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 94da7e8f516b0ddb20ace2634116ec4dbfc4b0b6dd9537a886df4e509a57a998
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: Runtime Fabric
version: 2.9
---

# Install the Runtime Fabric Command Line Tool

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

Install the `rtfctl` command-line tool to locally manage Runtime Fabrics.

> [!NOTE] If you are using the default namespace (rtf), don’t specify the flag
> `--namespace <rtf_namespace>`. This flag is introduced only as of `rtfctl` version 0.4.1.

## Install RTFCTL Tool

> [!IMPORTANT] Your IT administrator must perform these installation tasks.
>
> If you’re using Runtime Fabric for AKS and have the AKS-managed Azure AD integration enabled, this
> command returns the credentials needed to run `rtfctl` commands:
>
> `az aks get-credentials --name <NAME> --resource-group <RESOURCE_GROUP> --admin`

`rtfctl` is supported on Windows, MacOS (Darwin), and Linux.

Perform these steps for the installation:

1.  Download the `rtfctl` command-line tool by running the appropriate operating system CURL
    command:

    - 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 the file permissions for the `rtfctl` command-line tool:

    chmod +x rtfctl

### Run 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`.

### Check 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 accepts 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.

## Install a Mule License

To install a Mule license, follow these steps:

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

To capture a heap dump, run this command:

/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.

## Work 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

## Audit 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 this 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.

## Understand 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

- [Using RTFCTL Tool Overview](https://docs.mulesoft.com/runtime-fabric/2.9/using-rtfctl)
