Runtime Environments


Overview

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 image pull, so you always know what’s deployed, when it was deployed, 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 image pull using that token is tracked against the environment.

This gives you:

  • Full visibility into what’s deployed and when
  • The ability to query runtime state from your coding agent or Fly Chat
  • Knowledge of whether your environment is up to date with the latest release

Environment Lifecycle

  1. Create – Give it a name (lowercase letters, numbers, hyphens) and optional description
  2. Connect – Generate a token, apply the pull secret to your K8s namespace
  3. Track – Fly records every image pull, links it to releases, and shows deployment history
  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.

Update and Delete

You can update an environment’s name or description, or delete an environment from Fly Web. Deleting revokes all associated tokens and stops tracking.


In Fly Web

Fly Web provides a unified dashboard across all your environments. See what’s running, 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 and description
  • Releases pulled – The latest release pulled, images included, and timestamp. Locally pulled images appear as “Pulled Locally.”

Environment Deep Dive

Click any environment to see:

Releases Pulled – Chronological log of all releases pulled. For each: version, AI-generated summary, PRs and commits included, and images pulled.

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

Actions

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

Next Steps