Skip to main content
Manage workloads within a global virtual cloud For a detailed overview, please visit the workload’s reference page.

workload access-report

Show the access report for the referenced workload Usage
Common Options Reference
  • Display the user / service account / group permissions for the ‘demo-workload’ workload withing the ‘demo-cpln-gvc’ global virtual cloud within the ‘demo-cpln-organization’ organization

workload audit

Retrieve audit trail events for the referenced workload Usage
Common Options Reference

workload clone

Create a clone of the referenced workload; this will only duplicate its spec. Usage
Common Options Reference

workload connect

Connect to a replica of the workload If multiple replicas are running, use the —replica flag to specify the replica. Use the subcommand get-replicas to view the current list of replicas. Refer to the cpln workload connect guide for additional details. Usage
Common Options Reference

workload create

Create a new workload Usage
When creating a new workload and the image was pushed to your org’s private repository, use the image name shortcut //image/IMAGE_NAME.For Example: cpln workload create --name WORKLOAD_NAME --image //image/IMAGE_NAME
Common Options Reference
  • name
    • Type: string
    • Minimum Length: 3
    • Maximum Length: 64
    • Only lowercase characters
    • Must begin with a character
    • Allowed special characters: -
  • image
    • Type: string
  • port
    • Type: number
    • Default: 8080
    • Minimum Value: 80
    • Maximum Value: 65535
  • cpu
    • Type: string
    • Default: 150m
  • memory
    • Type: string
    • Default: 128Mi
NOTE: The ratio between CPU to Memory can be at most 1/8.

workload cron

Manage cron workloads

workload cron get

Get a list of job executions for the referenced workload Usage
Common Options Reference

workload cron run

Run a command using a persistent cron workload runner. Refer to the cpln workload cron run guide for additional details.
The runner workload is created on first use and reused for subsequent runs, avoiding the overhead of creating and deleting a workload each time.--interactive and --background are mutually exclusive.
Usage
Common Options Reference

workload cron start

Start a cron job Usage
Common Options Reference
  • Basic Usage
  • Override Container Through Arguments
  • Override Multiple Containers Through a File
Example File
YAML
Usage

workload cron stop

Stop a cron job Usage
Common Options Reference

workload delete

Delete one or more referenced workloads Usage
Deleting a workload will remove all associated resources (containers, etc.)
Common Options Reference
  • Delete a workload
  • Delete multiple workloads

workload edit

Edit the referenced workload, as YAML, within an editor Usage
The default editor can be set by using the EDITOR environment variable.
Common Options Reference

workload eventlog

Show the event log of the referenced workload Usage
Common Options Reference

workload exec

Exec a command on a replica of the workload. Refer to the cpln workload exec guide for additional details. Usage
Common Options Reference
  • Execute a command

workload force-redeployment

Force redeployment of the referenced workload(s). Usage
Common Options Reference

workload get

Retrieve one or more referenced workloads Usage
An empty reference will return all references
Common Options Reference
  • Get all workloads
  • Get one workload
  • Get multiple workloads

workload get-deployments

Retrieve the current deployments of the referenced workload Usage
Common Options Reference

workload get-replicas

Get the replicas of the referenced workload in a given location Usage
Common Options Reference

workload open

Open the referenced workload’s endpoint in your browser Usage
Common Options Reference
  • Open the endpoint of the referenced workload

workload patch

Update the referenced workload’s metadata using an input file Usage
Running this command with the option --file - sets the input to stdin. The input is required to be a valid JSON or YAML string (e.g., {"description": "My new description"} or description: My new description). To complete the update, press Control-D (or Control-Z if you are using Windows).
Common Options Reference
To update the workload options (i.e., Capacity AI, Scaling Strategy) using the CLI, use the example below to pipe the updated JSON or YAML text to the patch command:

workload permissions

Show the grantable permissions for a workload object type Usage
Common Options Reference

workload query

