Files
NovalRedot/k8s/README.md
ROOG a470739190
Some checks failed
Deploy Noval to K3s / deploy (push) Failing after 1s
ci: add gitea deploy workflow and k3s manifests with cert-manager tls
2026-03-22 17:29:02 +08:00

45 lines
1.4 KiB
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.

# Noval K3s 部署说明
## 文件列表
- `namespace.yaml`:命名空间
- `pvc.yaml`SQLite 数据持久化存储
- `deployment.yaml`应用部署2 副本,滚动更新)
- `service.yaml`:集群内服务
- `cluster-issuer.yaml`cert-manager ClusterIssuerLet's Encrypt
- `ingress.yaml`Traefik 入口(域名 + TLS
## 一次性手动部署
```bash
cd /root/k8syaml/NovalRedot
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/cluster-issuer.yaml
kubectl apply -f k8s/pvc.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/ingress.yaml
```
## CI/CD 自动部署
已配置 Gitea Actions`.gitea/workflows/deploy.yml`
触发条件:`main` 分支 push。
流水线逻辑:
1. 在 Runner 所在机器拉取最新代码
2. 构建 Docker 镜像并打 tag`noval-app:<commit>` + `latest`
3. 导入镜像到 k3s containerd
4. 应用 K8s 资源并滚动更新 Deployment
5. 等待 rollout 完成
## 你需要确认/调整
1. **域名**:当前写的是 `writing-reddot.roog-code.cn``k8s/ingress.yaml`
2. **TLS Secret**:当前是 `writing-reddot-roog-code-tls`
3. **ClusterIssuer**:当前是 `letsencrypt-prod``k8s/cluster-issuer.yaml`
4. **ClusterIssuer 邮箱**:当前是 `roog-code@outlook.com`(可改成你常用邮箱)
5. **Ingress 类**:当前按 Traefik 配置k3s 默认)
6. **StorageClass**`local-path`k3s 默认)