Skip to content

1ctl deploy

1ctl deploy builds and deploys a containerized application. It reads satusky.toml, packages the build context unless --image is provided, sends the build to the Satusky build service, and calls the backend deployment upsert route.

  1. Resolve project config and active organization namespace.
  2. Build in-cluster unless --image is set.
  3. Push the image to the registry.
  4. Call POST /v1/cli/deployments/upsert/{namespace}/{appLabel}.
  5. Reconcile Deployment, Service, optional ConfigMap/Secret, optional PVC, route, and autoscaling/disruption resources.
  6. Optionally wait for pod readiness with --wait.

Pod readiness and public URL readiness are separate. Recent 1ctl versions report degraded URL readiness when DNS or route attachment is not ready even if pods are healthy.

Terminal window
1ctl deploy
1ctl deploy --image registry.satusky.com/org/api:latest
1ctl deploy --wait

Subcommands:

Terminal window
1ctl deploy list
1ctl deploy get --deployment-id <id>
1ctl deploy status --deployment-id <id>
1ctl deploy open --deployment-id <id>
1ctl deploy scale --deployment-id <id> --replicas 3
1ctl deploy restart --deployment-id <id>
1ctl deploy releases --deployment-id <id>
1ctl deploy rollback --deployment-id <id> --version <n>
1ctl deploy destroy --deployment-id <id>
FlagDefaultCurrent behavior
--cpu0.5Kubernetes CPU request. There is no separate CPU limit flag today.
--memory256MiKubernetes memory request and memory limit.
--port8080Container port exposed through the Service.
--replicasunsetManual replica count. HPA-managed deployments should not be scaled manually.
--dockerfileDockerfileDockerfile path for cloud build.
--imageunsetPre-built image; skips cloud build.

Memory must include a unit such as Mi or Gi. --memory 512 is rejected.

FlagPurpose
--zone <zone>Target a deployment zone such as my-kul-1b.
--machine <name>Target one owned machine by name. Repeat for multiple machines.
--machine-tag <tag>Target owned online machines with label satusky.com/<tag>.

Default deploys use managed cloud capacity. Owned machines are used only when selected with --machine or --machine-tag.

Terminal window
1ctl deploy --env LOG_LEVEL=debug --env FEATURE_X=true
1ctl deploy --wait-for postgres:5432 --wait-for redis:6379

--env values become non-sensitive environment configuration. Use 1ctl secret for passwords, tokens, and private keys.

--wait-for injects TCP dependency checks so the main container starts only after the dependency accepts connections.

Terminal window
1ctl deploy --volume-size 20Gi --volume-mount /data

This creates a PVC and mounts it into the deployment. Use 1ctl volumes to inspect, detach, or destroy volumes after creation.

Terminal window
1ctl deploy --hpa --hpa-min-replicas 2 --hpa-max-replicas 10 --hpa-cpu-target 70
1ctl deploy --vpa --vpa-mode Off --vpa-min-cpu 100m --vpa-max-cpu 2
1ctl deploy --pdb --pdb-type fixed --pdb-min-available 2

HPA targets are percentages. VPA CPU and memory bounds use normal Kubernetes resource quantities.

Terminal window
1ctl deploy --strategy rolling --rolling-max-surge 1 --rolling-max-unavailable 0
1ctl deploy --strategy recreate

rolling is the default. recreate stops old pods before starting new pods and can cause downtime.

1ctl deploy accepts --multicluster, --multicluster-mode, and backup flags. Current infrastructure state does not provide live stateful failover: cluster-02 is below the storage design floor, CNPG is not installed there, and DR remains backup/restore oriented.