> ## Documentation Index
> Fetch the complete documentation index at: https://www.qovery.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ephemeral Environments

> Create on-demand temporary environments for development, testing, and E2E testing with automated CI/CD workflows

## Overview

Ephemeral environments are temporary, isolated environments that are automatically created for specific purposes (like feature development or testing) and destroyed when no longer needed. They provide developers with production-like environments without the cost and complexity of maintaining permanent infrastructure.

Ephemeral environments (also called Preview Environments) are automatically created when you open a pull request and deleted when it's merged or closed, giving you on-demand testing environments that mirror your production setup.

## Benefits

<CardGroup cols={3}>
  <Card title="Faster Development" icon="rocket">
    Test changes in isolation without affecting other developers
  </Card>

  <Card title="Cost Savings" icon="dollar-sign">
    Pay only for environments when they're in use
  </Card>

  <Card title="Improved Testing" icon="flask">
    Test in production-like environments before deployment
  </Card>

  <Card title="Better Collaboration" icon="users">
    Stakeholders can review changes in live environments
  </Card>

  <Card title="Reduced Risk" icon="shield">
    Catch issues early before they reach production
  </Card>

  <Card title="Faster Feedback" icon="comments">
    Get immediate feedback from team members and stakeholders
  </Card>
</CardGroup>

## Prerequisites

<Warning>
  **Cluster Required**: Before setting up ephemeral environments, you need a Kubernetes cluster. Ephemeral environments will be created on this cluster.
</Warning>

**Don't have a cluster yet?**

<CardGroup cols={2}>
  <Card title="Managed Cluster (Recommended)" icon="cloud" href="/getting-started/quickstart/cloud">
    Let Qovery provision and manage your Kubernetes cluster on AWS, GCP, Azure, or Scaleway

    **Time:** \~30 minutes | **Maintenance:** Qovery handles it
  </Card>

  <Card title="Bring Your Own Cluster (BYOK)" icon="server" href="/configuration/integrations/kubernetes/byok">
    Connect your existing Kubernetes cluster or create your own

    **Time:** \~20 minutes | **Maintenance:** You handle it
  </Card>
</CardGroup>

## Two Approaches

Qovery offers **two approaches** to create and manage ephemeral environments, depending on your team's needs and technical requirements.

<CardGroup cols={2}>
  <Card title="Simple: Preview Environments" icon="bolt" href="/getting-started/guides/use-cases/preview-environments">
    **Fully Automated with Zero Configuration**

    Turn on auto-preview environment feature in Qovery and let it handle everything automatically.

    * No CI/CD setup required
    * Built-in Qovery feature
    * Instant setup (enable and go)
    * Automatic creation/destruction on PR events
    * Perfect for quick feedback
    * **Best for teams wanting simplicity**

    **Time to setup:** 10-15 minutes
  </Card>

  <Card title="Advanced: CI/CD Integration" icon="code" href="/getting-started/guides/use-cases/e2e-testing">
    **Custom Workflows with E2E Testing**

    Integrate ephemeral environments into your existing CI/CD pipeline for complete control.

    * Full workflow customization
    * E2E testing automation (K6, Playwright, Cypress)
    * Custom creation/deletion logic
    * Integration with GitHub Actions, GitLab CI, Jenkins, etc.
    * Advanced testing scenarios
    * **Best for teams requiring custom testing workflows**

    **Time to setup:** 1-2 hours
  </Card>
</CardGroup>
