> [!CAUTION]
> You are currently viewing version 1.11 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions).

<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.11 </button>

- Supported versions:
- [v1.17 (latest)](https://docs.cloud.google.com/apigee/docs/hybrid/v1.17/environment-create.md.txt)
- [v1.16](https://docs.cloud.google.com/apigee/docs/hybrid/v1.16/environment-create.md.txt)
- [v1.15](https://docs.cloud.google.com/apigee/docs/hybrid/v1.15/environment-create.md.txt)
- [v1.14](https://docs.cloud.google.com/apigee/docs/hybrid/v1.14/environment-create.md.txt)
- [List of supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions)
- Unsupported versions:
- [v1.13](https://docs.cloud.google.com/apigee/docs/hybrid/v1.13/environment-create.md.txt)
- [v1.12](https://docs.cloud.google.com/apigee/docs/hybrid/v1.12/environment-create.md.txt)
- [v1.11](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/environment-create.md.txt)
- [v1.10](https://docs.cloud.google.com/apigee/docs/hybrid/v1.10/environment-create.md.txt)
- [v1.9](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/environment-create.md.txt)
- [v1.8](https://docs.cloud.google.com/apigee/docs/hybrid/v1.8/environment-create.md.txt)
- [v1.7](https://docs.cloud.google.com/apigee/docs/hybrid/v1.7/environment-create.md.txt)
- [v1.6](https://docs.cloud.google.com/apigee/docs/hybrid/v1.6/environment-create.md.txt)
- [v1.5](https://docs.cloud.google.com/apigee/docs/hybrid/v1.5/environment-create.md.txt)
- [v1.4](https://docs.cloud.google.com/apigee/docs/hybrid/v1.4/environment-create.md.txt)
- [v1.3](https://docs.cloud.google.com/apigee/docs/hybrid/v1.3/environment-create.md.txt)
- [v1.2](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/environment-create.md.txt)
- [v1.1](https://docs.cloud.google.com/apigee/docs/hybrid/v1.1/environment-create.md.txt)


This topic explains how to create new environments for Apigee hybrid. For an introduction, see
[About environments and environment groups](https://docs.cloud.google.com/apigee/docs/api-platform/fundamentals/environments-overview.md.txt).

## About environment creation


Environment creation is a two-step process:

- Create an environment in the management plane using either the UI or an Apigee API.
- Add configuration for that environment to your overrides file and apply it to the cluster.

The steps for adding an environment are described in adding and configuring an environment are
explained in [Step 5: Add an environment](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/precog-add-environment.md.txt) and [Specify configuration overrides](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/install-copy-overrides#specify-configuration-overrides).

## How to create an environment

1. Create one or more new environments in the [Apigee UI](https://apigee.google.com) or with the [Create environments API](https://docs.cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments/create.md.txt). For the basic steps, see [Step 5: Add an environment](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/precog-add-environment.md.txt).
2. Add a new environment definition to the `envs[]` property in your overrides file.
   Note that the property is an array; therefore, you can add more than one environment definition
   to it.
   Give the new environment the same name as the environment you created in the UI.
   For example, the following configuration defines two environments: **test**
   and **prod**:

   ```
   namespace: my-namespace
   org: my-organization
   ...
   envs:
     - name: test
       serviceAccountPaths:
         synchronizer: "your_keypath/synchronizer-manager-service-account.json
         udca: "your_keypath/analytic-agent-service-account.json

     - name: prod
       serviceAccountPaths:
         synchronizer: "your_keypath/synchronizer-manager-service-account.json
         udca: "your_keypath/analytic-agent-service-account.json
   ...
   ```
3. Apply any changes to the cluster:

   ### Helm

   With Helm charts, apply the changes to each environment in sequence with the following commands.

   For example:

   ```
   helm upgrade ENV_RELEASE_NAME apigee-env/ \
     --install \
     --namespace APIGEE_NAMESPACE \
     --set env=ENV_NAME \
     -f OVERRIDES_FILE \
     --dry-run=server
   ```
   - <var translate="no">ENV_RELEASE_NAME</var> is a name used to track installation and upgrades of the `apigee-env` chart. Helm release names must be unique within your Apigee hybrid installation. If you environment name is unique, this can be the same as `ENV_NAME`. However, if you have the same name for your environment and environment group, make sure to enter a unique Helm release name for each. For example, if both are named `dev` you could use something like `dev-env-release` and `dev-envgroup-release`.
   - For more information on releases in Helm, see [Three big concepts](https://helm.sh/docs/intro/using_helm/#three-big-concepts) in the Helm documentation.

   The `test` environment:

   ```
   helm upgrade test-release apigee-env/ \
     --namespace apigee \
     --atomic \
     --set env=test \
     -f OVERRIDES_FILE.yaml
   ```

   > [!NOTE]
   > **Note:** If you see an error saying `Error: UPGRADE FAILED: "*test*" has no deployed releases`, replace `upgrade` with `install` and try the command again.

   The `prod` environment:

   ```
   helm upgrade prod-release apigee-env/ \
     --namespace apigee \
     --set env=prod \
     --atomic \
     -f OVERRIDES_FILE.yaml
   ```

   ### `apigeectl`

   With `apigeectl` you can apply the changes to each environment individually with
   the `--env ENV_NAME` flag or to all environments at the same time with the
   `--all-envs`flag. For example:

   ```
   $APIGEECTL_HOME/apigeectl apply -f OVERRIDES_FILE.yaml --all-envs
   ```


For more information about virtual host configuration see [Configure virtual hosts](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/base-path-routing.md.txt).
For a complete list of environment configuration elements, see [envs](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/config-prop-ref.md.txt#envs) in the
[Configuration
property reference](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/config-prop-ref#envs).