K8s 助手
- 作者仓库星标 0
- 作者仓库 skills-registry
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
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.)
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: cosmicstack-labs/mercury-agent-skills — distributed by TomeVault.
- 流狐分类
- 运维部署
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Core Objects
Object · Use Case · Scaling Deployment · Stateless apps · Replicas, HPA StatefulSet · Stateful apps (DBs) · Stable network IDs
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
Always set requests AND limits Use LimitRange for namespace defaults Use ResourceQuota for namespace caps
Spread pods across nodes for HA.
# 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 --> 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Core Objects → Workloads → Networking → Production Best Practices → Resource Management → Pod Anti-Affinity
要点 -> Service · Ingress · Network Policies · Deploy and manage production Kubernetes clusters.
文件/命令 -> Job/CronJob · CPU/memory · add/remove · cosmicstack-labs/mercury-agent-skills · github.com/cosmicstack-labs/mercury-agent-skills
内容 SHA-256 -> dee085d8483f
原文结构
适用与边界
原文中的明确线索
Job/CronJob、CPU/memory、add/remove、cosmicstack-labs/mercury-agent-skills、github.com/cosmicstack-labs/mercury-agent-skills