---
schema_version: "1"
id: d656a9e8f86e7148762f4d953f6e37ad0cf0c85ea5e394d5c5ac5dee5b0dc112
title: Installing Multiple Instances of Runtime Fabric on a Single OpenShift Cluster
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/runtime-fabric/2.11/install-multiple-instances-openshift.md
canonical_url: https://docs.mulesoft.com/runtime-fabric/2.11/install-multiple-instances-openshift
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3005de9d4677700bc3b642271123e4536bd9db026d4d4fb9ed7646c81f99dbf1
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: Runtime Fabric
version: 2.11
---

# Installing Multiple Instances of Runtime Fabric on a Single OpenShift Cluster

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

Installing multiple instances of Anypoint Runtime Fabric enables you to share the same cluster among
multiple Runtime Fabrics, which helps you to use resources efficiently.

## Install Multiple Instances of Runtime Fabric

To install multiple instances of Anypoint Runtime Fabric on a single OpenShift cluster, follow these
steps:

1.  Create a Runtime Fabric using Runtime Manager for OpenShift.

2.  Create a custom namespace to install the Runtime Fabric:

    kubectl create ns <rtf\_namespace>

3.  Create a Docker pull secret to pull the Runtime Fabric component images for the previously
    created namespace:

    kubectl create secret docker-registry rtf-pull-secret --namespace <rtf\_namespace>
    --docker-server=<docker\_registry\_url> --docker-username=<docker\_registry\_username>
    --docker-password=<docker\_ registry\_password>

## Values.yaml Reference

The following is an example of the `values.yaml` file:

activationData: <activation\_data> proxy: http\_proxy: http\_no\_proxy: monitoring\_proxy:
custom\_log4j\_enabled: true muleLicense: <mule\_license\_key> global: crds: install: true
authorizedNamespaces: false image: rtfRegistry: rtf-runtime-registry.kprod.msap.io pullSecretName:
rtf-pull-secret containerLogPaths:

- /var/lib/docker/containers
- /var/log/containers
- /var/log/pods

## Installing Subsequent Instances of Runtime Fabric

To install subsequent instances of Runtime Fabric for OpenShift, you must repeat the previous steps:

1.  Create a Runtime Fabric using Runtime Manager for OpenShift.

2.  Create a custom namespace to install the Runtime Fabric:

    kubectl create ns <rtf\_namespace>

3.  Create a Docker pull secret to pull the Runtime Fabric component images for the previously
    created namespace:

    kubectl create secret docker-registry rtf-pull-secret --namespace <rtf\_namespace>
    --docker-server=<docker\_registry\_url> --docker-username=<docker\_registry\_username>
    --docker-password=<docker\_ registry\_password>

4.  In the Red Hat OpenShift console, navigate to **Operators > Installed Operators**.

5.  In the console, switch the value of **Project** to the namespace you created for installing
    Runtime Fabric.

6.  Update your `values.yaml` file with any additional required parameters.

7.  Set `authorizedNamespaces` to `true`, if you’re using authorized namespaces.

8.  Set `crds.install` to `false`.

9.  Click **Create**.

## (Optional) Configure Authorized Namespaces

