Using cluster names in the `kudu` command line tool

When using the kudu command line tool, it can be difficult to remember the precise list of Kudu master RPC addresses needed to communicate with a cluster, especially when managing multiple clusters. As an alternative, you can use the command line tool to identify clusters by name.

  1. Create a new directory to store the Kudu configuration file.
  2. Export the path to this newly created directory in the KUDU_CONFIG environment variable.
  3. Create a file called kudurc in the new directory.
  4. Populate kudurc as follows, substituting your own cluster names and RPC addresses:
    clusters_info:
      cluster_name1:
        master_addresses: ip1:port1,ip2:port2,ip3:port3
      cluster_name2:
        master_addresses: ip4:port4
  5. When using the kudu command line tool, replace the list of Kudu master RPC addresses with the cluster name, prepended with the character @. For example:
    $ sudo -u kudu kudu ksck @cluster_name1