|
| 1 | +# 🚀 Helm Quick-Start Guide (any Kubernetes cluster) |
| 2 | + |
| 3 | +This doc shows how to use Helm to install, upgrade, and remove the MCP Gateway with PostgreSQL, Redis, PgAdmin and Redis on **any** Kubernetes cluster—local (*kind*, Docker Desktop, Minikube), on-prem (RKE, Rancher), or managed (*EKS*, *AKS*, *GKE*, *Openshift*, etc.). |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 📋 Prerequisites |
| 8 | + |
| 9 | +| Requirement | Notes & Minimum Versions | |
| 10 | +| ----------------------------- | ---------------------------------------------------------------------------------------------- | |
| 11 | +| **Kubernetes** | Cluster reachable by `kubectl`; tested on v1.23 – v1.30 | |
| 12 | +| **Helm 3** | [https://helm.sh/docs/intro/install/](https://helm.sh/docs/intro/install/) | |
| 13 | +| **kubectl** | `kubectl version --short` should return client *and* server | |
| 14 | +| **Container registry access** | If images are private, configure `imagePullSecrets` or `docker login` on all nodes | |
| 15 | +| **(Ingress)** | Either an Ingress controller **or** a cloud LB Service class, depending on how you expose HTTP | |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## 1 — Install Helm & kubectl |
| 20 | + |
| 21 | +### macOS (Homebrew) |
| 22 | + |
| 23 | +```bash |
| 24 | +brew install helm kubernetes-cli |
| 25 | +``` |
| 26 | + |
| 27 | +### Linux |
| 28 | + |
| 29 | +```bash |
| 30 | +curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash |
| 31 | +# kubectl: |
| 32 | +curl -LO "https://dl.k8s.io/release/$(curl -sSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" |
| 33 | +sudo install -m 0755 kubectl /usr/local/bin |
| 34 | +``` |
| 35 | + |
| 36 | +### Windows (PowerShell + Chocolatey) |
| 37 | + |
| 38 | +```powershell |
| 39 | +choco install -y kubernetes-helm kubernetes-cli |
| 40 | +``` |
| 41 | + |
| 42 | +Verify: |
| 43 | + |
| 44 | +```bash |
| 45 | +helm version |
| 46 | +kubectl version --short |
| 47 | +kubectl config get-contexts # choose your target context |
| 48 | +``` |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## 2 — Lint and (optionally) package |
| 53 | + |
| 54 | +```bash |
| 55 | +# Static template check |
| 56 | +helm lint charts/mcp-stack |
| 57 | + |
| 58 | +# Optional: package into dist/ for CI or air-gapped clusters |
| 59 | +mkdir -p dist |
| 60 | +helm package charts/mcp-stack -d dist |
| 61 | +``` |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## 3 — Deploy / Upgrade |
| 66 | + |
| 67 | +### 3-A Minimal install (namespace `mcp`) |
| 68 | + |
| 69 | +```bash |
| 70 | +helm upgrade --install mcp-stack charts/mcp-stack \ |
| 71 | + --namespace mcp --create-namespace \ |
| 72 | + --wait # blocks until Deployments & Jobs are ready |
| 73 | +``` |
| 74 | + |
| 75 | +### 3-B With environment overrides file |
| 76 | + |
| 77 | +```bash |
| 78 | +helm upgrade --install mcp-stack charts/mcp-stack \ |
| 79 | + -n mcp --create-namespace \ |
| 80 | + -f envs/prod-values.yaml \ |
| 81 | + --set mcpContextForge.image.tag=v1.2.3 |
| 82 | +``` |
| 83 | + |
| 84 | +*(The chart's `values.yaml` documents every knob—replicas, resources, ingress host, DB credentials, persistence, …)* |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## 4 — Verify |
| 89 | + |
| 90 | +```bash |
| 91 | +# All resources in the namespace |
| 92 | +kubectl get all -n mcp |
| 93 | + |
| 94 | +# Release status |
| 95 | +helm status mcp-stack -n mcp |
| 96 | + |
| 97 | +# Tail logs |
| 98 | +kubectl logs -n mcp deploy/mcp-stack-app -f |
| 99 | +``` |
| 100 | + |
| 101 | +### Ingress / Service exposure |
| 102 | + |
| 103 | +* **Ingress controller present** → run `kubectl get ingress -n mcp`. |
| 104 | +* **No Ingress** → change `mcpContextForge.service.type` to `LoadBalancer` or `NodePort`. |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## 5 — Updates & Rollbacks |
| 109 | + |
| 110 | +### Rolling upgrade |
| 111 | + |
| 112 | +```bash |
| 113 | +helm upgrade mcp-stack charts/mcp-stack -n mcp \ |
| 114 | + --set mcpContextForge.image.tag=v1.3.0 |
| 115 | +``` |
| 116 | + |
| 117 | +### Diff before upgrade (requires plugin) |
| 118 | + |
| 119 | +```bash |
| 120 | +helm plugin install https://github.com/databus23/helm-diff # once |
| 121 | +helm diff upgrade mcp-stack charts/mcp-stack -n mcp -f values.yaml |
| 122 | +``` |
| 123 | + |
| 124 | +### Roll back |
| 125 | + |
| 126 | +```bash |
| 127 | +helm rollback mcp-stack <REVISION> -n mcp |
| 128 | +# list revisions: |
| 129 | +helm history mcp-stack -n mcp |
| 130 | +``` |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +## 6 — Uninstall |
| 135 | + |
| 136 | +```bash |
| 137 | +helm uninstall mcp-stack -n mcp |
| 138 | +# Optional: delete namespace / PVCs |
| 139 | +kubectl delete ns mcp |
| 140 | +``` |
| 141 | + |
| 142 | +Persistent volumes created with the namespace remain until you delete the PVC/PV objects (or the storage class policy garbage-collects them). |
| 143 | + |
| 144 | +--- |
| 145 | + |
| 146 | +## 7 — Troubleshooting Cheatsheet |
| 147 | + |
| 148 | +| Symptom | Quick check | | |
| 149 | +| ------------------------------------ | ----------------------------------------------------- | ---------------------------------------------------- | |
| 150 | +| Pods stuck in `ImagePullBackOff` | `kubectl describe pod …` → pull secret / repo access | | |
| 151 | +| `CrashLoopBackOff` | `kubectl logs …` → env vars, DB connectivity | | |
| 152 | +| Ingress 404 / no address | \`kubectl get svc -A | grep ingress\` – controller running? LB provisioned? | |
| 153 | +| Helm hook failures (Jobs) | `kubectl get jobs -n mcp && kubectl logs job/<name>` | | |
| 154 | +| Template error during `helm install` | `helm lint charts/mcp-stack` or run \`helm template … | yq\` | |
| 155 | + |
| 156 | +--- |
| 157 | + |
| 158 | +## 8 — CI/CD tips |
| 159 | + |
| 160 | +* **Package once** → push chart (`.tgz`) to OCI registry (`helm push` with `oci://` URLs) or `chartmuseum`. |
| 161 | +* **Values per environment** → `values-dev.yaml`, `values-prod.yaml`, etc. |
| 162 | +* **GitOps** → use Argo CD / Flux to watch the chart + values in Git and auto-sync. |
| 163 | + |
| 164 | +--- |
| 165 | + |
| 166 | +## 🌐 Further reading |
| 167 | + |
| 168 | +* Helm docs – [https://helm.sh/docs/](https://helm.sh/docs/) |
| 169 | +* Kubernetes Ingress concepts – [https://kubernetes.io/docs/concepts/services-networking/ingress/](https://kubernetes.io/docs/concepts/services-networking/ingress/) |
| 170 | +* Persistent Volumes – [https://kubernetes.io/docs/concepts/storage/persistent-volumes/](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) |
| 171 | + |
| 172 | +--- |
| 173 | + |
| 174 | +Deploying with Helm turns your stack into a versioned, repeatable artefact—ideal for local dev, staging, and production alike. |
0 commit comments