Skip to content

Commit

Permalink
feat: Added k8s liveness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Feb 14, 2024
1 parent d0d01ea commit 903f15c
Showing 1 changed file with 72 additions and 1 deletion.
73 changes: 72 additions & 1 deletion docs/running/health-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,75 @@ services:
volumes:
chroma-data:
driver: local
```
```
## Kubernetes
In kubernetes you can use the `livenessProbe` and `readinessProbe` to check the health of the server. This is useful if
you are deploying Chroma in a kubernetes cluster.

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: chroma
labels:
app: chroma
spec:
replicas: 1
selector:
matchLabels:
app: chroma
template:
metadata:
labels:
app: chroma
spec:
containers:
- name: chroma
image: <chroma-image>
ports:
- containerPort: 8000
livenessProbe:
httpGet:
path: /api/v1
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /api/v1
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
startupProbe:
httpGet:
path: /api/v1
port: 8000
failureThreshold: 3
periodSeconds: 60
initialDelaySeconds: 60
```

Alternative to the `httpGet` you can also use `tcpSocket`:

```yaml
readinessProbe:
tcpSocket:
port: 8000
failureThreshold: 3
timeoutSeconds: 30
periodSeconds: 60
livenessProbe:
tcpSocket:
port: 8000
failureThreshold: 3
timeoutSeconds: 30
periodSeconds: 60
startupProbe:
tcpSocket:
port: 8000
failureThreshold: 3
periodSeconds: 60
initialDelaySeconds: 60
```

0 comments on commit 903f15c

Please sign in to comment.