Skip to content
Back to skills

Minimal

ASecurity

Size, cap, and scale workloads so pods get the CPU and memory they need without starving the node.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 10, 2026
devopsbashnodekubernetesapi

Works with

  • api

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add snoodleboot-io/prompticorn --skill minimal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Minimal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Minimal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/snoodleboot-io-minimal-9ecb28dc/badge)](https://www.skillsdirectory.com/skills/snoodleboot-io-minimal-9ecb28dc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Kubernetes Resource Management (Minimal)

## Purpose
Size, cap, and scale workloads so pods get the CPU and memory they need without starving the node.

## Core Techniques

### 1. Set Requests and Limits
```yaml
resources:
  requests:          # what the scheduler reserves — drives placement
    cpu: 100m        # 0.1 core
    memory: 128Mi
  limits:            # the ceiling the kernel enforces
    cpu: 500m
    memory: 512Mi
```
`requests` decides which node the pod lands on. `limits` decides what happens when it misbehaves. Omit requests and the scheduler assumes zero, happily overpacking the node.

### 2. Know How CPU and Memory Limits Differ
| | Over the limit |
|---|---|
| CPU | **Throttled** — capped, stays alive, gets slow |
| Memory | **OOMKilled** — container killed immediately |

That asymmetry drives the tuning: an over-tight CPU limit produces mysterious latency, an over-tight memory limit produces restart loops.

### 3. Understand the QoS Class You Get
```
Guaranteed  requests == limits for every resource   evicted last
Burstable   requests < limits                       evicted in the middle
BestEffort  nothing set                             evicted first
```
Set `requests == limits` for latency-sensitive or stateful workloads to earn `Guaranteed`.

### 4. Autoscale on the Right Signal
```yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
spec:
  scaleTargetRef: {apiVersion: apps/v1, kind: Deployment, name: api}
  minReplicas: 2
  maxReplicas: 20
  metrics:
    - type: Resource
      resource:
        name: cpu
        target: {type: Utilization, averageUtilization: 70}
```
HPA utilization is a percentage **of requests**, not of the node. If requests are wrong, the HPA is wrong.

### 5. Fence Off Namespaces
```yaml
apiVersion: v1
kind: ResourceQuota
spec:
  hard:
    requests.cpu: "20"
    requests.memory: 40Gi
    limits.cpu: "40"
    pods: "50"
```
Add a `LimitRange` alongside it to supply defaults, so a pod that forgets its resources block doesn't land as `BestEffort`.

### 6. Size From Observed Usage
```bash
kubectl top pods --containers          # live usage
# p95 over a week beats a guess:
# quantile_over_time(0.95,
#   container_memory_working_set_bytes{pod=~"api-.*"}[7d])
```
Set requests near observed p95, limits with real headroom above it.

## Warning Signs

- `OOMKilled` in `kubectl describe pod` → memory limit too low
- High `container_cpu_cfs_throttled_seconds_total` → CPU limit too low
- Pods `Pending` with "Insufficient cpu" → requests exceed cluster capacity
- Node usage at 30% while pods won't schedule → requests inflated
- No `LimitRange` → unspecified pods evicted first under pressure

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…