模式

运维部署 社区

技能解读

当前原文的自动摘译,尚未人工审校。

工作负载

对象 · 使用案例 · 扩展部署 · 无状态应用程序 · 副本、HPA StatefulSet · 有状态应用程序 (DB) · 稳定的网络 ID DaemonSet · 每节点代理(日志记录、监控) · 节点计数 Job/CronJob · 批处理任务、计划作业 · 完成

网络

服务:Pod 的稳定端点(ClusterIP、NodePort、LoadBalancer) 入口:HTTP 路由、TLS 终止、基于路径的路由 网络策略:Pod 级防火墙规则

资源管理

始终设置请求和限制 使用 LimitRange 作为命名空间默认值 使用 ResourceQuota 作为命名空间上限

Pod 反亲和力

将 Pod 分布在节点上以实现 HA。

就绪性和活性探针

就绪:流量开始流动 活跃:pod 重新启动 启动:针对缓慢启动的容器

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
运维部署
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
macOS · Linux · Windows
运行环境要求
Node.js
检测到的文件与系统行为
  • 只读
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Kubernetes Patterns

Deploy and manage production Kubernetes clusters.

## Core Objects

### Workloads
| Object | Use Case | Scaling |
|--------|----------|---------|
| Deployment | Stateless apps | Replicas, HPA |
| StatefulSet | Stateful apps (DBs) | Stable network IDs |
| DaemonSet | Per-node agents (logging, monitoring) | Node count |
| Job/CronJob | Batch tasks, scheduled jobs | Completion |

### Networking
- **Service**: Stable endpoint for pods (ClusterIP, NodePort, LoadBalancer)
- **Ingress**: HTTP routing, TLS termination, path-based routing
- **Network Policies**: Pod-level firewall rules

## Production Best Practices

### Resource Management
```yaml
resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 500m
    memory: 256Mi
```
- Always set requests AND limits
- Use LimitRange for namespace defaults
- Use ResourceQuota for namespace caps

### Pod Anti-Affinity
Spread pods across nodes for HA.

### Readiness & Liveness Probes
- Readiness: traffic starts flowing
- Liveness: pod gets restarted
- Startup: for slow-starting containers

## RBAC
- Least-privilege service accounts per app
- Namespace-scoped roles (not cluster-wide)
- Regularly audit permissions
- Use groups, not individual users

## Autoscaling
- HPA: scale by CPU/memory or custom metrics
- VPA: adjust resource requests automatically
- Cluster Autoscaler: add/remove nodes
- KEDA: event-driven scaling (SQS queue depth, etc.)

---
> Source: [cosmicstack-labs/mercury-agent-skills](https://github.com/cosmicstack-labs/mercury-agent-skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。