Use the CQL console to interact with the databases in your datacenter

Mission Control lets you use the CQL console in the UI to interact with the databases in your datacenter using the Cassandra Query Language (CQL). The CQL console is a web-based interface that provides a way to execute CQL commands and view the results.

You can use the CQL console to execute any supported CQL commands against your database, for example to create keyspaces or insert data. For a list of available commands, see the following documentation:

Connect to the CQL console

  1. In the Mission Control UI navigation menu, select your project, and then select your database cluster.

  2. Click CQL Console.

  3. Select your datacenter from the list of available datacenters.

  4. Enter your username and password.

cqlsh-pod container

When you deploy a Mission Control cluster, Mission Control automatically creates a cqlsh-pod. This pod supports the CQL console in the Mission Control UI.

The cqlsh-pod is a container that runs the cqlsh utility, allowing you to interact with your database cluster using CQL commands. The pod serves as the backend for the CQL console in the UI.

If needed, you can connect to the pod manually using kubectl exec. The pod includes the following labels:

  • app.kubernetes.io/name=cqlsh

  • app.kubernetes.io/part-of=missioncontrol

  • cassandra.datastax.com/datacenter=DATACENTER_NAME

  • missioncontrol.datastax.com/cluster-name=CLUSTER_NAME

  • missioncontrol.datastax.com/cluster-namespace=PROJECT_SLUG

  • pod-template-hash=POD_HASH

The Mission Control airgap bundle includes this image. For non-airgap installations, Mission Control pulls this container through an authenticated proxy. For a list of available container images and versions, see the Mission Control release notes. DataStax doesn’t publish the cqlsh-pod image on Docker Hub because the underlying code is proprietary.

Customize the CQLSH pod

You can fully customize the CQLSH pod using the podTemplateSpec field in the MissionControlCluster custom resource. The Mission Control operator automatically merges your podTemplateSpec configuration with its generated values.

To customize the CQLSH pod independently from other pods in your cluster, you can override the CQLSH pod configuration at the cluster level through the spec.cqlsh.podTemplateSpec field in the MissionControlCluster custom resource.

This means you can customize various aspects of the CQLSH pod, including:

  • Container image: Point to different image coordinates separately from other pods.

  • Resource management: Set resources.requests and resources.limits to control CPU and memory allocation.

  • Security hardening: Configure securityContext at both pod and container levels for enhanced security.

  • Scheduling control: Use nodeSelector, affinity, and tolerations to control where the CQLSH pod is scheduled.

  • Environment configuration: Add custom environment variables through the env field.

  • Volume configuration: Mount additional volumes or configuration files as needed.

When customizing the CQLSH pod, ensure that:

  • The custom image contains the necessary CQLSH binaries and dependencies.

  • Resource limits are appropriate for your workload requirements.

  • Security contexts follow your organization’s security policies.

  • Custom configurations don’t interfere with the CQLSH functionality.

The operator merges the podTemplateSpec configuration with the operator-generated values, so you only need to specify the fields you want to customize. The operator will handle the rest of the pod configuration automatically. All CQLSH pods that Mission Control creates for this cluster use the cluster-level configuration.

Custom CQLSH pod configuration template

The following template customizes the CQLSH pod at the cluster level in your MissionControlCluster specification. Replace the placeholders with your own values:

apiVersion: missioncontrol.datastax.com/v1beta2
kind: MissionControlCluster
metadata:
  name: CLUSTER_NAME
spec:
  cqlsh:
    podTemplateSpec:
      spec:
        containers:
        - name: cqlsh
          image: CUSTOM_IMAGE_REGISTRY/CUSTOM_CQLSH_IMAGE:TAG
          resources:
            requests:
              memory: "MEMORY_REQUEST"
              cpu: "CPU_REQUEST"
            limits:
              memory: "MEMORY_LIMIT"
              cpu: "CPU_LIMIT"
          env:
          - name: CUSTOM_ENV_VAR_NAME
            value: "CUSTOM_ENV_VAR_VALUE"
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
              - ALL
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: USER_ID
        securityContext:
          fsGroup: GROUP_ID
          runAsGroup: GROUP_ID
          runAsNonRoot: true
          runAsUser: USER_ID
        nodeSelector:
          NODE_LABEL_KEY: "NODE_LABEL_VALUE"
        tolerations:
        - key: "TAINT_KEY"
          operator: "Equal"
          value: "TAINT_VALUE"
          effect: "TAINT_EFFECT"
  k8ssandra:
    cassandra:
      # ... rest of your cluster configuration
