> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akria.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 快速开始 | Quick Start

> 快速将你的应用部署到 K3s 集群

# 快速开始 | Quickstart

本指南将帮助你在几分钟内将应用部署到我们的 K3s 集群。

<Info>
  在开始之前，请确保你已经阅读了 [团队协作规范](/guides/team-collab/welcome) 和 [YAML 部署规范](/technical/infra-deploy/yaml-best-practices)。
</Info>

## 🚀 三步部署 | Deploy in Three Steps

### 步骤 1: 准备部署配置

创建符合规范的 YAML 配置文件：

<AccordionGroup>
  <Accordion title="创建 Deployment" icon="file-code">
    创建 `deployment.yaml` 文件，参考以下模板：

    ```yaml deployment.yaml theme={null}
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: your-app
      namespace: project-team
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: your-app
      template:
        metadata:
          labels:
            app: your-app
        spec:
          containers:
          - name: app
            image: your-image:tag
            ports:
            - containerPort: 8080
            resources:
              requests:
                cpu: "100m"
                memory: "128Mi"
              limits:
                cpu: "500m"
                memory: "512Mi"
    ```

    <Tip>
      记得将 `your-app` 和 `your-image:tag` 替换为你的实际应用名称和镜像。
    </Tip>
  </Accordion>

  <Accordion title="创建 Service" icon="network-wired">
    创建 `service.yaml` 文件以暴露服务：

    ```yaml service.yaml theme={null}
    apiVersion: v1
    kind: Service
    metadata:
      name: your-app-service
      namespace: project-team
    spec:
      selector:
        app: your-app
      ports:
      - port: 80
        targetPort: 8080
      type: ClusterIP
    ```
  </Accordion>
</AccordionGroup>

### 步骤 2: 提交到 Git 仓库

<Steps>
  <Step title="创建功能分支">
    ```bash theme={null}
    git checkout -b feature/deploy-your-app
    ```
  </Step>

  <Step title="添加配置文件">
    ```bash theme={null}
    git add deployment.yaml service.yaml
    git commit -m "feat: 添加应用部署配置"
    ```
  </Step>

  <Step title="推送到远程仓库">
    ```bash theme={null}
    git push origin feature/deploy-your-app
    ```
  </Step>
</Steps>

### 步骤 3: 创建 Pull Request

1. 在 GitHub 上创建 Pull Request
2. 等待团队成员审核
3. 审核通过后，配置将自动部署到集群

<Warning>
  所有部署必须通过 Pull Request 审核，直接推送到主分支的变更将被拒绝。
</Warning>

## 📋 部署检查清单 | Deployment Checklist

部署前请确认：

* [ ] 命名空间设置为 `project-team`
* [ ] 资源限制已合理配置（参考 [YAML 规范](/technical/infra-deploy/yaml-best-practices)）
* [ ] 镜像标签明确（避免使用 `latest`）
* [ ] 健康检查探针已配置（如适用）
* [ ] 提交信息符合 [提交规范](/guides/team-collab/welcome#提交规范--commit-convention)

## 🔍 验证部署 | Verify Deployment

部署成功后，可以通过以下命令验证：

```bash theme={null}
# 查看 Deployment 状态
kubectl get deployments -n project-team

# 查看 Pod 状态
kubectl get pods -n project-team

# 查看 Service
kubectl get services -n project-team

# 查看 Pod 日志
kubectl logs -n project-team <pod-name>
```

## 📚 下一步 | Next Steps

<CardGroup cols={2}>
  <Card title="团队协作规范" icon="users" href="/guides/team-collab/welcome">
    了解 Git 工作流和代码审核流程
  </Card>

  <Card title="YAML 规范" icon="file-code" href="/technical/infra-deploy/yaml-best-practices">
    深入学习部署配置的最佳实践
  </Card>

  <Card title="开发指南" icon="code" href="/guides/website-overview/development">
    配置本地开发环境
  </Card>

  <Card title="API 参考" icon="book" href="/technical/api-reference/introduction">
    查看完整的 API 文档
  </Card>
</CardGroup>

<Note>
  遇到问题？查看我们的 [开发指南](/guides/website-overview/development) 或通过 GitHub Issues 联系团队。
</Note>
