Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit 00f8670

Browse files
committed
Claude updates from the website
1 parent 0817ee3 commit 00f8670

File tree

1 file changed

+242
-9
lines changed

1 file changed

+242
-9
lines changed

deployment/minikube.md

Lines changed: 242 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,269 @@ Deploy TrustGraph on Minikube for local Kubernetes development and testing.
1212

1313
## Overview
1414

15-
Minikube allows you to run TrustGraph in a local Kubernetes cluster, providing a production-like environment for development and testing.
15+
Minikube allows you to run TrustGraph in a local Kubernetes cluster, providing a production-like environment for development and testing. This deployment method offers:
16+
17+
- **Kubernetes-native deployment** with local development capabilities
18+
- **Production-like environment** for testing at scale
19+
- **Resource isolation** and management
20+
- **LoadBalancer** and service discovery testing
1621

1722
## Prerequisites
1823

19-
Coming soon - detailed content!
24+
### System Requirements
25+
26+
- **Minikube** installed and configured
27+
- **kubectl** command-line tool
28+
- **Docker Engine** (most common driver for Minikube)
29+
- **Minimum resources**: 4 CPU cores, 8GB RAM
30+
- **Python 3.x** for TrustGraph CLI tools
31+
32+
### Driver Requirements
33+
34+
Minikube requires a driver for virtualization. The most common is Docker Engine. See the [full Minikube driver documentation](https://minikube.sigs.k8s.io/docs/drivers/) for all available options.
2035

2136
## Installation
2237

23-
Coming soon - detailed content!
38+
### 1. Install Prerequisites
39+
40+
```bash
41+
# Install TrustGraph CLI tools
42+
python3 -m venv env
43+
source env/bin/activate
44+
pip install trustgraph-cli
45+
```
46+
47+
### 2. Start Minikube
48+
49+
```bash
50+
minikube start --cpus=4 --memory=8192
51+
```
52+
53+
### 3. Verify Minikube
54+
55+
```bash
56+
kubectl cluster-info
57+
kubectl get nodes
58+
```
2459

2560
## Configuration
2661

27-
Coming soon - detailed content!
62+
### YAML Configuration
63+
64+
Obtain your TrustGraph Kubernetes configuration file from the [TrustGraph Configuration Portal](https://config-ui.demo.trustgraph.ai/):
65+
66+
1. Select **Kubernetes/Minikube** as deployment method
67+
2. Configure your preferred LLM, graph store, and vector store
68+
3. Download the generated YAML configuration file
2869

2970
## Deployment
3071

31-
Coming soon - detailed content!
72+
### 1. Deploy TrustGraph
73+
74+
```bash
75+
kubectl apply -f <configuration-file.yaml>
76+
```
77+
78+
### 2. Launch LoadBalancer
79+
80+
**In a separate terminal window:**
81+
82+
```bash
83+
minikube tunnel
84+
```
85+
86+
> **Important**: Keep this terminal window open. The LoadBalancer must remain running for cluster communications.
87+
88+
### 3. Verify Services
89+
90+
Check that TrustGraph services are running:
91+
92+
```bash
93+
tg-processor-state
94+
```
95+
96+
To continuously monitor service status:
97+
98+
```bash
99+
watch tg-processor-state
100+
```
101+
102+
> **Note**: On macOS, install watch with: `brew install watch`
103+
104+
### 4. Wait for Stabilization
105+
106+
Wait until all container **STATUS** switches to `Running` before proceeding.
107+
108+
## Working with Documents
109+
110+
### Load Sample Data
111+
112+
Create a sources directory and download a test document:
113+
114+
```bash
115+
mkdir sources
116+
curl -o sources/Challenger-Report-Vol1.pdf https://sma.nasa.gov/SignificantIncidents/assets/rogers_commission_report.pdf
117+
```
118+
119+
### Load Documents
120+
121+
**Single PDF:**
122+
```bash
123+
tg-load-pdf sources/Challenger-Report-Vol1.pdf
124+
```
125+
126+
**Single Text File:**
127+
```bash
128+
tg-load-text sources/<txt-file.txt>
129+
```
130+
131+
**Batch Loading:**
132+
```bash
133+
# Load all PDFs from directory
134+
tg-load-pdf sources/*.pdf
135+
136+
# Load all text files from directory
137+
tg-load-text sources/*.txt
138+
```
32139

33140
## Accessing Services
34141

35-
Coming soon - detailed content!
142+
### Service Discovery
143+
144+
With the LoadBalancer running, TrustGraph services are accessible through Kubernetes service discovery. The exact URLs depend on your configuration, but typically include:
145+
146+
- **TrustGraph API**: Available through service mesh
147+
- **Monitoring**: Grafana dashboards if configured
148+
- **Web Interface**: TrustGraph workbench if enabled
149+
150+
### Port Forwarding
151+
152+
For direct access to specific services:
153+
154+
```bash
155+
# Forward specific service port
156+
kubectl port-forward svc/<service-name> <local-port>:<service-port>
157+
```
36158

37159
## Monitoring
38160

39-
Coming soon - detailed content!
161+
### Check Knowledge Graph
162+
163+
Verify graph parsing results:
164+
165+
```bash
166+
tg-graph-show
167+
```
168+
169+
### Count Graph Edges
170+
171+
```bash
172+
tg-graph-show | wc -l
173+
```
174+
175+
> **Tip**: Wait for at least 1000 graph edges for meaningful testing.
176+
177+
### Kubernetes Monitoring
178+
179+
```bash
180+
# Check pod status
181+
kubectl get pods
182+
183+
# Check service status
184+
kubectl get services
185+
186+
# View pod logs
187+
kubectl logs <pod-name>
188+
189+
# Describe pod details
190+
kubectl describe pod <pod-name>
191+
```
192+
193+
## Testing with Graph RAG
194+
195+
### Basic Query
196+
197+
```bash
198+
tg-invoke-graph-rag -q "Give me 20 facts about the space shuttle Challenger"
199+
```
200+
201+
### Custom Queries
202+
203+
```bash
204+
tg-invoke-graph-rag -q "Your custom question here"
205+
```
206+
207+
### Expected Output
208+
209+
Successful GraphRAG queries will return contextual facts extracted from your knowledge graph, formatted as structured responses with numbered points.
40210

41211
## Troubleshooting
42212

43-
Coming soon - detailed content!
213+
### Common Issues
214+
215+
**LoadBalancer Not Starting:**
216+
- Ensure `minikube tunnel` is running in separate terminal
217+
- Check Minikube status: `minikube status`
218+
- Verify driver is working: `minikube config view`
219+
220+
**Services Not Ready:**
221+
- Check pod status: `kubectl get pods`
222+
- View pod logs: `kubectl logs <pod-name>`
223+
- Verify resources: `kubectl describe node minikube`
224+
225+
**Image Pull Issues:**
226+
- Check network connectivity
227+
- Verify image registry access
228+
- Monitor pod events: `kubectl get events`
229+
230+
### Debug Commands
231+
232+
```bash
233+
# Check cluster info
234+
kubectl cluster-info
235+
236+
# Get all resources
237+
kubectl get all
238+
239+
# Check node resources
240+
kubectl describe node minikube
241+
242+
# View recent events
243+
kubectl get events --sort-by=.metadata.creationTimestamp
244+
245+
# Check Minikube logs
246+
minikube logs
247+
```
248+
249+
## Shutdown
250+
251+
### Clean Shutdown
252+
253+
```bash
254+
# Remove TrustGraph deployment
255+
kubectl delete -f <configuration-file.yaml>
256+
257+
# Stop Minikube
258+
minikube stop
259+
260+
# Optional: Delete Minikube cluster
261+
minikube delete
262+
```
263+
264+
### Verify Cleanup
265+
266+
```bash
267+
# Check no resources remain
268+
kubectl get all
269+
270+
# Verify Minikube status
271+
minikube status
272+
```
44273

45274
## Next Steps
46275

47-
Coming soon - detailed content!
276+
- **Production Kubernetes**: Scale to full Kubernetes clusters
277+
- **Cloud Deployment**: Explore [AWS](aws.md), [GCP](gcp.md) managed Kubernetes
278+
- **Monitoring**: Set up comprehensive monitoring with Prometheus/Grafana
279+
- **Security**: Review [Security Considerations](security-considerations.md)
280+
- **Performance**: Optimize for larger workloads

0 commit comments

Comments
 (0)