CQLSH pod configuration fields and values
Field Description Value/Placeholder

apiVersion

API version for the MissionControlCluster custom resource

missioncontrol.datastax.com/v1beta2

kind

Resource type

MissionControlCluster

metadata.name

The name of your MissionControlCluster custom resource

CLUSTER_NAME: The cluster name for your MissionControlCluster custom resource

spec.cqlsh.podTemplateSpec.spec.containers[0].name

Container name

cqlsh

spec.cqlsh.podTemplateSpec.spec.containers[0].image

Specify a custom CQLSH image from your private registry

CUSTOM_IMAGE_REGISTRY/CUSTOM_CQLSH_IMAGE:TAG: Your private container registry URL, custom CQLSH image name, and image tag

spec.cqlsh.podTemplateSpec.spec.containers[0].resources.requests.memory

Memory request for the container

MEMORY_REQUEST

spec.cqlsh.podTemplateSpec.spec.containers[0].resources.requests.cpu

CPU request for the container

CPU_REQUEST

spec.cqlsh.podTemplateSpec.spec.containers[0].resources.limits.memory

Memory limit for the container

MEMORY_LIMIT

spec.cqlsh.podTemplateSpec.spec.containers[0].resources.limits.cpu

CPU limit for the container

CPU_LIMIT

spec.cqlsh.podTemplateSpec.spec.containers[0].env[0].name

Name of your custom environment variable

CUSTOM_ENV_VAR_NAME

spec.cqlsh.podTemplateSpec.spec.containers[0].env[0].value

Value for your custom environment variable

CUSTOM_ENV_VAR_VALUE

spec.cqlsh.podTemplateSpec.spec.containers[0].securityContext.allowPrivilegeEscalation

Prevent privilege escalation

false

spec.cqlsh.podTemplateSpec.spec.containers[0].securityContext.capabilities.drop

Drop all capabilities

["ALL"]

spec.cqlsh.podTemplateSpec.spec.containers[0].securityContext.readOnlyRootFilesystem

Make root filesystem read-only

true

spec.cqlsh.podTemplateSpec.spec.containers[0].securityContext.runAsNonRoot

Run as non-root user

true

spec.cqlsh.podTemplateSpec.spec.containers[0].securityContext.runAsUser

User ID for the container security context

USER_ID

spec.cqlsh.podTemplateSpec.spec.securityContext.fsGroup

Group ID for the pod filesystem

GROUP_ID

spec.cqlsh.podTemplateSpec.spec.securityContext.runAsGroup

Group ID for the pod security context

GROUP_ID

spec.cqlsh.podTemplateSpec.spec.securityContext.runAsNonRoot

Run as non-root user

true

spec.cqlsh.podTemplateSpec.spec.securityContext.runAsUser

User ID for the pod security context

USER_ID

spec.cqlsh.podTemplateSpec.spec.nodeSelector

Control which nodes the CQLSH pod is scheduled on

NODE_LABEL_KEY: "NODE_LABEL_VALUE"

spec.cqlsh.podTemplateSpec.spec.tolerations[0].key

Key for the taint

TAINT_KEY

spec.cqlsh.podTemplateSpec.spec.tolerations[0].operator

Taint operator

"Equal"

spec.cqlsh.podTemplateSpec.spec.tolerations[0].value

Value for the taint

TAINT_VALUE

spec.cqlsh.podTemplateSpec.spec.tolerations[0].effect

Effect for the taint

TAINT_EFFECT

Download the CQL command line shell

You can download the CQL command line shell (cqlsh) utility on your local machine to interact with your database cluster using CQL commands outside of the Mission Control UI.

To download the cqlsh utility from the Mission Control UI, do the following:

  1. In the Mission Control UI navigation menu, select your project, and then select your database cluster.

  2. Click CQL Console.

  3. Click Download Command Line Shell. The DataStax downloads page opens in a new browser tab.

  4. Select your database Version from the list of available versions, and then select the option to agree to the terms of the license agreement.

  5. Click Download. Your browser downloads the cqlsh package to your local machine.

  6. Start the cqlsh tool. For more information, see the following documentation for starting the cqlsh tool:

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com