Note: Get all resources
# Source - https://stackoverflow.com/a
# Posted by rcorre, modified by community. See post 'Timeline' for change history
# Retrieved 2025-11-21, License - CC BY-SA 4.0
kubectl api-resources --verbs=list --namespaced -o name \
| xargs -n 1 kubectl get --show-kind --ignore-not-found -l <label>=<value> -n <namespace>Items installed Metric Server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml- ✅ MetalLB
- ✅ Traefik
- ✅ Pi-Hole for DNS (relies on Traefik)
- 🚧 Step CA (Holds Intermediate CA private key)
- 🚧 Cert Manager(?)
- 🚧 Metric Server
- Core DNS
- Calico (CNI)
Below is a clear, click-by-click TrueNAS SCALE guide for creating a Zvol and exposing it via iSCSI for Kubernetes (PostgreSQL / Paperless use case).
Assumes TrueNAS SCALE (not CORE) and a single-node or small K8s cluster
- Log into TrueNAS Web UI
- Go to Storage → Datasets
- Expand your pool (example:
TrueNAS)
- Click Add Zvol
- Fill in:
| Field | Value |
|---|---|
| Zvol Name | postgres-paperless |
| Size | 10 GiB (or more) |
| Block Size | 16K ✅ |
| Sparse | Optional (ON saves space) |
| Compression | LZ4 (default) |
| Sync | STANDARD |
| Read-only | OFF |
- Click Save
📍 Resulting path:
/dev/zvol/TrueNAS/postgres-paperless
- Go to System Settings → Services
- Toggle iSCSI → ON
- Set Start Automatically
You must create 5 objects:
- Portal
- Initiator Group
- Target
- Extent
- Association
- Go to Sharing → iSCSI → Portals
- Click Add
| Field | Value |
|---|---|
| Description | k8s-portal |
| IP Address | 0.0.0.0 |
| Port | 3260 |
- Save
✅ Allows all interfaces to serve iSCSI
- Go to Initiators
- Click Add
| Field | Value |
|---|---|
| Description | k8s-nodes |
| Initiators | ALL |
| Authorized Networks | 192.168.4.0/24 (your LAN) |
- Save
🔐 Locks access to your network
- Go to Targets
- Click Add
| Field | Value |
|---|---|
| Target Name | postgres-paperless |
| Portal Group | k8s-portal |
| Initiator Group | k8s-nodes |
| Authentication Method | NONE |
| Authentication Group | NONE |
- Save
📌 Target IQN will look like:
iqn.2005-10.org.freenas.ctl:postgres-paperless
- Go to Extents
- Click Add
| Field | Value |
|---|---|
| Name | postgres-paperless-extent |
| Extent Type | Device |
| Device | /dev/zvol/TrueNAS/postgres-paperless |
| Logical Block Size | 512 |
| Disable Physical Block Size Reporting | OFF |
- Save
- Go to Associated Targets
- Click Add
| Field | Value |
|---|---|
| Target | postgres-paperless |
| Extent | postgres-paperless-extent |
| LUN ID | 0 |
- Save
On a Kubernetes node:
sudo iscsiadm -m discovery -t sendtargets -p 192.168.4.50Expected output:
192.168.4.50:3260,1 iqn.2005-10.org.freenas.ctl:postgres-paperless
kubectl get pv
kubectl get pvc -n paperlessPVC should be Bound
| Setting | Recommendation |
|---|---|
| Databases | iSCSI (Zvol) |
| Media / Files | NFS |
| Snapshots | Enabled on Zvol |
| Reclaim Policy | Retain |
| Multi-node DB | ❌ Not with iSCSI |