Back to course overview
5
Module 5 of 7

CloudHub 2.0 & Deployment

Deploy Mule applications to CloudHub 2.0, configure scaling and resource allocation, stream logs, set up alerts, and understand the differences between Shared Space and Private Space.

2 lessons~3 hours
1

Deploying to CloudHub 2.0

CloudHub 2.0 is MuleSoft's next-generation managed runtime service built on Kubernetes.

Deployment is triggered from Anypoint Runtime Manager or via the Anypoint CLI / Maven plugin. The minimum information required is the application name, the JAR file, the environment, and the vCore allocation.

CloudHub 2.0 uses private spaces (dedicated Kubernetes namespaces) or shared spaces (multi-tenant). For production workloads handling sensitive data, always use a private space with a VPN or VPC peering connection to your on-premise systems.

Zero-downtime deployments are supported natively — new replicas are started before old ones are terminated, ensuring continuous availability during updates.

anypoint-cli deployment commandyaml
# Deploy using Anypoint CLI
anypoint-cli-v4 runtime-mgr application deploy \
  --environment Production \
  --applicationName orders-api \
  --runtime 4.6.0 \
  --workers 2 \
  --workerSize 0.1 \
  --region us-east-1 \
  target/orders-api-1.0.0-mule-application.jar
2

Scaling, Logs & Alerts

CloudHub 2.0 provides horizontal scaling, Anypoint Monitoring dashboards, and configurable alerting.

Scale horizontally by increasing replica count, or vertically by choosing a larger vCore size (0.1, 0.2, 0.5, 1, 2, 4, 8, 16 vCores). Horizontal scaling (more replicas) is preferred for throughput; vertical for memory-intensive transformations.

Anypoint Monitoring provides built-in dashboards for CPU, memory, message throughput, and error rates. You can also create custom dashboards using metrics emitted by your application.

Configure alerts for conditions like error rate > 5%, message processing time > 2s, or application status change (stopped/started). Alerts can notify via email, PagerDuty, or custom webhooks.

CloudHub 2.0 deployment descriptor (cloudhub2.json)json
{
  "name": "orders-api-prod",
  "runtime": { "version": "4.6.0" },
  "target": {
    "provider": "MC",
    "targetName": "Cloudhub-US-East-1",
    "deploymentSettings": {
      "clustered":           false,
      "enforceDeployingReplicasAcrossNodes": true,
      "updateStrategy":      "rolling",
      "disableAmLogForwarding": false,
      "generateDefaultPublicUrl": true
    },
    "replicas": 2
  },
  "application": {
    "ref": { "version": "1.0.0" },
    "vCores": 0.1,
    "properties": {
      "http.port": "8081",
      "db.url":    "${env.DB_URL}"
    }
  }
}