Skip to content

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 balance

Alias. 1ctl billing is equivalent to 1ctl credits. All subcommands work the same.


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.


1ctl credits balance

Shows the current credit balance for your organization.

Backend: GET /v1/cli/organizations/{orgID}/credits

Example output:

Organization: acme
Balance: $42.50
Status: healthy
Auto top-up: enabled (threshold: $10.00, amount: $50.00)

The Status field reflects where your balance sits relative to alert thresholds:

StatusMeaning
healthyBalance is above the low-balance alert threshold.
lowBalance is below the alert threshold. Notifications have been sent.
grace_periodBalance reached zero. Deployments will be scaled down in N days.

1ctl credits transactions [--limit <n>] [--offset <n>]

Lists the transaction history for your organization — top-ups, hourly deductions, refunds, and auto top-ups.

FlagDefaultDescription
--limit20Number of records to return.
--offset0Pagination offset.

Backend: GET /v1/cli/organizations/{orgID}/credits/transactions

Example output:

ID TYPE AMOUNT DESCRIPTION TIMESTAMP
txn_09ghj3k deduction -$0.12 Hourly usage: org-acme-prod 2026-04-27T09:00:00Z
txn_08ghj2j deduction -$0.11 Hourly usage: org-acme-prod 2026-04-27T08:00:00Z
txn_07fgi1i top-up +$50.00 Auto top-up via Stripe 2026-04-27T07:43:00Z
txn_06egh0h deduction -$0.13 Hourly usage: org-acme-prod 2026-04-27T07:00:00Z
txn_05dfg9g deduction -$0.11 Hourly usage: org-acme-prod 2026-04-27T06:00:00Z

Transaction types:

TypeDescription
deductionHourly usage charge. Calculated from actual CPU and memory metrics.
top-upManual or automatic credit addition.
refundCredit returned to your account (e.g. for downtime compensation).

1ctl credits usage [--days <n>]

Shows resource consumption history broken down by machine/deployment. Useful for identifying which workloads are driving your spend.

FlagDefaultDescription
--days30Number of days of history to return.

Example output:

MACHINE CPU HOURS MEMORY HOURS COST
api-server 168.0 168.0 GiB·h $8.23
worker 72.0 36.0 GiB·h $2.14
my-db 168.0 84.0 GiB·h $6.42
my-cache 168.0 42.0 GiB·h $3.11
Period: 2026-03-28 → 2026-04-27
Total: $19.90

Terminal window
# Check your current balance
1ctl credits balance
# See the last 10 transactions
1ctl credits transactions --limit 10
# Page through full transaction history
1ctl credits transactions --limit 20 --offset 20
# View the last 7 days of usage
1ctl credits usage --days 7
# View the past month (default)
1ctl credits usage

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.


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.