Skip to content

kraft cloud instance create

Create an instance on KraftCloud from an image.

kraft cloud instance create [FLAGS] IMAGE [-- ARGS]


# Create a new NGINX instance in Frankfurt and start it immediately. Map the external
# port 443 to the internal port 8080 which the application listens on.
$ kraft cloud --metro fra0 instance create \
--start \
--port 443:8080 \
# This command is the same as above, however using the more elaborate port expression.
# This is because in fact we need need to accept TLS and HTTP connections and redirect
# port 8080 to port 443. The above example exists only as a shortcut for what is written
# below:
$ kraft cloud --metro fra0 instance create \
--start \
--port 443:8080/http+tls \
--port 80:443/http+redirect \
# Attach two existing volumes to the vm, one read-write at /data
# and another read-only at /config:
$ kraft cloud --metro fra0 instance create \
--start \
--volume my-data-vol:/data \
--volume my-config-vol:/config:ro \


-d, --domain strings The domain names to use for the service
-e, --env strings Environmental variables
-f, --feature strings List of features to enable
-h, --help help for create
-M, --memory uint Specify the amount of memory to allocate (MiB)
-n, --name string Specify the name of the instance
-o, --output string Set output format. Options: table,yaml,json,list (default "table")
-p, --port strings Specify the port mapping between external to internal
-R, --replicas uint Number of replicas of the instance
--restart string Set the restart policy for the instance (never/always/on-failure) (default "never")
--rollout string Set the rollout strategy for an instance which has been previously run in the provided service group (default "prompt")
--rollout-qualifier string Set the rollout qualifier used to determine which instances should be affected by the strategy in the supplied service group (default "image")
--rollout-wait duration Time to wait before performing rolling out action (default 10s)
-0, --scale-to-zero Scale the instance to zero after deployment
-g, --service-group string Attach this instance to an existing service group
-S, --start Immediately start the instance after creation
-s, --subdomain strings Set the subdomains to use when creating the service
-v, --volumes strings List of volumes to attach instance to
-w, --wait-for-image Wait for the image to be available before creating the instance
--wait-for-image-timeout duration Time to wait before timing out when waiting for image (default 1m0s)

Options inherited from parent commands

--metro string Set the KraftCloud metro
--token string Set the KraftCloud token


The kraft cloud instance create command can also be run as:


See Also