Creating a Custom Resource for Drill Applications

After setting up a CSpace, you can run Drillbits in the CSpace, one per pod. To do this, you must modify a sample Custom Resource (CR) or create a new CR for your Drill application.

Accessing the Sample Drill Custom Resource

The following sample Drill CRs (for two different Drill clusters) are available in the examples/drill directory:
  • drill-cr-full.yaml – contains all properties that can be specified in a CR.
  • drill-cr-min.yaml – contains only the minimal set of properties that must be specified in a Drill CR and uses default values for properties not defined in the CR.

Creating the Custom Resource for the Drill Application

When you create a new CR or modify a sample CR, specify values for the following properties in the custom resource file:
Property Type Description
name string (Required) Specified in the metadata section of the CR. This is the name of the DrillCluster. The value for the name must be unique for each DrillCluster within a given Kubernetes cluster. The name must also be unique within the MapR storage cluster to which the DrillCluster is connected. The name field corresponds to Drill's ZK Root (drill.exec.zk.root). The value for the Drill clusterid (drill.exec.clusterid) is cluster1 and cannot be changed.
cspace string (Required) The CSpace namespace in which to deploy the Drill application. The value is the CSpace name. For example, to deploy the Drill cluster in the CSpace named MapRCSpace, use MapRCSpace as the value for this property.
imageregistry string (Required) The location of the image registry. The default value is
image string (Required) The name of the image. The default value is drill-<DRILL_VERSION>:<TIMESTAMP>.
count integer The number of instances of the pod (or Drillbits).
maxcount integer The maximum number of instances of the pod (or Drillbits). The default value is the same as count. However, set this to a higher value than count if you want to enable autoscaling. If set to a higher value, MapR automatically scales the number of Drillbits based on a range between count, which is the minimum, and maxcount, which is the maximum.
disablesecurity boolean Whether the Drill cluster is secure or unsecure. The value can be one of the following:
  • true – to deploy an unsecure Drill cluster
  • false – to deploy a secure Drill cluster
Secure Drill can work with a secure MapR storage cluster, and unsecure Drill can work with both secure and unsecure MapR storage clusters.
memory string The amount of memory in gigabytes (power-of-two equivalents). The minimum value is 4Gi. The recommended value is 16Gi. For more information, see Meaning of memory.
cpu string The amount of CPU. The minimum value is 4000m. The recommended value is 16000m. For more information, see CPU units.
cputhreshold integer The percentage of CPU resource that triggters auto-scaling. The default value is 50%. When Drill queries reach the CPU limit set here, say 50% of the CPU allocated for Drillbits, Drill automatically scales up the number of Drillbits to distribute the workload.
httpport integer The Drill HTTP port. Default value is 8047. If the port is not specified, the default value is used.
userport integer The Drill user port. The default value is 21010. If this port is not specified, the default value is used.
  • Both the Drill control port and data port are automatically set. The user port is incremented by 1 for control port and by 2 for data port.
  • In a Kubernetes environment, some of the default Drill ports are not allowed. For details, see Type NodePort. The following Drill default ports are different in Kubernetes:
    • Port 31010 changes to 21010
    • Port 31011 changes to 21011
    • Port 31012 changes to 21012
    Other default Drill ports are unchanged.
podtimeout integer The period of time (in seconds) to wait before forcefully shutting down the pod during a manual or automatic scale down of the Drill cluster. The default value is 60 seconds. A lower value might cause pods to shut down before running queries have completed.
loglevel string The log level for the Drill operator. The value can be one of the following:
  • INFO

The default value is INFO.

Note: This setting overrides any higher-level setting.