[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-27。"],[],[],null,["# Create environments\n\n| You are currently viewing version 1.1 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](/apigee/docs/hybrid/supported-platforms#supported-versions).\n\n\nThis topic explains how to create new environments. For an introduction, see\n[About environments and environment groups](/apigee/docs/api-platform/fundamentals/environments-overview).\n\nHow to add an environment\n-------------------------\n\n\nThe steps for adding an environment are described in adding and configuring an environment are\nexplained in [Step 5: Add an environment](/apigee/docs/hybrid/v1.1/precog-add-environment) and [Specify configuration overrides](/apigee/docs/hybrid/v1.1/install-copy-overrides#specify-configuration-overrides).\n\nHow to add multiple environments\n--------------------------------\n\n1. Create a new environment in the [Apigee UI](https://apigee.google.com) or with the [Create environments API](/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments/create). For the basic steps, see [Step 5: Add an environment](/apigee/docs/hybrid/v1.1/precog-add-environment).\n2. Add a new environment definition to the `envs` array in your overrides file.\n Give the new environment the same name as the one you created in the UI.\n For example, the following configuration defines two environments: **test**\n and **prod**:\n\n ```\n namespace: my-namespace\n org: my-organization\n ...\n envs:\n - name: test\n sslCertPath: \"your_certpath/ingress-cert.crt\"\n sslKeyPath: \"your_keypath/ingress-key.key\"\n hostAlias: \"apitest.example.com\"\n serviceAccountPaths:\n synchronizer: \"your_keypath/synchronizer-manager-service-account.json\n udca: \"your_keypath/analytic-agent-service-account.json\n - name: prod\n sslCertPath: \"your_certpath/ingress-cert.crt\"\n sslKeyPath: \"your_keypath/ingress-key.key\"\n hostAlias: \"apiprod.example.com\"\n serviceAccountPaths:\n synchronizer: \"your_keypath/synchronizer-manager-service-account.json\n udca: \"your_keypath/analytic-agent-service-account.json\n ...\n ```\n\n\nFor a complete list of environment configuration elements, see [envs]() in the\n[Configuration\nproperty reference](/apigee/docs/hybrid/v1.1/config-prop-ref#envs).\n\nHost aliases with multiple environments\n---------------------------------------\n\n\nIf you have multiple enviroments, each one can have its own host alias, or multiple enviromments\ncan share the same host alias. For details, see [About virtual hosts and environments](/apigee/docs/hybrid/v1.1/environments-about#about-virtual-hosts-and-environments) and [Environments can share the same host alias](/apigee/docs/hybrid/v1.1/environments-about#environments-can-share-the-same-host-alias). If multiple environments share the same\nhost alias, you must use the technique called [base path routing](/apigee/docs/hybrid/v1.1/base-path-routing)\nto route proxy requests to the correct environment.\n\nTLS keys and certificates\n-------------------------\n\nWhen you create a new environment, you must provide a TLS key and certificate to the environment\nconfiguration. The key/cert are used to provide secure communication with the ingress gateway.\n\n\nIt is up to you how you generate proper TLS certificate/key pairs for your hybrid\nconfiguration. The following topics are provided as samples only, intended primarily\nfor trying out or testing a new hybrid installation if it isn't feasible to obtain\nTLS credentials in another way:\n\n- See [Obtain TLS credentials](/apigee/docs/hybrid/v1.1/lets-encrypt) for a set of sample steps for creating an authorized TLS certificate/key pair.\n- You can use a self-signed certificate/key pair(s) for testing purposes only. See [Generate self-signed TLS credentials](/apigee/docs/hybrid/v1.1/environment-self-signed-tls)."]]