1ctl credits
1ctl credits is your window into Satusky’s pre-paid billing system. You top up your account in advance, and credits are deducted hourly based on actual CPU and memory consumption across all your running deployments. When your balance runs low you receive alerts. If it reaches zero, a 7-day grace period begins before any workloads are scaled down.
running pods → hourly metrics → credit_usage_job.go → deducts from credits table → 1ctl credits balanceAlias. 1ctl billing is equivalent to 1ctl credits. All subcommands work the same.
Mental model
Section titled “Mental model”Satusky measures what your pods actually used, not what you reserved. Every hour, credit_usage_job.go queries the Kubernetes metrics API for real CPU and memory consumption across your namespace, calculates the cost using the pricing configuration for your cluster, deducts the result from your credits balance, and writes a record to credit_transactions.
Pricing is configurable per cluster in the pricing_configs table. Use 1ctl pricing to see the rates that apply to your cluster.
Grace period. If your balance hits zero, deployments are not immediately terminated. A 7-day grace period starts. During this window your workloads keep running. If the balance is not restored before the grace period ends, grace_period_job.go scales all deployments down to zero replicas.
Auto top-up. If you have a Stripe payment method on file and your balance drops below a configured threshold, auto_topup_job.go (runs every 5 minutes) will automatically charge your card and credit the amount to your account.
Alerts. balance_alert_job.go runs every 15 minutes. When your balance crosses a low-balance threshold, it sends in-app and email notifications so you can top up before reaching zero.
Commands
Section titled “Commands”1ctl credits balance
Section titled “1ctl credits balance”1ctl credits balanceShows the current credit balance for your organization.
Backend: GET /v1/cli/organizations/{orgID}/credits
Example output:
Organization: acmeBalance: $42.50Status: healthy
Auto top-up: enabled (threshold: $10.00, amount: $50.00)The Status field reflects where your balance sits relative to alert thresholds:
| Status | Meaning |
|---|---|
healthy | Balance is above the low-balance alert threshold. |
low | Balance is below the alert threshold. Notifications have been sent. |
grace_period | Balance reached zero. Deployments will be scaled down in N days. |
1ctl credits transactions
Section titled “1ctl credits transactions”1ctl credits transactions [--limit <n>] [--offset <n>]Lists the transaction history for your organization — top-ups, hourly deductions, refunds, and auto top-ups.
| Flag | Default | Description |
|---|---|---|
--limit | 20 | Number of records to return. |
--offset | 0 | Pagination offset. |
Backend: GET /v1/cli/organizations/{orgID}/credits/transactions
Example output:
ID TYPE AMOUNT DESCRIPTION TIMESTAMPtxn_09ghj3k deduction -$0.12 Hourly usage: org-acme-prod 2026-04-27T09:00:00Ztxn_08ghj2j deduction -$0.11 Hourly usage: org-acme-prod 2026-04-27T08:00:00Ztxn_07fgi1i top-up +$50.00 Auto top-up via Stripe 2026-04-27T07:43:00Ztxn_06egh0h deduction -$0.13 Hourly usage: org-acme-prod 2026-04-27T07:00:00Ztxn_05dfg9g deduction -$0.11 Hourly usage: org-acme-prod 2026-04-27T06:00:00ZTransaction types:
| Type | Description |
|---|---|
deduction | Hourly usage charge. Calculated from actual CPU and memory metrics. |
top-up | Manual or automatic credit addition. |
refund | Credit returned to your account (e.g. for downtime compensation). |
1ctl credits usage
Section titled “1ctl credits usage”1ctl credits usage [--days <n>]Shows resource consumption history broken down by machine/deployment. Useful for identifying which workloads are driving your spend.
| Flag | Default | Description |
|---|---|---|
--days | 30 | Number of days of history to return. |
Example output:
MACHINE CPU HOURS MEMORY HOURS COSTapi-server 168.0 168.0 GiB·h $8.23worker 72.0 36.0 GiB·h $2.14my-db 168.0 84.0 GiB·h $6.42my-cache 168.0 42.0 GiB·h $3.11
Period: 2026-03-28 → 2026-04-27Total: $19.90Examples
Section titled “Examples”# Check your current balance1ctl credits balance
# See the last 10 transactions1ctl credits transactions --limit 10
# Page through full transaction history1ctl credits transactions --limit 20 --offset 20
# View the last 7 days of usage1ctl credits usage --days 7
# View the past month (default)1ctl credits usageTopping up
Section titled “Topping up”Credits are purchased through the Satusky dashboard. CLI commands are read-only — you cannot initiate a top-up from 1ctl. To add credits, visit the billing section at app.satusky.com or configure auto top-up to handle it automatically.
What happens under the hood
Section titled “What happens under the hood”Hourly deduction. credit_usage_job.go runs once per hour. It queries the Kubernetes metrics API for actual CPU and memory usage across your namespace, converts the raw metrics into cost using the rates in pricing_configs, deducts the total from your row in the credits table, and writes a deduction record to credit_transactions.
Grace period enforcement. grace_period_job.go runs periodically. If it finds a credits balance at zero, it starts the grace period clock if one has not already started. When the grace period expires, it scales all deployments in the affected namespace to zero replicas. The deployments are not deleted — restoring your balance and running 1ctl deploy restart will bring them back up.
Auto top-up. auto_topup_job.go runs every 5 minutes. If your organization has a Stripe payment method stored and your balance is at or below the configured threshold, the job charges your card for the configured amount and writes a top-up transaction. The threshold and amount are configured in the dashboard.
Alerts. balance_alert_job.go runs every 15 minutes. When your balance crosses the low-balance threshold, it fires both an in-app notification and an email to the organization owner. It does not re-alert on every run — it throttles notifications to avoid flooding you.
Monthly invoices. At the end of each calendar month, monthly_invoice_job.go generates a PDF invoice summarizing all transactions for the period. Invoices are available in the billing section of the dashboard.