Create and delete Workloads
Learn how to work with Workloads in Humanitec.

Adding a Workload

You need to add a Workload to a Draft in order to deploy it.
Adding a Workload will create a new Workload Resource along with its Pods in the Kubernetes cluster when it is deployed. After creating a new Workload you can add a Container image to it, see Working with Containers for further reference.
UI
CLI
API
    1.
    Start in the App Details Screen.
    2.
    Ensure that the Draft is selected.
    3.
    Click the "Create new workload" drop-down button.
    4.
    Select the Workload Profile you want to use in the Workload (e.g. default-module).
    5.
    Choose a name for the workload. The name must be a valid Humanitec ID and cannot be changed later.
    6.
    Click the "Create" button to create the workload in your App.
Steps 1-3 of adding a Workload in the UI
Steps 4-6 of adding a Workload in the UI
Our CLI is currently in closed beta. Please contact us if you want to learn more.
Adding a Workload is the equivalent to adding a module to a Delta in the API. See Deployment Deltas in the API Documentation for more details.

Duplicate a Workload

Sometimes, multiple workloads in an App share very similar configuration. In this case it can be useful to duplicate a Workload.
Duplicating a Workload will create a copy of the configuration of that Workload. The Workloads will be independent from each other from that point forward.
UI
CLI
API
    1.
    Start in the App Details Screen.
    2.
    Ensure that the Draft is selected.
    3.
    Click the button on the Workload to duplicate.
    4.
    Select "Duplicate" from the menu that appears.
    5.
    Choose an ID for the duplicated Workload. The ID must be a valid Humanitec ID and cannot be changed later.
    6.
    Click the "Create" button to create the workload in the App.
    7.
    If you wish to cancel this action, click the "Cancel" button.
Steps 1 - 4 of duplicating a Workload in the UI
Steps 5-7 of duplicating a Workload in the UI
Our CLI is currently in closed beta. Please contact us if you want to learn more.
Duplicating a Workload is the equivalent to adding a module to a Delta in the API. See Deployment Deltas in the API Documentation for more details.

Remove a Workload

Sometimes, multiple workloads in an App share very similar configuration. In this case it can be useful to duplicate a Workload.
UI
CLI
API
    1.
    Start in the App Details Screen.
    2.
    Ensure that the Draft is selected.
    3.
    Click the button on the Workload to duplicate.
    4.
    Select "Remove" from the menu that appears.
    5.
    The workload card will now have a red border to indicate it will be removed on the next deployment.
    6.
    Click the "Restore" button if you want to revert the remove action in this Draft.
Steps 1-4 of removing a Workload in the UI
Steps 5 & 6 of removing a Workload in the UI
Our CLI is currently in closed beta. Please contact us if you want to learn more.
Removing a Workload is the equivalent to removing a module to a Delta in the API. See Deployment Deltas in the API Documentation for more details.
Last modified 3d ago