You can optionally configure [authorized namespaces](https://docs.mulesoft.com/runtime-fabric/2.11/authorized-namespaces), which enable you to
deploy Runtime Fabric alongside other services in a Kubernetes cluster.

### Before You Begin

Before configuring authorized namespaces, note this:

- You must create the `authorized-namespaces` ConfigMap file _before_ installing Runtime Fabric.
  Additionally, you must name the ConfigMap, `authorized-namespaces`.

- The `rtf:resource-metrics-collector` ClusterRole has cluster-wide permissions to `get` and `list`
  nodes, pods, and namespaces and has `watch` permissions for nodes. The role ClusterRole is defined
  as follows:

  apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name:
  rtf:resource-metrics-collector labels: {{- include "labels.standard" . | nindent 4 }} rules:
  - apiGroups: \[""\] resources: \["nodes", "pods", "namespaces"\] verbs: \["list", "get"\]
  - apiGroups: \[""\] resources: \["nodes"\] verbs: \["watch"\]
  1.  In your cluster, create an additional namespace for application deployments, and add the
      necessary labels to the namespace. To do so, create a YAML file with these contents:

      ```copy
      apiVersion: v1
      kind: Namespace
      metadata:
        name: <namespace>
        labels:
          rtf.mulesoft.com/agentNamespace: <rtf_namespace>
          rtf.mulesoft.com/envId: <environment_id>
          rtf.mulesoft.com/org: <org_id>
          rtf.mulesoft.com/role: workers
      ```

  2.  Apply the file you just created:

      ```copy
      oc apply -f <filename>.yaml
      ```

  3.  Repeat steps 1 and 2 to add as many namespaces as you need.

  4.  Create the RoleBinding for the Runtime Fabric agent ClusterRole that includes the Runtime
      Fabric agent ServiceAccount. To do so, apply this configuration in your additional namespace:

      ```copy
      kind: RoleBinding
      apiVersion: rbac.authorization.k8s.io/v1
      metadata:
        name: <name>
        namespace: <app_namespace>
      subjects:
        - kind: ServiceAccount
          name: rtf-agent
          namespace: <rtf_namespace>
      roleRef:
        kind: ClusterRole
        name: rtf:agent-<rtf_namespace>
        apiGroup: rbac.authorization.k8s.io
      ```

  5.  Apply this RoleBinding template to rtf namespace and any additional namespaces:

      ```copy
      apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
        name: rtf
        namespace: <rtf_namespace>
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: system:openshift:scc:anyuid
      subjects:
        - kind: ServiceAccount
          name: rtf-agent
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: mule-clusterip-service
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: resource-cache
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: rtf-persistence-gateway
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: cluster-status
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: am-log-forwarder
          namespace: <rtf_namespace>
      ```

      For `<additional-namespace>`, use the same template as well:

      ```copy
      apiVersion: rbac.authorization.k8s.io/v1
      kind: RoleBinding
      metadata:
        name: rtf
        namespace: <app_namespace>
      roleRef:
        apiGroup: rbac.authorization.k8s.io
        kind: ClusterRole
        name: system:openshift:scc:anyuid
      subjects:
        - kind: ServiceAccount
          name: rtf-agent
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: mule-clusterip-service
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: resource-cache
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: rtf-persistence-gateway
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: cluster-status
          namespace: <rtf_namespace>
        - kind: ServiceAccount
          name: am-log-forwarder
          namespace: <rtf_namespace>
      ```

  6.  In your cluster, create a ConfigMap file named `authorized-namespaces` and list any additional
      namespaces. Note that the additional namespace mapping keys must be unique since they use the
      standard K8s resource (ConfigMap). There is no specific requirements on the format of the key
      name provided they are unique.

      ```copy
      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: authorized-namespaces
        namespace: <rtf_namespace>
      data:
        APPLICATION_NAMESPACE_1: "<app_namespace_1>"
        APPLICATION_NAMESPACE_2: "<app_namespace_1>
      ```

  7.  If, after fully installing Runtime Fabric, you later add or delete any namespaces from the
      ConfigMap, you must restart the Runtime Fabric agent pod. To do so, run this command:

      ```copy
      oc -nrtf delete po -l app=agent
      ```

      After you delete the pod, Kubernetes starts a new one.

### Install the Red Hat OpenShift Runtime Fabric Operator

You install the Runtime Fabric operator (`rtf-agent-operator`) from the OperatorHub.

1.  In the Red Hat OpenShift console, navigate to **Operators** > **OperatorHub**.

2.  In the OperatorHub search field, search for the Runtime Fabric operator.

3.  In the rtf-agent-operator dialog, click **Install**.

> [!NOTE] Installing the Runtime Fabric operator requires manual approval and may take several
> minutes to complete.

## Values.yaml File Required Parameters

The values for these required parameters are set when you create the Runtime Fabric instance in
Runtime Manager. If you’re not using a local registry, use the default values for the registry URL
and pull secret.

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Key</th><th>Value</th><th>Example</th></tr></thead><tbody><tr><td><p><code>activationData</code></p></td><td><p>Activation Data</p></td><td><p>YW55cG9pbnQubXVsZXNvZnQuY29tOjBmODdmYzYzLTM3MWUtNDU2Yy1iODg5LTU5NTkyNjYyZjUxZQ==</p></td></tr><tr><td><p><code>rtfRegistry</code></p></td><td><p>Registry URL</p></td><td><p>US rtf-runtime-registry.kprod.msap.io</p><p>EU rtf-runtime-registry.kprod-eu.msap.io</p></td></tr><tr><td><p><code>pullSecretName</code></p></td><td><p>Registry pull secret</p></td><td><p>rtf-pull-secret</p></td></tr><tr><td><p><code>muleLicense</code></p></td><td><p>Mule license for applications</p></td><td><p>Mule license key (must be Base64-encoded)</p></td></tr></tbody></table>

## Values.yaml Optional Parameters

Set these optional parameters as needed:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Key</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><p><code>authorizedNamespaces</code></p></td><td><p>Enables shared tenancy</p></td><td><p>authorizedNamespaces=true</p></td></tr><tr><td><p><code>crds.install</code></p></td><td><p>Enables installation of Crds and PriorityClass</p></td><td><p>install=true</p></td></tr><tr><td><p><code>proxy.http.proxy</code><br><code>proxy.http.no_proxy</code> `</p></td><td><p>Proxy and no_proxy values</p></td><td><p>- http://&lt;user&gt;:&lt;pass&gt;@&lt;10.0.0.1&gt;:&lt;8080&gt;<br>- &lt;1.1.1.1:8888,2.2.2.2:9999&gt;</p></td></tr><tr><td><p><code>proxy.monitoring.proxy</code></p></td><td><p>Monitoring proxy values</p></td><td><p>socks5://&lt;user&gt;:&lt;pass&gt;@&lt;10.0.0.2&gt;:&lt;8080&gt;</p></td></tr><tr><td><p><code>global.containerLogPaths</code></p></td><td><p>Filebeat read path</p></td><td><p>- /var/lib/docker/<br>- /var/log/containers<br>- /var/log/pods</p></td></tr></tbody></table>

> [!NOTE] For the first agent being installed on the cluster, set the value for `crds.install` to
> `true`.  
> Set `crds.install` to `false` for all the subsequent agent installations on the same cluster.

## See Also

[Installing Runtime Fabric](https://docs.mulesoft.com/runtime-fabric/2.11/install-index)
