---
schema_version: "1"
id: ce5cbda6795a6a91b902eb0c481899db17ae80e363bddebed702bc0aab97b7d3
title: Registering and Running in Connected Mode with a Token
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.12/flex-conn-reg-run-token.md
canonical_url: https://docs.mulesoft.com/gateway/1.12/flex-conn-reg-run-token
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 416cc75b51483926356b43e8492562a56920dd062ca188783c104d3f3d00fde3
description: MuleSoft Documentation Site
release: "1.12"
latest: false
---
---
product: Omni Gateway
version: 1.12
---

# Registering and Running in Connected Mode with a Token

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

<table><colgroup><col> <col> <col> <col></colgroup><tbody><tr><td><div><div><p><span><a href="#linux"><img src="https://docs.mulesoft.com/gateway/1.12/_images/install-linux-logo.png" alt="20%" width="20%"></a></span></p></div></div></td><td><div><div><p><span><a href="#container"><img src="https://docs.mulesoft.com/gateway/1.12/_images/install-container-logo.png" alt="25%" width="25%"></a></span></p></div></div></td><td><div><div><p><span><a href="#kubernetes"><img src="https://docs.mulesoft.com/gateway/1.12/_images/install-kubernetes-logo.png" alt="20%" width="20%"></a></span></p></div></div></td><td><div><div><p><span><a href="#openshift"><img src="https://docs.mulesoft.com/gateway/1.12/_images/install-openshift-logo.png" alt="20%" width="20%"></a></span></p></div></div></td></tr><tr><td><div><div><p><a href="#linux">Linux</a></p></div></div></td><td><div><div><p><a href="#container">Container</a></p></div></div></td><td><div><div><p><a href="#kubernetes">Kubernetes</a></p></div></div></td><td><div><div><p><a href="#openshift">OpenShift</a></p></div></div></td></tr></tbody></table>

## Before You Begin

Before registering Flex Gateway, you must complete the following tasks:

- [Install a Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-install)

- Request _Manage Servers_ and _Read Servers_ permissions in Runtime Manager from your Anypoint
  Platform admin

