Managing clusters from CLI

You can manage Cloudera Data Hub clusters from the CLI using the cdp datahub commands.

Required role: The DataHubAdmin or Owner roles at the scope of Cloudera Data Hub allow you to manage the Cloudera Data Hub cluster. Note that EnvironmentAdmin and Owner of the environment can also manage Cloudera Data Hub clusters.

Managing clusters

You can view and monitor your available Cloudera Data Hub clusters via the CDP CLI using the following commands:

  • When stack provisioning or cluster creation fails, retry the cluster to resume the process from the last failed step: cdp datahub retry-cluster --cluster-name <value>
  • Resize cluster: cdp datahub scale-cluster --cluster-name <value> --instance-group-name <value> --instance-group-desired-count <value>
  • Restart a cluster that is in stopped state: cdp datahub start-cluster --cluster-name <value>
  • Stop cluster that is in running state: cdp datahub stop-cluster --cluster-name <value>
  • Sync your cluster with cloud provider and Cloudera Manager: cdp datahub sync-cluster --cluster-name <value>
  • Repair a cluster when cluster has failed nodes: cdp datahub repair-cluster --cluster-name <value> --instance-group-names <value> --instances <value>

Deleting clusters

  • Delete one or more existing clusters: cdp datahub delete-clusters --cluster-name <value>