fix: 将 k3s-ansible 作为普通目录添加
This commit is contained in:
73
QUICK-REFERENCE.md
Normal file
73
QUICK-REFERENCE.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# K3s集群部署快速参考
|
||||
|
||||
## 一键部署
|
||||
|
||||
```bash
|
||||
# 完整部署流程
|
||||
cd /home/fei/opk3s/k3s自动化部署
|
||||
git clone https://github.com/k3s-io/k3s-ansible.git # 首次需要
|
||||
chmod +x scripts/*.sh scripts/*.py
|
||||
./scripts/deploy-all.sh
|
||||
```
|
||||
|
||||
## 常用命令
|
||||
|
||||
### 部署相关
|
||||
|
||||
```bash
|
||||
# 一键部署所有组件
|
||||
./scripts/deploy-all.sh
|
||||
|
||||
# 重置状态从头开始
|
||||
./scripts/deploy-all.sh --reset
|
||||
|
||||
# 验证部署状态
|
||||
./scripts/verify-deployment.sh
|
||||
|
||||
# 测试幂等性
|
||||
./scripts/test-idempotency.sh
|
||||
```
|
||||
|
||||
### 分步部署
|
||||
|
||||
```bash
|
||||
./scripts/deploy.sh # 部署K3s集群
|
||||
./scripts/deploy-gitea.sh # 部署Gitea
|
||||
./scripts/setup-gitea.sh # 初始化Gitea
|
||||
./scripts/deploy-argocd.sh # 部署ArgoCD
|
||||
./scripts/deploy-https.sh # 配置HTTPS
|
||||
./scripts/create-argocd-app.sh # 创建ArgoCD应用
|
||||
./scripts/push-demo-app.sh # 推送示例应用
|
||||
```
|
||||
|
||||
## 访问地址
|
||||
|
||||
### 获取访问信息
|
||||
|
||||
```bash
|
||||
# Gitea
|
||||
GITEA_PORT=$(kubectl get svc gitea-http -n gitea -o jsonpath='{.spec.ports[0].nodePort}')
|
||||
echo "Gitea: http://8.216.38.248:$GITEA_PORT"
|
||||
|
||||
# ArgoCD
|
||||
ARGOCD_PORT=$(kubectl get svc argocd-server -n argocd -o jsonpath='{.spec.ports[0].nodePort}')
|
||||
echo "ArgoCD: https://8.216.38.248:$ARGOCD_PORT"
|
||||
```
|
||||
|
||||
## 幂等性特性
|
||||
|
||||
所有脚本支持重复执行:
|
||||
- ✅ 自动跳过已完成步骤
|
||||
- ✅ 不会破坏现有配置
|
||||
- ✅ 失败后可断点续传
|
||||
|
||||
## 文档索引
|
||||
|
||||
- `README.md` - 完整使用文档
|
||||
- `IDEMPOTENCY-TEST.md` - 幂等性测试指南
|
||||
- `IMPLEMENTATION-SUMMARY.md` - 实施总结
|
||||
- `QUICK-REFERENCE.md` - 本文档
|
||||
|
||||
---
|
||||
|
||||
**提示**: 所有脚本都支持幂等性,可以安全地重复执行!
|
||||
Reference in New Issue
Block a user