Runtime Environments


Overview

Know what’s running across all your environments and verify that your fixes are live.

A runtime environment represents a deployment target: production, staging, dev, or any named environment your team uses.

Without environments, you have no visibility into what’s actually running. You ship a release, but you can’t answer: “Is the login fix live in production?” or “What changed in staging this week?”

By creating an environment in Fly and connecting it to your Kubernetes namespace, you close that gap. Fly tracks every deployment, so you always know what’s running, when it shipped, and which release produced it. You can compare environments, verify fixes, and investigate issues – all from your coding agent or Fly Chat.


How It Works

Connection Model

Environments connect to Fly through environment-scoped tokens. When you generate a token for an environment and apply it as a Kubernetes image pull secret, every pull using that token becomes a deployment event for the environment – Fly groups them into a chronological deployment timeline.

This gives you:

  • See what’s deployed and when, across every environment
  • Query runtime state from your coding agent or Fly Chat
  • Know whether your environment is up to date with the latest release

Environment Lifecycle

  1. Create – Give it a name (lowercase letters, numbers, hyphens), optional description, and a color to visually distinguish it in Fly Web
  2. Connect – Generate a token, apply the pull secret to your K8s namespace
  3. Track – Fly turns image pulls into deployments, links each one to its releases, and shows the full timeline
  4. Query – Ask what’s running, compare environments, verify fixes

Apply the Image Pull Secret

kubectl create secret docker-registry fly-registry-secret \
  --docker-server=<your-fly-subdomain>.jfrog.io/docker \
  --docker-username=<token-username> \
  --docker-password=<your-token> \
  --namespace=<namespace>

Reference it in your deployment spec:

spec:
  template:
    spec:
      imagePullSecrets:
        - name: fly-registry-secret
      containers:
        - name: my-app
          image: <your-fly-subdomain>.jfrog.io/docker/<image-name>:<tag>

From Your Coding Agent

Your coding agent is the fastest way to create environments, connect them to Kubernetes, deploy releases, and query what’s running – all with natural language prompts.

Create an Environment

“Create a new environment called prod-us-east”

“Create a staging environment”

Connect Your Environment

“Set up my K8s to work with Fly”

“Generate a deployment token for production”

Fly generates the token, associates it with your environment, and gives you the kubectl command to apply.

Deploy Releases

“Deploy the login fix to staging”

“Deploy payment-service v2.3.1 to production”

“Find the release where I fixed the auth bug and deploy it”

Fly uses semantic release data to find the right release and image, identifies the environment, handles credentials, and tracks the deployment.

Track Your Runtime

“What’s running in production?” – Shows the active image, which release produced it, features and fixes included, and deployment history.

“Is the fix for the login timeout issue deployed to production?” – Searches releases to confirm if the fix exists in your environment.

“Is staging up to date?” – Compares live state against the latest release. Shows missing releases if there’s a gap.

“Compare staging vs production” – Side-by-side comparison of releases, PRs, fixes, and version gaps.


In Fly Web

See all your environments in one dashboard. Review deployment history, manage tokens, and drill into any environment for a full profile.

Environment Dashboard

Navigate to Environments to see all your environments.

For each environment:

  • Environment name, color, and description – The color appears as a visual badge to help distinguish environments at a glance (e.g., red for production, green for staging)
  • Latest deployment – The most recent deployment, the releases it shipped, and when it landed. Locally pulled images appear as “Pulled Locally”, and rollback deployments are marked with a Rollback badge.

Environment Deep Dive

Click any environment to see:

Deployments – See everything that’s shipped to this environment, in order. Each deployment shows all the releases that landed since the previous deployment and a short summary of what changed. Rollbacks appear here too, showing how many releases were reverted. Click any deployment to see the full set of releases it included, or jump to a specific release.

Token Tracking – Active tokens, names, and last usage timestamps.

Actions

  • Create Environment – Click Create Environment, provide name, color, and description
  • Generate Token – From the environment profile, generate tokens for connecting
  • Revoke Token – Revoke any token from the environment profile
  • Update – Change name, color, or description (doesn’t affect tokens or history)
  • Delete – Available from the environment profile, requires confirmation.
Warning

Deleting an environment revokes all associated tokens and stops tracking. This cannot be undone.


Next Steps