Find all the workloads based on the given query Usage
Common Options Reference
Use the --match option to display all, none, or any of the results based on a given property or tag
  • Search for a workload based on the name property
  • Search for a workload based on the description property
  • Search for a workload based on a tag
  • Search for a workload based on a property and tag

workload replica

Manage workload replicas

workload replica get

Get the replica of the referenced workload in a given location Usage
Common Options Reference

workload replica stop

Stop the replica of the referenced workload in a given location Usage
Common Options Reference

workload run

Run a command with a workload instance. Refer to the cpln workload run guide for additional details.
Recommendation: Consider using cpln workload cron run instead — it’s significantly faster and the preferred way to run commands going forward. It uses a persistent cron workload runner that is reused across executions, eliminating the overhead of creating and tearing down a workload each time.
Most basic usage is cpln workload run -- ls -al.This will create a new workload to execute the command, it uses an ubuntu base image.Other examples are:If you have a workload you want to reuse: cpln workload run --clone WORKLOAD_NAME -- ls -al-- <command>: Must always be at the end.Optional flags:--rm: To clean up afterwards.-i: To connect to the session.--cpu and --mem: To override the default resources.--location: To override the location. (By default the first location fetched from your gvc).
Usage
Common Options Reference

workload start

Start the workload(s) Usage
Common Options Reference

workload stop

Stop the workload(s) Usage
Common Options Reference

workload tag

Manage the tags belonging to one or more referenced workloads Usage
Built-in tags, which begin with cpln/*, can’t be modified.
Common Options Reference
  • Add a tag to a workload
  • Update same tag (after running the example above)
  • Remove tag (after running the example above)
  • Add same tag to multiple workloads
  • Update same tag on multiple workloads (after running the example above)
  • Remove same tag from multiple workload (after running the example above)

workload update

Update properties of the referenced workload Usage
Common Options Reference
  • The --set option allows the modification of the following workload properties:
    • `description1
      • Description of the workload
      • Type: string
    • tags
      • Tags (key=value) associated with the workload
      • Type: string
    • spec.identityLink
      • The identity of the workload
      • Type: string
    • spec.containers\.<name\>.image
      • The name of the container image to be pulled
      • Type: string
    • spec.containers\.<name\>.port
      • The port to serve traffic over
      • Type: number
    • spec.containers\.<name\>.cpu
      • The amount of cpu units available to the workload
      • Default: 150m
      • Type: string
    • spec.containers\.<name\>.memory
      • The amount of memory available to the workload
      • Default: 128Mi
      • Type: string
    • spec.containers\.<name\>.env\.<name\>.value
      • The environment variables to be available to the workload
      • Type: string
    • spec.firewallConfig.external.outboundAllowHostname
      • The list of hostnames that the workload is allowed to call
      • Type: string[]
    • spec.firewallConfig.external.outboundAllowCIDR
      • The list of CIDR values that the workload is allowed to call
      • Type: string[]
    • spec.firewallConfig.external.inboundAllowCIDR
      • The list of CIDR values that are allowed to call the workload
      • Type: string[]
      • Tip: Use the value ["0.0.0.0/0"] to allow all inbound requests
    • spec.firewallConfig.internal.inboundAllowType
      • The allowed inbound types to a workload
      • Type: string
      • Allowed values: ‘none’ | ‘same-gvc’ | ‘same-org’ | ‘workload-list’
    • spec.firewallConfig.internal.inboundAllowWorkload
      • If the inbound allow type is ‘workload-list’, this property will be active and contain the names of other workloads that can communicate with this workload
      • Type: string[]
      • Allowed values: Other workload names within the same global virtual cloud
NOTE: The ratio between CPU to Memory can be at most 1/8.
  • For the examples below, the initial workload is configured as:
  • Update an workload’s description
  • Update an workload’s tags
  • Update a workload’s Image
NOTE: Use the convention //image/IMAGE:TAG to reference an image residing within the current org’s private repository.