Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Environment

Understand what a Harness environment represents and how it fits into a deployment pipeline.

A Harness environment represents where you deploy your application, such as development, staging, or production. Each environment contains one or more infrastructure definitions that point to the actual cluster, namespace, host, or cloud account where the Delegate runs the deployment.

Environments exist independently of pipelines. You define an environment once and reuse it across multiple stages, pipelines, and services.


Infrastructure definitions

An environment can contain multiple infrastructure definitions. For example, a production environment might have five infrastructure definitions representing five Kubernetes clusters. When you select an environment in a pipeline stage, you choose which infrastructure definition to use for that deployment.

Go to Infrastructure definitions to create and manage the infrastructure definitions within an environment.

Create an environment

In the Harness application, expand Deployments in the left navigation and select Environments to open the environments list for the project. The list page has two tabs: Environments and Environment Groups.

The Environments tab shows every environment in the project, along with its type and when it was created or last updated. Use Add filter to narrow the list, sort by Last Updated, and use Columns to choose which columns appear in the table.

To create an environment, select + Create environment and complete the following steps.

  1. Enter a Name for the environment, or select the name Harness suggests.

  2. Choose a Storage option for the environment configuration. Inline stores the configuration directly on the environment.

  3. Choose an Environment Type, either Production or Pre-Production.

  4. Select Create.

Harness creates the environment and opens its detail page.

View and manage an environment

An environment's detail page has three tabs. Configuration shows the environment name, ID, type, and when it was created and last modified. Infrastructure Definitions lists the infrastructure definitions in the environment; go to Infrastructure definitions to add one. References shows which pipelines use the environment.

Environment-level failure handling

You can set a failure strategy directly on an environment so that Harness reacts to a failure while resolving the environment or its infrastructure, before deployment steps run.

Go to Failure strategy to configure on-failure rules at the environment level.


Next steps

Last updated

Was this helpful?