Files
simple321vip 299cdb84e0
continuous-integration/drone/push Build is failing
feat: add ISP footer link
2026-06-29 23:47:46 +08:00

44 lines
1.1 KiB
Markdown
Raw Permalink 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.
# violin-cv K8s 部署
## 一键部署
```bash
kubectl apply -f namespace.yaml
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
kubectl apply -f ingress.yaml
```
## 验证
```bash
# 看 pod 启动
kubectl get pods -n drone -l app=violin-cv
# 看 service / ingress
kubectl get svc,ing -n drone -l app=violin-cv
# 测访问
curl -I http://cv.violin-work.online/
```
## 文件说明
| 文件 | 作用 |
|------|------|
| `namespace.yaml` | K8s namespace**不会真正创建**,因为 drone namespace 已存在;保留是声明依赖) |
| `deployment.yaml` | 1 个 nginx 容器跑 HTMLreplicas=1,资源极省 |
| `service.yaml` | ClusterIP,端口 80 |
| `ingress.yaml` | `cv.violin-work.online` → service:80TLS 暂时不配,用 cert-manager 后再说) |
## 镜像
`.drone.yml` 自动 push 到 `ccr.ccs.tencentyun.com/violin/violin-cv:latest`
## 域名
`cv.violin-work.online` 需要:
1. 你的 DNS 把这个域名解析到 K8s ingress 公网 IP
2. 集群已装 nginx-ingress-controller
3. (可选)cert-manager 给 `cv.violin-work.online` 申请证书