Skip to main content

Cargo

In Nanocl 0.18, a Cargo is a durable workload containing named application Containers, optional ordered InitContainers, and an integer Replicas count. Cargo-owned network and port settings describe each replica's shared network boundary; Docker configuration and container-only secrets remain on each named container.

The OpenAPI schema below is the source reference for CargoSpec. For runtime topology and examples, see Multi-container Cargoes.

required
Array of objects (ContainerSpec)

Application containers in each Cargo replica.

Dns
Array of strings or null

DNS servers assigned to the Cargo network owner.

Hostname
string or null

Docker hostname assigned to the Cargo network owner.

Array of objects (ContainerSpec)

Init containers executed in declaration order before application containers.

object

Metadata of the cargo (user defined)

Name
required
string

Name of the cargo

null or CargoNetworkMode (string)
null or CargoPlacementSpec (object)
null or HashMap (object)
Replicas
integer >= 1
Default: 1

Number of durable Cargo replicas.

null or CargoResourceRequirementSpec (object)
Secrets
Array of strings

Secrets inherited by every regular and init container.