# Deploy Your First Release

---

## Overview

Know what's running across your environments. Connect a runtime to Fly once, and every image pull becomes a tracked deployment automatically.

No more checking dashboards or running kubectl to see what's live. Ask your coding agent and you'll see what's deployed where, when, and by whom.

---

## Deploy and track

1. **Create a runtime environment** — Your release target in Fly (staging, production, etc.).
2. **Connect your namespace** — Your cluster pulls from your Fly Registry.
3. **Deploy your release** — Your release lands in the environment.
4. **Track what's running** — You know what's live, everywhere.

---

## 1. Create a runtime environment

Ask your coding agent:

*"Create a staging environment"*

Your agent creates the environment in Fly. (You can also create one from Fly Web.)

---

## 2. Connect your namespace

Ask your coding agent:

*"Set up my K8s to work with Fly"*

Fly generates a token, associates it with your environment, and gives you the commands to apply. You can also generate tokens from Fly Web.

Create the image pull secret:

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

Reference it in your deployment:

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

Once connected, Fly tracks every image pull automatically.

---

## 3. Deploy your release

Deploy as you always have. Your existing workflow keeps working (kubectl apply, GitOps, ArgoCD, Helm, and so on). Just point your image references at your Fly Registry: `<your-team>.jfrog.io/docker/<image>:<tag>`.

Or ask your coding agent:

*"Deploy the latest release to staging"*

Fly finds the release, and your agent updates your Kubernetes deployment. Once the new image is pulled, Fly tracks it as a deployment event.

---

## 4. Track what's running

Once your environment is connected, every deployment is tracked automatically. Ask your coding agent anything:

- *"What's running in production?"*
- *"Is the login fix live in staging?"*
- *"Compare staging and production"*

You'll see exactly what's deployed where, when it landed, and who shipped it.

---

## Next steps

- [From Planning to Production →](../../from-planning-to-production/) - The full lifecycle story
- [Runtime Environments →](../../fly-platform/runtime-environments/) - The environment model
- [Where to Use Fly →](../../where-to-use-fly/) - The interfaces in depth
