|
| 1 | +# Kubernetes Examples |
| 2 | + |
| 3 | +Plain Kubernetes manifests for deploying Sortie to a cluster. For the full |
| 4 | +guide — secrets, networking, storage classes, monitoring — see |
| 5 | +[Deploy Sortie to Kubernetes](https://docs.sortie-ai.com/guides/deploy-sortie-to-kubernetes/). |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +Build an agent-specific image using the Dockerfiles in `examples/docker/`: |
| 10 | + |
| 11 | +```sh |
| 12 | +docker build -f examples/docker/claude-code.Dockerfile -t sortie-claude . |
| 13 | +``` |
| 14 | + |
| 15 | +Push it to a registry your cluster can pull from, then update the `image` |
| 16 | +field in `deployment.yaml`. |
| 17 | + |
| 18 | +## Quick start |
| 19 | + |
| 20 | +Create a Secret with your API keys: |
| 21 | + |
| 22 | +```sh |
| 23 | +kubectl create secret generic sortie-secrets \ |
| 24 | + --from-literal=ANTHROPIC_API_KEY="sk-..." \ |
| 25 | + --from-literal=SORTIE_JIRA_API_KEY="..." \ |
| 26 | + --from-literal=SORTIE_JIRA_ENDPOINT="https://your-org.atlassian.net" \ |
| 27 | + --from-literal=SORTIE_JIRA_PROJECT="PROJ" |
| 28 | +``` |
| 29 | + |
| 30 | +Apply the manifests: |
| 31 | + |
| 32 | +```sh |
| 33 | +kubectl apply -f examples/k8s/ |
| 34 | +``` |
| 35 | + |
| 36 | +Verify the pod is ready: |
| 37 | + |
| 38 | +```sh |
| 39 | +kubectl get pods -l app.kubernetes.io/name=sortie |
| 40 | +``` |
| 41 | + |
| 42 | +## Manifest files |
| 43 | + |
| 44 | +| File | Description | |
| 45 | +|---|---| |
| 46 | +| `deployment.yaml` | Single-replica Deployment with Recreate strategy | |
| 47 | +| `configmap.yaml` | Sample WORKFLOW.md mounted into the container | |
| 48 | +| `service.yaml` | ClusterIP Service exposing port 7678 | |
| 49 | +| `pvc.yaml` | 1Gi ReadWriteOnce PVC for the SQLite database | |
| 50 | + |
| 51 | +## Customization |
| 52 | + |
| 53 | +1. **Image** — replace `sortie-claude:latest` in `deployment.yaml` with your |
| 54 | + registry image (e.g., `registry.example.com/sortie-claude:v1.0.0`). |
| 55 | +2. **Workflow** — edit the `WORKFLOW.md` content in `configmap.yaml` to match |
| 56 | + your tracker and agent setup. |
| 57 | +3. **Secrets** — the Deployment references a Secret named `sortie-secrets`. |
| 58 | + Add any environment variables your workflow requires. |
| 59 | +4. **Storage** — adjust the PVC size or storage class to match your cluster. |
0 commit comments