# Minikube Resource Allocation Standards
## Rule
All minikube clusters MUST have explicit resource allocation appropriate for the workload. Never use defaults for anything beyond basic testing.
## Format
```bash
minikube start \
--cpus=<2-8> \
--memory=<4096-16384> \
--disk-size=<20g-100g> \
--driver=<docker|hyperkit|hyperv>
```
## Requirements
1. **Minimum allocation** — 2 CPUs, 4GB RAM, 20GB disk for single-node
2. **Multi-node** — multiply minimums by node count
3. **Host headroom** — never allocate more than 75% of host resources
4. **Disk sizing** — allocate enough for images and persistent volumes
5. **Persistent config** — use `minikube config set` for team defaults
## Recommended Settings
| Workload | CPUs | Memory | Disk |
|----------|------|--------|------|
| Basic testing | 2 | 4GB | 20GB |
| Microservices dev | 4 | 8GB | 40GB |
| Data-heavy (DBs) | 4 | 12GB | 60GB |
| Multi-node (per node) | 2 | 4GB | 20GB |
| CI runner | 2 | 4GB | 30GB |
## Examples
### Good
```bash
# Set defaults for the team
minikube config set cpus 4
minikube config set memory 8192
minikube config set disk-size 40g
minikube config set driver docker
# Start with explicit allocation
minikube start --cpus=4 --memory=8192 --disk-size=40g
```
### Bad
```bash
# Defaults: 2 CPUs, 2GB RAM — too small for real workloads
minikube start
# Over-allocating on a 16GB laptop
minikube start --cpus=8 --memory=14336 # Leaves nothing for the host
```
## Enforcement
Document recommended minikube config in project README or Makefile. Use `minikube config set` commands in project setup scripts.