SEAGIT DOCS
Environments

Environments

Create logical deployment boundaries (dev, staging, prod) with centralized configuration, DNS, and cluster management.

What is a Kubernetes environment?

A Kubernetes environment is an isolated deployment boundary, such as dev, staging or production, with its own clusters, namespaces, variables, secrets and DNS. In SeaGit an environment groups these settings, so the same application can be promoted from one environment to the next without rewriting its configuration.

Preview environments

Besides long-lived environments, SeaGit creates ephemeral preview deployments for individual commits. Each one gets its own URL and runs in the same environment as main, so a change can be tested on real infrastructure before anything is promoted. Preview slots are capped by the environment's deployment limit, and you can remove one to free its slot.

Read Deployments for how slots are created, and preview environments for the overview.

What are Environments?

Environments are logical groupings that define where and how applications are deployed. They provide:

  • Deployment Targets - Define dev, staging, production environments
  • Configuration Management - Centralized settings per environment
  • DNS Configuration - Automatic domain management
  • Cluster Association - Link multiple clusters to one environment

Creating an Environment

Step 1: Navigate to Environments

  1. Go to Organization → Environments
  2. Click "+ Create Environment"

Step 2: Configure Basic Settings

  • Name: dev, staging, production
  • Executer: Seagit Terraform or ArgoCD
  • Domain: Select root domain for applications

Step 3: Configure Ingress

  • Ingress Class: alb, nginx, or custom
  • Ingress Annotations: cert-manager, ALB settings
  • Node Labels: For pod scheduling

Step 4: Attach Clusters

Select which clusters can deploy to this environment.

While a cluster is attached and hosting live deployments from this environment, SeaGit protects it: stopping the cluster warns you first, and terminating it is blocked until those deployments are removed. See Cluster Actions & Protection Gates.

Step 5: Create Spaces (Optional)

default namepace is created for each environment.

Create Kubernetes namespaces for team or project isolation. Spaces are the logical representation of these namespaces within an environment.

Note: Resource quotas and access control within Spaces will be coming soon.

DNS Configuration

Environments automatically manage DNS for deployed applications:

  • Root Domain: app.example.com
  • Service Subdomains: api.app.example.com, web.app.example.com
  • Wildcard Support: *.app.example.com
  • Automatic TLS: Cert-manager integration

Routing Policies (Paid plan only)

  • Simple - Single destination
  • Latency-based - Route to nearest region
  • Failover - Backup region on failure

Spaces (Namespaces)

Spaces provide logical isolation within environments:

  • Team Isolation - Separate resources by team
  • Project Separation - Multiple projects per environment
  • Resource Quotas - Limit CPU/memory per space

Deployment Strategies

Blue-Green Deployment

Run two identical environments (blue and green). Switch traffic instantly. This can be achieved with ArgoCD rollouts

Canary Deployment

Gradually roll out to a small percentage of users before full deployment. This can be achieved with ArgoCD rollouts

Rolling Update

Out of the box support for rolling updates. Replace pods sequentially to maintain availability.

Environment Sharing

Share environments with other accounts:

  • Grant access to external teams
  • View active shares
  • Revoke access anytime

Manage environments with the API

Automate environment provisioning, cluster attachment, and resource management. Environments group clusters and applications—create isolated staging/production setups, attach Kubernetes clusters, and manage configuration across deployments.

Base URL https://seagit.com/api · header Authorization: <key> (no Bearer) · Get an API key

$ACCOUNT_ID is the _id returned by GET /auth/me; $ORG_ID is main for your default organization; $ENV_ID is the environment _id returned by list/create calls. All environment routes require accid as a query parameter.

  1. GET/org/{id}/envs

    List environments

    Retrieve all environments in an organization. Pass ?options=true to get dropdown-formatted list with labels and IDs.

    curl -s "$SEAGIT_API/org/$ORG_ID/envs?accid=$ACCOUNT_ID" \ -H "Authorization: $SEAGIT_API_KEY"
  2. POST/org/{id}/envs

    Create environment

    Creates an environment. executer picks how its add-ons are applied: sgt-tf (the default) or sgt-k8s.

    curl -s -X POST "$SEAGIT_API/org/$ORG_ID/envs?accid=$ACCOUNT_ID" \ -H "Authorization: $SEAGIT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Staging environment for testing", "executer": "sgt-k8s" }'
  3. GET/org/{id}/envs/{envid}

    Get environment details

    Fetch full configuration of a single environment, including clusters, domains, settings, and deployment limits.

    curl -s "$SEAGIT_API/org/$ORG_ID/envs/$ENV_ID?accid=$ACCOUNT_ID" \ -H "Authorization: $SEAGIT_API_KEY"
  4. GET/org/{id}/envs/{envid}/clusters

    List clusters in environment

    Get all Kubernetes clusters attached to this environment. Includes cluster health status, region, and provider details.

    curl -s "$SEAGIT_API/org/$ORG_ID/envs/$ENV_ID/clusters?accid=$ACCOUNT_ID" \ -H "Authorization: $SEAGIT_API_KEY"
  5. GET/org/{id}/envs/{envid}/apps

    List deployed applications

    Fetch all application instances and deployments running in this environment, including active deployment status.

    curl -s "$SEAGIT_API/org/$ORG_ID/envs/$ENV_ID/apps?accid=$ACCOUNT_ID" \ -H "Authorization: $SEAGIT_API_KEY"
  6. DELETE/org/{id}/envs/{envid}

    Delete environment

    Deletes the environment. The call is refused with a 409 while the environment still has application instances, so delete those first.

    curl -s -X DELETE "$SEAGIT_API/org/$ORG_ID/envs/$ENV_ID?accid=$ACCOUNT_ID" \ -H "Authorization: $SEAGIT_API_KEY"

    Deletes the environment record; it cannot be undone.