> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nrai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Helm

> Deploy NRAI on Kubernetes using Helm

This guide walks you through deploying NRAI on Kubernetes using the official Helm chart.

## Prerequisites

* Kubernetes cluster (v1.19+)
* Helm 3.x installed
* kubectl configured to access your cluster

## Quick Start

### 1. Clone the Repository

```bash theme={null}
git clone https://github.com/NRAI/NRAI.git
cd NRAI
```

### 2. Install Dependencies

```bash theme={null}
helm dependency update
```

### 3. Create a Values File

Create a `my-values.yaml` file with your configuration. You can use the [example values file](https://github.com/NRAI/NRAI/blob/main/deploy/NRAI-helm/values.yaml) as a reference.

### 4. Install NRAI

```bash theme={null}
helm install NRAI deploy/NRAI-helm -f my-values.yaml
```

### 5. Verify Installation

```bash theme={null}
# Check deployment status
kubectl get pods
kubectl get services

```

## Production Checklist

* [ ] Set strong passwords for PostgreSQL and Redis
* [ ] Configure proper ingress with TLS
* [ ] Set appropriate resource limits
* [ ] Configure persistent storage
* [ ] Review [environment variables](/docs/install/configuration/environment-variables) for proper configuration
* [ ] Choose appropriate [execution mode](/docs/install/architecture/workers) for your security requirements
* [ ] Consider using a [separate workers](/docs/install/configuration/separate-workers) setup for better availability and security

## Upgrading

```bash theme={null}
# Update dependencies
helm dependency update

# Upgrade release
helm upgrade NRAI deploy/NRAI-helm -f my-values.yaml

# Check upgrade status
kubectl rollout status deployment/NRAI
```

## Troubleshooting

### Common Issues

1. **Pod won't start**: Check logs with `kubectl logs deployment/NRAI`
2. **Database connection**: Verify PostgreSQL credentials and connectivity
3. **Frontend URL**: Ensure `frontendUrl` is accessible from external sources
4. **Webhooks not working**: Check ingress configuration and DNS resolution

### Useful Commands

```bash theme={null}
# View logs
kubectl logs deployment/NRAI -f

# Port forward for testing
kubectl port-forward svc/NRAI 4200:80 --namespace default

# Get all resources
kubectl get all --namespace default
```

## Environment Variables

For a complete list of configuration options, see the [Environment Variables](/docs/install/configuration/environment-variables) documentation. Most environment variables can be configured through the Helm values file under the `NRAI` section.

## Execution Modes

Understanding execution modes is crucial for security and performance. See the [Workers & Sandboxing](/docs/install/architecture/workers) guide to choose the right mode for your deployment.

## Uninstalling

```bash theme={null}
helm uninstall NRAI

# Clean up persistent volumes (optional)
kubectl delete pvc -l app.kubernetes.io/instance=NRAI
```
