a-cloud-all/k8s/09-job/README.md

45 lines
931 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 09-Job 部署
## 说明
部署 Job 定时任务模块,提供定时任务调度功能。
## 部署流程
1. **打包 Job** - 执行 bin/package.sh ruoyi-modules-job
2. **复制 jar** - 复制 jar 文件到 docker/ruoyi/modules/job/jar
3. **构建镜像** - 使用 docker-compose 构建 Job 镜像
4. **导入镜像** - 如果是 Minikube 环境,自动导入镜像
5. **部署到 K8s** - 部署 Service 和 Deployment
6. **等待启动** - 等待 Pod 就绪
## 配置说明
- **Service 名称**: ruoyi-modules-job
- **端口**: 9203
- **镜像**: ruoyi-modules-job-runtime
- **依赖**: MySQL
## 文件说明
- `service.yaml` - Job Service 配置ClusterIP
- `deployment.yaml` - Job Deployment 配置
- `deploy.sh` - 一键部署脚本
## 部署步骤
```bash
# 进入目录
cd 09-job
# 执行部署脚本
./deploy.sh
```
## 访问
```bash
# 集群内访问
ruoyi-modules-job.ruoyi.svc.cluster.local:9203
```