|
| 1 | +# Kubernetes + Argo CD |
| 2 | + |
| 3 | +You can deploy RoadRunner to Kubernetes via GitOps using Argo CD with the official example repository: [roadrunner-server/k8s-examples](https://github.com/roadrunner-server/k8s-examples). The chart lives in [`deploy/charts/roadrunner`](https://github.com/roadrunner-server/k8s-examples/tree/master/deploy/charts/roadrunner), and the Argo CD example is in [`deploy/argocd`](https://github.com/roadrunner-server/k8s-examples/tree/master/deploy/argocd). |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +- Kubernetes `>= 1.26` |
| 8 | +- Argo CD installed |
| 9 | +- `kubectl` access to your cluster |
| 10 | +- A runnable RoadRunner container image (or the example image from `k8s-examples`) |
| 11 | + |
| 12 | +## Use the Official Example |
| 13 | + |
| 14 | +Use these files from the upstream repository: |
| 15 | + |
| 16 | +- Chart: [`deploy/charts/roadrunner`](https://github.com/roadrunner-server/k8s-examples/tree/master/deploy/charts/roadrunner) |
| 17 | +- Argo application: [`deploy/argocd/application.yaml`](https://github.com/roadrunner-server/k8s-examples/blob/master/deploy/argocd/application.yaml) |
| 18 | +- Values overrides: [`deploy/argocd/values.yaml`](https://github.com/roadrunner-server/k8s-examples/blob/master/deploy/argocd/values.yaml) |
| 19 | + |
| 20 | +## Recommended Values (MetalLB-Friendly) |
| 21 | + |
| 22 | +This profile avoids dependency on a Gateway controller and works well on clusters using MetalLB for external service exposure: |
| 23 | + |
| 24 | +{% code title="values.yaml" %} |
| 25 | + |
| 26 | +```yaml |
| 27 | +service: |
| 28 | + type: LoadBalancer |
| 29 | + |
| 30 | +gateway: |
| 31 | + enabled: false |
| 32 | + |
| 33 | +ingress: |
| 34 | + enabled: false |
| 35 | +``` |
| 36 | +
|
| 37 | +{% endcode %} |
| 38 | +
|
| 39 | +## Apply with Argo CD |
| 40 | +
|
| 41 | +Apply the Argo CD `Application` manifest: |
| 42 | + |
| 43 | +```bash |
| 44 | +kubectl apply -f deploy/argocd/application.yaml |
| 45 | +``` |
| 46 | + |
| 47 | +If needed, customize `repoURL` and `targetRevision` in `application.yaml` before applying. |
| 48 | + |
| 49 | +## Verify Sync and Health |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +```bash |
| 54 | +kubectl -n roadrunner get svc roadrunner -w |
| 55 | +curl -sS http://<external-ip>/ |
| 56 | +curl -sS http://<external-ip>/health |
| 57 | +``` |
| 58 | + |
| 59 | +## Troubleshooting |
| 60 | + |
| 61 | +- If Argo CD shows `Progressing` and `Waiting for controller`, Gateway resources are enabled but no Gateway controller/GatewayClass is reconciling them. |
| 62 | +- If your cluster has no Gateway controller, keep `gateway.enabled=false` and `ingress.enabled=false`, and use `service.type=LoadBalancer`. |
| 63 | +- If no external IP appears, verify MetalLB IP pool allocation and inspect service events. |
| 64 | + |
| 65 | +## Next Steps |
| 66 | + |
| 67 | +- Argo CD deployment guide: [deploy/argocd/README.md](https://github.com/roadrunner-server/k8s-examples/blob/master/deploy/argocd/README.md) |
| 68 | +- Health checks and probes in RoadRunner docs: [HealthChecks](../lab/health.md) |
0 commit comments