forked from xiaohei/taiji-AI-PAD
130 lines
3.4 KiB
Markdown
130 lines
3.4 KiB
Markdown
# AKS 部署总结
|
|
|
|
## ✅ 部署状态
|
|
|
|
### 已成功部署的服务
|
|
|
|
1. **MCP Server** ✅
|
|
- 状态: 运行中
|
|
- 健康检查: 通过
|
|
- 服务端点: `http://mcp-server:8000` (集群内)
|
|
- 端口转发: `kubectl port-forward svc/mcp-server 8002:8000 -n taiji-ai`
|
|
|
|
2. **LiteLLM Gateway** ✅
|
|
- 状态: 运行中
|
|
- 健康检查: 通过(OpenRouter 账户需要充值)
|
|
- 服务端点: `http://litellm-gateway:4000` (集群内)
|
|
- 端口转发: `kubectl port-forward svc/litellm-gateway 4000:4000 -n taiji-ai`
|
|
|
|
3. **Data Ingestion** ✅
|
|
- 状态: 运行中
|
|
- 服务端点: `http://data-ingestion:8000` (集群内)
|
|
- 端口转发: `kubectl port-forward svc/data-ingestion 8001:8000 -n taiji-ai`
|
|
|
|
### 需要关注的服务
|
|
|
|
1. **NATS** ⚠️
|
|
- 状态: 部分 Pod 在创建中
|
|
- 问题: 旧 Pod 使用 amd64 镜像导致失败,新 Pod 正在创建
|
|
- 建议: 等待新 Pod 完全启动后,删除旧的 CrashLoopBackOff Pod
|
|
|
|
2. **Prometheus & Grafana** ⚠️
|
|
- 状态: PVC 挂载问题
|
|
- 建议: 检查存储类配置
|
|
|
|
## 📊 部署信息
|
|
|
|
- **AKS 集群**: taiji-ai-pda
|
|
- **资源组**: taiji-ai-pda
|
|
- **命名空间**: taiji-ai
|
|
- **ACR**: taiji.azurecr.io
|
|
- **节点架构**: ARM64
|
|
|
|
## 🔧 测试命令
|
|
|
|
### 健康检查
|
|
|
|
```bash
|
|
# MCP Server
|
|
kubectl port-forward svc/mcp-server 8002:8000 -n taiji-ai
|
|
curl http://localhost:8002/health
|
|
|
|
# Data Ingestion
|
|
kubectl port-forward svc/data-ingestion 8001:8000 -n taiji-ai
|
|
curl http://localhost:8001/health
|
|
|
|
# LiteLLM Gateway
|
|
kubectl port-forward svc/litellm-gateway 4000:4000 -n taiji-ai
|
|
curl -H "Authorization: Bearer sk-taiji-master-key" http://localhost:4000/health
|
|
```
|
|
|
|
### 查看日志
|
|
|
|
```bash
|
|
# MCP Server
|
|
kubectl logs -f deployment/mcp-server -n taiji-ai
|
|
|
|
# Data Ingestion
|
|
kubectl logs -f deployment/data-ingestion -n taiji-ai
|
|
|
|
# LiteLLM Gateway
|
|
kubectl logs -f deployment/litellm-gateway -n taiji-ai
|
|
```
|
|
|
|
### 查看服务状态
|
|
|
|
```bash
|
|
kubectl get pods -n taiji-ai
|
|
kubectl get services -n taiji-ai
|
|
kubectl get deployments -n taiji-ai
|
|
```
|
|
|
|
## ⚠️ 已知问题
|
|
|
|
1. **OpenRouter 账户余额不足**
|
|
- LiteLLM Gateway 健康检查显示模型端点不可用
|
|
- 需要访问 https://openrouter.ai/settings/credits 充值
|
|
|
|
2. **NATS 集群配置**
|
|
- 当前配置为集群模式,但可能需要调整
|
|
- 如果不需要集群模式,可以简化为单节点部署
|
|
|
|
3. **存储类**
|
|
- Prometheus 和 Grafana 的 PVC 可能需要检查存储类配置
|
|
- 当前使用 `managed-csi`,确保 AKS 集群支持
|
|
|
|
## 🚀 下一步
|
|
|
|
1. **清理旧 Pod**
|
|
```bash
|
|
kubectl delete pod -l app=nats -n taiji-ai --field-selector=status.phase!=Running
|
|
```
|
|
|
|
2. **配置 Ingress**(可选)
|
|
- 如果需要外部访问,配置 Ingress
|
|
- 参考 `ingress.yaml` 文件
|
|
|
|
3. **监控配置**
|
|
- 配置 Prometheus 和 Grafana
|
|
- 设置监控仪表板
|
|
|
|
4. **OpenRouter 充值**
|
|
- 访问 https://openrouter.ai/settings/credits
|
|
- 充值后 LiteLLM Gateway 将正常工作
|
|
|
|
## 📝 部署文件位置
|
|
|
|
所有 Kubernetes 配置文件位于: `/home/taiji/tools/taiji-AI-PAD/k8s/`
|
|
|
|
- `namespace.yaml` - 命名空间
|
|
- `configmap.yaml` - 配置映射
|
|
- `secrets.yaml.template` - Secret 模板
|
|
- `*-deployment.yaml` - 各服务部署配置
|
|
- `ingress.yaml` - Ingress 配置
|
|
- `test-deployment.sh` - 测试脚本
|
|
|
|
## 🎉 部署完成
|
|
|
|
核心服务(MCP Server、LiteLLM Gateway、Data Ingestion)已成功部署并运行!
|
|
|