28 lines
828 B
Markdown
28 lines
828 B
Markdown
# StatefulSet
|
|
|
|
#kubernetes #workload #słownik
|
|
|
|
## Co to jest?
|
|
|
|
**StatefulSet** zarządza podami ze **stabilną tożsamością** - stały hostname, ordered deployment/scaling, i persistent storage per pod.
|
|
|
|
## Różnica vs Deployment
|
|
|
|
| | StatefulSet | [[Deployment]] |
|
|
|---|-------------|------------|
|
|
| Pod names | Ordered: `nats-0`, `nats-1` | Random: `nats-7d8f9-abc` |
|
|
| Scaling | Sekwencyjne (0, 1, 2...) | Równoległe |
|
|
| Storage | PVC per pod (stałe) | Shared lub brak |
|
|
| Network | Stable DNS per pod | Load-balanced Service |
|
|
|
|
## Użycie w Sympozium
|
|
|
|
**NATS JetStream** jest deployowany jako StatefulSet:
|
|
- Stały hostname (`nats-0.nats.sympozium-system.svc`)
|
|
- Persistent storage dla JetStream data
|
|
- Durable event bus z replay capability
|
|
|
|
---
|
|
|
|
Powiązane: [[NATS JetStream - Event Bus]] | [[Deployment]] | [[Pod]]
|