# Beszel Hub Helm ChartA Kubernetes Helm chart for deploying [Beszel Hub](https://www.beszel.dev/) - a monitoring and alerting solution for systems, containers, and services.## OverviewThis Helm chart simplifies the deployment of Beszel Hub in Kubernetes environments. Beszel Hub is a centralized monitoring hub that collects and aggregates system metrics from multiple agents deployed across your infrastructure.## Prerequisites- Kubernetes 1.19+- Helm 3.0+- At least 500Mi of persistent storage (configurable)## Quick Start### 1. Install the OCI Chart```bashhelm install beszel-hub oci://ghcr.io/henrygd/beszel-charts/beszel-hub```Or with a custom values file:```bashhelm install beszel-hub oci://ghcr.io/henrygd/beszel-charts/beszel-hub -f custom-values.yaml```### 2. Access Beszel HubBy default, Beszel Hub is accessible at `http://beszel-hub:8090` within the cluster.```bash# Port forward to access locallykubectl port-forward svc/beszel-hub 8090:8090```Then visit: `http://localhost:8090`## Configuration### Basic ConfigurationKey configuration options in `values.yaml`:| Parameter | Default | Description ||-----------|---------|-------------|| `replicaCount` | `1` | Number of Beszel Hub replicas || `image.repository` | `henrygd/beszel` | Container image repository || `image.tag` | Chart AppVersion (0.21.2) | Container image tag || `image.pullPolicy` | `IfNotPresent` | Image pull policy || `service.port` | `8090` | Service port || `persistentVolumeClaim.enabled` | `true` | Enable persistent volume || `persistentVolumeClaim.size` | `500Mi` | PVC size |### Installation with Custom Values```bashhelm install beszel-hub ./beszel-hub \--set replicaCount=2 \--set persistentVolumeClaim.size=1Gi \--set service.type=LoadBalancer```Or create a custom values file:```yaml# custom-values.yamlreplicaCount: 2service:type: LoadBalancerpersistentVolumeClaim:size: 1Gi```Then install:```bashhelm install beszel-hub ./beszel-hub -f custom-values.yaml```## Advanced Configuration### Ingress ConfigurationEnable and configure Ingress for external access:```yamlingress:enabled: trueclassName: nginx # or your ingress classannotations:cert-manager.io/cluster-issuer: "letsencrypt-prod"hosts:- host: beszel.example.compaths:- path: /pathType: Prefixtls:- secretName: beszel-tlshosts:- beszel.example.com```### Persistent Volume ConfigurationTo use an existing PersistentVolumeClaim:```yamlpersistentVolumeClaim:enabled: trueexistingClaim: "my-existing-pvc"```Or to use a specific storage class:```yamlpersistentVolumeClaim:enabled: truestorageClass: "fast-ssd"size: 1Gi```### Resource LimitsSet CPU and memory limits:```yamlresources:limits:cpu: 500mmemory: 512Mirequests:cpu: 250mmemory: 256Mi```### AutoscalingEnable Horizontal Pod Autoscaler:```yamlautoscaling:enabled: trueminReplicas: 2maxReplicas: 10targetCPUUtilizationPercentage: 80```### Node SelectionSchedule pods on specific nodes:```yamlnodeSelector:node-type: monitoringtolerations:- key: "monitoring"operator: "Equal"value: "true"effect: "NoSchedule"```## Deployment Examples### Production Setup```yamlreplicaCount: 3image:tag: "0.21.2"service:type: LoadBalanceringress:enabled: trueclassName: nginxhosts:- host: beszel.example.compaths:- path: /pathType: Prefixtls:- secretName: beszel-tlshosts:- beszel.example.compersistentVolumeClaim:enabled: truestorageClass: "fast-ssd"size: 2Giresources:limits:cpu: 1000mmemory: 1Girequests:cpu: 500mmemory: 512Miautoscaling:enabled: trueminReplicas: 3maxReplicas: 10targetCPUUtilizationPercentage: 75```### Development/Test Setup```yamlreplicaCount: 1service:type: ClusterIPpersistentVolumeClaim:enabled: truesize: 500Miresources:limits:cpu: 200mmemory: 256Mirequests:cpu: 100mmemory: 128Mi```## Managing Beszel Hub### Upgrade```bashhelm upgrade beszel-hub ./beszel-hub```### Check Status```bash# Get deployment statuskubectl get deployment beszel-hubkubectl get pods -l app.kubernetes.io/name=beszel# Get service infokubectl get svc beszel-hub```### View Logs```bashkubectl logs -l app.kubernetes.io/name=beszel -f```### Access Pod Shell```bashkubectl exec -it <pod-name> -- sh```### Uninstall```bashhelm uninstall beszel-hub```## Connecting Beszel AgentsAfter deploying Beszel Hub, you can connect Beszel agents running on:- Kubernetes nodes- VM instances- Bare metal servers- Docker containersAgents communicate with the Hub on port `8090`. Configure the agent with the Hub's address:```HUB_URL=http://beszel-hub.default.svc.cluster.local:8090```Or for external access, use the LoadBalancer IP/DNS or Ingress hostname.## Troubleshooting### Pod won't start```bash# Check pod status and eventskubectl describe pod <pod-name>kubectl logs <pod-name>```### Persistent volume issues```bash# Check PVC statuskubectl get pvckubectl describe pvc beszel-hub```### Connection issues with agents- Verify the service is accessible: `kubectl get svc beszel-hub`- Check network policies aren't blocking traffic- Ensure agents can resolve the Hub's DNS name- Verify port `8090` is open on the service### Storage fullIncrease PVC size:```bash# Update the PVC size in valueshelm upgrade beszel-hub ./charts/beszel-hub \--set persistentVolumeClaim.size=2Gi```## Security Considerations- Use network policies to restrict traffic to Beszel Hub- Enable RBAC and pod security policies- Use TLS/HTTPS via Ingress with cert-manager- Regularly update the image to the latest version- Consider running with read-only filesystem- Use private container registries if applicable## PersistenceBy default, Beszel Hub uses a PersistentVolumeClaim for data storage. Ensure your Kubernetes cluster has enough storage capacity and a default storage class configured.## Support and Documentation- **Project Homepage**: https://www.beszel.dev/- **GitHub Repository**: https://github.com/henrygd/beszel- **Chart Repository**: https://github.com/henrygd/beszel-kubernetes## Chart Information- **Chart Version**: 0.1.0- **App Version**: 0.21.2- **Kubernetes Version**: 1.19+- **Maintainer**: cloudwithdan (nikoloskid@pm.me)## LicensePlease refer to the main Beszel project repository for license information.