Overview
TheWorkload custom resource defines application workloads deployed on Datum Cloud infrastructure. Workloads represent containerized applications with their compute, networking, and storage requirements.
Workload resources are part of the Milo compute API group (
compute.miloapis.com/v1alpha1).Resource Definition
API Group
compute.miloapis.com/v1alpha1WorkloadMetadata
The name of the workload. Must be unique within the namespace.
The project namespace where this workload is deployed. Format:
project-<project-name>Optional labels to organize and select workloads.Common labels:
app.kubernetes.io/name: Application nameapp.kubernetes.io/version: Application versionapp.kubernetes.io/component: Component type (backend, frontend, etc.)environment: Environment (dev, staging, prod)
Optional annotations for additional metadata.Standard annotations:
kubernetes.io/description: Human-readable descriptionkubernetes.io/display-name: Display name for UIs
Spec Fields
The Workload spec defines the desired workload configuration:The desired number of replicas for this workload.
Label selector for identifying pods managed by this workload.
Pod template defining the workload containers.
Reference to the network this workload should use.
Provider-specific configuration for workload placement.
Status Fields
The Workload status reflects the current state:The current phase of the workload.Values:
Pending: Workload deployment is pendingProvisioning: Resources are being createdRunning: Workload is runningFailed: Workload deployment failedDeleting: Workload is being deleted
Total number of replicas.
Number of ready replicas.
Number of available replicas.
Detailed conditions about the workload state.Each condition includes:
type: Condition type (e.g., “Available”, “Progressing”)status: True, False, or Unknownreason: Machine-readable reason codemessage: Human-readable messagelastTransitionTime: When the condition last changed
Examples
Basic Web Application
Workload with Network Reference
Multi-Container Workload
kubectl Commands
Create a Workload
List Workloads
Get Workload Details
Scale a Workload
Update Workload Image
Delete a Workload
Watch Workload Status
Related Resources
- Network - Connect workloads to networks
- Gateway - Expose workloads externally
- Project - Workloads are scoped to projects
Troubleshooting
Workload stuck in Provisioning
Workload stuck in Provisioning
Check:
- View workload status:
kubectl describe workload <name> -n <namespace> - Check for error conditions in status.conditions
- Verify container images are accessible
- Check resource quotas:
kubectl get resourcequota -n <namespace>
Replicas not becoming ready
Replicas not becoming ready
Check:
- View pod status:
kubectl get pods -n <namespace> -l app=<selector> - Check pod logs:
kubectl logs -n <namespace> <pod-name> - Verify network connectivity
- Check resource limits and node capacity
Cannot scale workload
Cannot scale workload
Check:
- Verify you have update permissions on the workload
- Check if quota limits are exceeded
- Ensure the workload is in a valid state (not deleting)