- Collect the following information from your Anypoint Platform instance:

  - The **Organization ID** for the organization where you want to run Flex Gateway

    See
    [Find your Organization ID](https://docs.mulesoft.com/access-management/managing-business-groups#find-your-organization-id)
    for more information on how to find your Organization ID.

  - The registration **token** for the environment in Anypoint Platform where you want to run Flex
    Gateway

    Navigate to Runtime Manager, select **Flex Gateways** in the left navigation, and click **Add
    Gateway** to generate set of instructions that includes a command block with the registration
    token.

## Register and Run with a Token as a Linux Service

Flex Gateway runs on the following Long Term Support (LTS) versions of Linux:

- Amazon Linux 2023

- CentOS 8

- Debian Bookworm

- Red Hat Enterprise Linux (9)

- Red Hat Enterprise Linux (9) on IBM Power (ppc64le)

- Ubuntu Jammy

To register a Flex Gateway with Anypoint Platform, you must enter the registration command and then
the start command. Each command includes information specific to your Anypoint Platform instance and
**must be updated before** executing. See [Before You Begin](#prereqs) for more information on how
to find the information you will need.

### Collect Your Registration Data

Before registering your Flex Gateway instance, collect information for the following registration
command options:

- `--token` = the registration token for your environment in Anypoint Platform

- `--organization` = your Organization ID in Anypoint Platform

- `--split` (optional) = the flag that determines whether registration information should split into
  multiple files. The default value is `false`.

  If `split` is set to `true`, registration information is split into two files: `registration.yaml`
  and `certificate.yaml`. If `false`, all registration information is contained in one file:
  `registration.yaml`.

- `--output-directory` (optional) = the directory in which registration information is output

- `my-gateway` = the name you want to assign the gateway cluster

### Register Flex Gateway

Register your Flex Gateway instance using the data that you gathered for the command options.

```ssh
flexctl registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/usr/local/share/mulesoft/flex-gateway/conf.d \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

### Start Commands

Start Flex Gateway with the following command:

```ssh
sudo systemctl start flex-gateway
```

Verify that the Flex Gateway service is running successfully:

```ssh
systemctl list-units flex-gateway*
```

If `flex-gateway.service` has a status of `active`, Flex Gateway is successfully running.

```text
  UNIT                              LOAD   ACTIVE SUB     DESCRIPTION
  flex-gateway.service              loaded active running Application
```

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your new gateway in the
UI. Notice that your gateway’s current status is **Running**. Refresh the page, if necessary.

> [!NOTE] After 30 days, a stopped or deleted gateway is removed from the Runtime Manager UI.
> Otherwise, the UI continues to list the gateway even if it is no longer running or connected.

## Register and Run with a Token in a Container

You can register and run Flex Gateway for use in one of the following containers:

<table><colgroup><col> <col></colgroup><tbody><tr><td><div><div><p><span><a href="#docker"><img src="https://docs.mulesoft.com/gateway/1.12/_images/install-docker-logo.png" alt="15%" width="15%"></a></span></p></div></div></td><td><div><div><p><span><a href="#podman"><img src="https://docs.mulesoft.com/gateway/1.12/_images/install-podman-logo.png" alt="12%" width="12%"></a></span></p></div></div></td></tr><tr><td><div><div><p><a href="#docker">Docker</a></p></div></div></td><td><div><div><p><a href="#podman">Podman</a></p></div></div></td></tr></tbody></table>

### Register and Run with a Token in a Docker Container

To register a Flex Gateway with Anypoint Platform, you must enter the registration command and then
the start command. Each command includes information specific to your Anypoint Platform instance and
**must be updated before** executing. See [Before You Begin](#prereqs) for more information on how
to find the information you will need.

#### Collect Your Registration Data

Before registering your Flex Gateway instance, collect information for the following registration
command options:

- `--token` = the registration token for your environment in Anypoint Platform

- `--organization` = your Organization ID in Anypoint Platform

- `--split` (optional) = the flag that determines whether registration information should split into
  multiple files. The default value is `false`.

  If `split` is set to `true`, registration information is split into two files: `registration.yaml`
  and `certificate.yaml`. If `false`, all registration information is contained in one file:
  `registration.yaml`.

- `--output-directory` (optional) = the directory in which registration information is output

- `my-gateway` = the name you want to assign the gateway cluster

#### Register Flex Gateway

Register your Flex Gateway instance using the data that you gathered for the command options.

> [!IMPORTANT] Create a new directory called `flex-registration` (or similar) and then run the
> registration command in this new directory. The command creates registration files in this
> location.

```ssh
docker run --entrypoint flexctl \
-v "$(pwd)":/registration -u $UID mulesoft/flex-gateway \
registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/registration \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

#### Start Command

Run the following start command in the same directory where you ran the registration command:

```ssh
docker run --rm \
-v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d \
-p 8080:8080 \
mulesoft/flex-gateway
```

> [!NOTE] Specify an optional name you want to assign to your Flex Replica by including the
> following: `-e FLEX_NAME=<name-for-flex-replica> \`.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your new gateway in the
UI. Notice that your gateway’s current status is **Running**. Refresh the page, if necessary.

> [!NOTE] After 30 days, a stopped or deleted gateway is removed from the Runtime Manager UI.
> Otherwise, the UI continues to list the gateway even if it is no longer running or connected.

### Register and Run with a Token in a Podman Container

To register a Flex Gateway with Anypoint Platform, you must enter the registration command and then
the start command. Each command includes information specific to your Anypoint Platform instance and
**must be updated before** executing. See [Before You Begin](#prereqs) for more information on how
to find the information you will need.

#### Collect Your Registration Data

Before registering your Flex Gateway instance, collect information for the following registration
command options:

- `--token` = the registration token for your environment in Anypoint Platform

- `--organization` = your Organization ID in Anypoint Platform

- `--split` (optional) = the flag that determines whether registration information should split into
  multiple files. The default value is `false`.

  If `split` is set to `true`, registration information is split into two files: `registration.yaml`
  and `certificate.yaml`. If `false`, all registration information is contained in one file:
  `registration.yaml`.

- `--output-directory` (optional) = the directory in which registration information is output

- `my-gateway` = the name you want to assign the gateway cluster

#### Register Flex Gateway

Register your Flex Gateway instance using the data that you gathered for the command options.

> [!IMPORTANT] Create a new directory called `flex-registration` (or similar) and then run the
> registration command in this new directory. The command creates registration files in this
> location.

```ssh
podman run --entrypoint flexctl --userns=keep-id \
-v "$(pwd)":/registration:Z -u $UID docker.io/mulesoft/flex-gateway \
registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/registration \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

#### Start Command

Run the following start command in the same directory where you ran the registration command:

```ssh
podman run --rm \
-v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d \
-p 8080:8080 \
docker.io/mulesoft/flex-gateway
```

> [!NOTE] Specify an optional name you want to assign to your Flex Replica by including the
> following: `-e FLEX_NAME=<name-for-flex-replica> \`.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your new gateway in the
UI. Notice that your gateway’s current status is **Running**. Refresh the page, if necessary.

> [!NOTE] After 30 days, a stopped or deleted gateway is removed from the Runtime Manager UI.
> Otherwise, the UI continues to list the gateway even if it is no longer running or connected.

## Register and Run with a Token in a Kubernetes Cluster

Register Flex Gateway, and then use Helm to deploy Flex Gateway to a node in your cluster and
connect to Anypoint Platform. After deploying, use Runtime Manager to verify that the gateway is
present and connected to Anypoint Platform.

When deploying Flex Gateway to a Kubernetes cluster that enables role-based access control (RBAC),
you must have cluster-level permissions to permit installation of custom resource definitions (CRDs)
used by Flex Gateway.

Complete the following steps:

1.  [Collect Your Registration Data](#options-k8s)

2.  [Register Flex Gateway](#reg-k8s)

3.  [Install Helm Chart into the Namespace](#deploy-k8s)

In Connected Mode, Flex Gateway typically serves as an ingress or Edge API gateway that receives
traffic from outside of the cluster. Flex Gateway can also act as a standalone gateway for internal
(east-west) services.

Most management takes place within Anypoint Platform:

- Deploy APIs to your cluster.

- Apply policies and other configurations.

- Create resources (_with the exception_ of Configuration and Service resources).

In Connected Mode, resource creation through `kubectl apply` is possible but restricted to the
following resource types: Configuration, Service, Extension, and PolicyBinding of types `tls`,
`tls-inbound`, and `tls-outbound`. For more info about resources, see
[Declarative Configuration Reference Guide](https://docs.mulesoft.com/gateway/1.12/flex-local-configuration-reference-guide).

### Collect Your Registration Data

Before registering your Flex Gateway instance, collect information for the following registration
command options:

- `--token` = the registration token for your environment in Anypoint Platform

- `--organization` = your Organization ID in Anypoint Platform

- `--split` (optional) = the flag that determines whether registration information should split into
  multiple files. The default value is `false`.

  If `split` is set to `true`, registration information is split into two files: `registration.yaml`
  and `certificate.yaml`. If `false`, all registration information is contained in one file:
  `registration.yaml`.

- `--output-directory` (optional) = the directory in which registration information is output

- `my-gateway` = the name you want to assign the gateway cluster

### Register Flex Gateway

Register your Flex Gateway instance using the data that you gathered for the command options.

You can register using one of the following container runtimes:

**Docker**

Run the following command to register using Docker:

```ssh
docker run --entrypoint flexctl \
-v "$(pwd)":/registration -u $UID mulesoft/flex-gateway \
registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/registration \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

**Podman**

Run the following command to register using Podman:

```ssh
podman run --entrypoint flexctl --userns=keep-id \
-v "$(pwd)":/registration:Z -u $UID docker.io/mulesoft/flex-gateway \
registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/registration \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

### Install Helm Chart into the Namespace

A Helm chart installs Flex Gateway, monitoring tools, and applications. A minimum Helm version of
3.0.0 is required. Refer to [Helm Chart Settings](#helm-options-k8s) for configuration options.

1.  Add a Helm repository named `flex-gateway` for your chart:

    ```helm
    helm repo add flex-gateway https://flex-packages.anypoint.mulesoft.com/helm
    ```

    The command either adds the repository or skips this process if a Helm repository with that name
    already exists on your machine:

    - If the repository is new, the command returns the following message:

      "flex-gateway" has been added to your repositories

    - If the repository already exists, the command returns the following message:

      "flex-gateway" already exists with the same configuration, skipping

2.  Run `helm repo up`.

    The command returns the following message:

    Hang tight while we grab the latest from your chart repositories... ...Successfully got an
    update from the "flex-gateway" chart repository Update Complete. ⎈Happy Helming!⎈

    If you have more than one Helm repository on your machine, the message in your terminal window
    lists all of the repositories.

3.  Run the Helm command for deploying your gateway in Connected Mode:

    ```helm
    helm -n gateway upgrade -i --create-namespace \
    ingress flex-gateway/flex-gateway \
    --set gateway.mode=connected \
    --set-file registration.content=registration.yaml
    ```

    This command creates the `gateway` namespace and a release named `ingress` if they do not exist.
    You can use names of your choice for your namespace and release. The command syntax for the Helm
    repository and chart names is `<helm-repo-name>/<helm-chart-name>`.

    The command uses `--set gateway.mode=connected` because the default for the Helm chart is Local
    Mode.

    When you install Flex Gateway, a Service type `LoadBalancer` is created by default. You must
    have the appropriate permissions to create a load balancer in your cloud. If the load balancer
    is not provisioned or has issues with the provisioning process, you must choose another type by
    changing the `service.type` property during the installation.

    > [!NOTE] By default, Flex Gateways running in Kubernetes or Openshift use a readiness probe. If
    > there’s no API deployed to your Flex Gateway instance, the readiness state is `false`. This
    > isn’t an issue with custom readiness probe configurations.

    When successful, the command prints a message indicating an upgrade to your `ingress` release:

    Release "ingress" does not exist. Installing it now. NAME: ingress LAST DEPLOYED: Mon Mar 20
    21:36:19 2023 NAMESPACE: gateway STATUS: deployed REVISION: 1 TEST SUITE: None

    The `REVISION` value increments the `ingress` release by `1` each time you run this command with
    the same namespace, repository, and chart names. For example, if you run the command a second
    time, you find a new revision number (`REVISION: 2`). The `LAST DEPLOYED` date reflects the date
    of that revision.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your new gateway in the
UI. Notice that your gateway’s current status is **Running**. Refresh the page, if necessary.

> [!NOTE] After 30 days, a stopped or deleted gateway is removed from the Runtime Manager UI.
> Otherwise, the UI continues to list the gateway even if it is no longer running or connected.

### Helm Chart Settings

To modify the default Helm settings with new values, such as `resource` values for CPU and memory
settings, see
[Update Pod Settings for a Flex Gateway Deployment Through a Helm Chart](https://docs.mulesoft.com/gateway/1.12/flex-gateway-k8-change-helm-settings).
For additional Helm chart configurations, see
[Managing Kubernetes Deployments](https://docs.mulesoft.com/gateway/1.12/flex-gateway-k8-management).

Before modifying a Helm chart for a Flex Gateway deployment, review the default Helm chart settings:

- Open the **flex-gateway** page in
  [ArtifactHUB](https://artifacthub.io/packages/helm/flex-gateway/flex-gateway)

- Run `helm show values <repository-name>/<chart-name>` from a terminal window.

  Example:

  ```kubernetes
  helm show values flex-gateway/flex-gateway
  ```

  The example returns _default_ values of a repository and chart with the same name.

To view the Helm chart `README`, run `helm show readme <repository-name>/<chart-name>` from a
terminal window.

Example:

```kubernetes
helm show readme flex-gateway/flex-gateway
```

## Register and Run with a Token in an OpenShift Cluster

Register Flex Gateway, and then use Helm to deploy Flex Gateway to a node in your cluster and
connect to Anypoint Platform. After deploying, use Runtime Manager to verify that the gateway is
present and connected to Anypoint Platform.

When deploying Flex Gateway to a Kubernetes cluster that enables role-based access control (RBAC),
you must have cluster-level permissions to permit installation of custom resource definitions (CRDs)
used by Flex Gateway. In OpenShift, the `cluster-admin` role provides this level of access.

From the command line, OpenShift procedures match Kubernetes procedures. Complete the following
steps:

1.  [Collect Your Registration Data](#options-openshift)

2.  [Register Flex Gateway](#reg-openshift)

3.  [Install Helm Chart into the Namespace](#deploy-openshift)

In Connected Mode, Flex Gateway typically serves as an ingress or Edge API gateway that receives
traffic from outside of the cluster. Flex Gateway can also act as a standalone gateway for internal
(east-west) services.

Most management takes place within Anypoint Platform:

- Deploy APIs to your cluster.

- Apply policies and other configurations.

- Create resources (_with the exception_ of Configuration and Service resources).

In Connected Mode, resource creation through `kubectl apply` is possible but restricted to the
following resource types: Configuration, Service, Extension, and PolicyBinding of types `tls`,
`tls-inbound`, and `tls-outbound`. For more info about resources, see
[Declarative Configuration Reference Guide](https://docs.mulesoft.com/gateway/1.12/flex-local-configuration-reference-guide).

### Collect Your Registration Data

Before registering your Flex Gateway instance, collect information for the following registration
command options:

- `--token` = the registration token for your environment in Anypoint Platform

- `--organization` = your Organization ID in Anypoint Platform

- `--split` (optional) = the flag that determines whether registration information should split into
  multiple files. The default value is `false`.

  If `split` is set to `true`, registration information is split into two files: `registration.yaml`
  and `certificate.yaml`. If `false`, all registration information is contained in one file:
  `registration.yaml`.

- `--output-directory` (optional) = the directory in which registration information is output

- `my-gateway` = the name you want to assign the gateway cluster

### Register Flex Gateway

Register your Flex Gateway instance using the data that you gathered for the command options.

You can register using one of the following container runtimes:

**Docker**

Run the following command to register using Docker:

```ssh
docker run --entrypoint flexctl \
-v "$(pwd)":/registration -u $UID mulesoft/flex-gateway \
registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/registration \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

**Podman**

Run the following command to register using Podman:

```ssh
podman run --entrypoint flexctl --userns=keep-id \
-v "$(pwd)":/registration:Z -u $UID docker.io/mulesoft/flex-gateway \
registration create \
--token=<your-registration-token> \
--connected=true \
--organization=<your-org-id> \
--output-directory=/registration \
my-gateway
```

Use `sudo` if you encounter file permission issues when running this command.

> [!NOTE] If you are in Europe you will need to add the
> `--anypoint-url=https://eu1.anypoint.mulesoft.com` flag to your command.

In the output directory, you should see the following new registration file(s):

- `registration.yaml`

- `certificate.yaml` (generated only if the `split` registration parameter is set to `true`,
  otherwise certificate information will be contained in `registration.yaml`)

> [!IMPORTANT] These generated files are credentials for you to connect your Flex Gateway. If you
> lose them you can no longer connect your Flex Gateway.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your gateway in the UI.
Notice that your gateway’s status is **Not Running**. Refresh the page, if necessary.

### Install Helm Chart into the Namespace

A Helm chart installs Flex Gateway, monitoring tools, and applications. A minimum Helm version of
3.0.0 is required. Refer to [Helm Chart Settings](#helm-options-openshift) for configuration
options.

1.  Add a Helm repository named `flex-gateway` for your chart:

    ```helm
    helm repo add flex-gateway https://flex-packages.anypoint.mulesoft.com/helm
    ```

    The command either adds the repository or skips this process if a Helm repository with that name
    already exists on your machine:

    - If the repository is new, the command returns the following message:

      "flex-gateway" has been added to your repositories

    - If the repository already exists, the command returns the following message:

      "flex-gateway" already exists with the same configuration, skipping

2.  Run `helm repo up`.

    The command returns the following message:

    Hang tight while we grab the latest from your chart repositories... ...Successfully got an
    update from the "flex-gateway" chart repository Update Complete. ⎈Happy Helming!⎈

    If you have more than one Helm repository on your machine, the message in your terminal window
    lists all of the repositories.

3.  Run the Helm command for deploying your gateway in Connected Mode:

    ```helm
    helm -n gateway upgrade -i --create-namespace \
    ingress flex-gateway/flex-gateway \
    --set gateway.mode=connected \
    --set-file registration.content=registration.yaml
    ```

    This command creates the `gateway` namespace and a release named `ingress` if they do not exist.
    You can use names of your choice for your namespace and release. The command syntax for the Helm
    repository and chart names is `<helm-repo-name>/<helm-chart-name>`.

    The command uses `--set gateway.mode=connected` because the default for the Helm chart is Local
    Mode.

    When you install Flex Gateway, a Service type `LoadBalancer` is created by default. You must
    have the appropriate permissions to create a load balancer in your cloud. If the load balancer
    is not provisioned or has issues with the provisioning process, you must choose another type by
    changing the `service.type` property during the installation.

    > [!NOTE] By default, Flex Gateways running in Kubernetes or Openshift use a readiness probe. If
    > there’s no API deployed to your Flex Gateway instance, the readiness state is `false`. This
    > isn’t an issue with custom readiness probe configurations.

    When successful, the command prints a message indicating an upgrade to your `ingress` release:

    Release "ingress" does not exist. Installing it now. NAME: ingress LAST DEPLOYED: Mon Mar 20
    21:36:19 2023 NAMESPACE: gateway STATUS: deployed REVISION: 1 TEST SUITE: None

    The `REVISION` value increments the `ingress` release by `1` each time you run this command with
    the same namespace, repository, and chart names. For example, if you run the command a second
    time, you find a new revision number (`REVISION: 2`). The `LAST DEPLOYED` date reflects the date
    of that revision.

In Runtime Manager, click **← Flex Gateway** in the left navigation to find your new gateway in the
UI. Notice that your gateway’s current status is **Running**. Refresh the page, if necessary.

> [!NOTE] After 30 days, a stopped or deleted gateway is removed from the Runtime Manager UI.
> Otherwise, the UI continues to list the gateway even if it is no longer running or connected.

### Helm Chart Settings

To modify the default Helm settings with new values, such as `resource` values for CPU and memory
settings, see
[Update Pod Settings for a Flex Gateway Deployment Through a Helm Chart](https://docs.mulesoft.com/gateway/1.12/flex-gateway-k8-change-helm-settings).
For additional Helm chart configurations, see
[Managing Kubernetes Deployments](https://docs.mulesoft.com/gateway/1.12/flex-gateway-k8-management).

Before modifying a Helm chart for a Flex Gateway deployment, review the default Helm chart settings:

- Open the **flex-gateway** page in
  [ArtifactHUB](https://artifacthub.io/packages/helm/flex-gateway/flex-gateway)

- Run `helm show values <repository-name>/<chart-name>` from a terminal window.

  Example:

  ```kubernetes
  helm show values flex-gateway/flex-gateway
  ```

  The example returns _default_ values of a repository and chart with the same name.

To view the Helm chart `README`, run `helm show readme <repository-name>/<chart-name>` from a
terminal window.

Example:

```kubernetes
helm show readme flex-gateway/flex-gateway
```

## See Also

- [Getting Started with Self-Managed Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-gateway-getting-started)

- [Registering and Running Flex Gateway in Local Mode](https://docs.mulesoft.com/gateway/1.12/flex-local-reg-run)
