Queue Splitting Status
Once queue splitting is set up (see the per-service pages) you often want to know what is happening right now: which sessions are active, who started them, which queues the operator resolved, and whether the target pods were patched. mirrord exposes this in two ways that show the same data:
The
mirrord queuesCLI command, for a quick human-readable view.A read-only Kubernetes-style API (
queuesplits), forkubectland scripts.
Reading queue-splitting status requires mirrord operator 3.223.0 or later and mirrord CLI 3.223.0 or later.
The status is a live view. It is synthesized on each request from the operator's in-memory state, so there is no stored object and nothing to clean up. When a session ends, its entry disappears.
The mirrord queues command
mirrord queues commandmirrord queues (short alias mirrord qs) reads the status API and prints it. It uses the same Kubernetes access as any other mirrord command, so it works against whatever cluster your kubeconfig points at.
Listing active sessions
Running mirrord queues status with no name lists one row per active split, with these columns:
NAME- the split's resource name. Pass this tomirrord qs status <name>for the detailed view.SESSION- the mirrord session id, in the same uppercase hex format the operator status shows.USER- the developer who started the session, asusername/k8sUsername@hostname.NAMESPACE- the namespace of the target workload.TARGET- the target workload asKind/name.PHASE-Pending,Ready, orFailed(see Phases).DURATION- how long the session has been running.
Choosing a namespace
Like kubectl, the command lists a single namespace by default. It picks the namespace from, in order:
the
-n/--namespaceflag,target.namespacefrom your mirrord config (-f),the kubeconfig's default namespace.
Pass -A / --all-namespaces to list every namespace instead:
Inspecting one split
Pass a NAME from the list to see the full detail of a single split:
It prints a summary (session, namespace, user, target, phase, duration), then a table each for the filters requested in the mirrord config, the queues the operator resolved, and the target pods. A single session can split several queues, and those queues can be of different broker types - they all show up together here.
The queuesplits API
queuesplits APIThe operator serves the same data under the operator.metalbear.co/v1 API group as a QueueSplit resource (plural queuesplits). This is not a stored CustomResourceDefinition - the whole group is answered live from the operator, so kubectl get/describe work but you cannot create or edit these objects.
An example object for a session splitting three brokers (SQS, Redis Pub/Sub, and Temporal) at once (each field is explained in the field reference below):
Field reference
spec mirrors what the user asked for:
session- the mirrord session id.target- the split target workload (apiVersion,kind,name,container).owner- who started the session (username,k8sUsername,hostname,userId).filters[]- one entry per queue id in the user's mirrord config:id- the queue id.queueType- the broker type:SQS,Kafka,RMQ,GooglePubSub,AzureServiceBus,RedisPubSub, orTemporal.messageFilter- attribute/header name to regex map (present only if set).jqFilter- jq program applied to the message (present only if set).
status reflects what the operator resolved:
phase-Pending,Ready, orFailed(see Phases).message- a human-friendly detail, such as a failure reason (present only when there is one).queues[]- the queues the operator actually resolved from the target. There can be more than one per filter (for example when anenvLikeregex matches several environment variables). Each entry has anid, atype, and only the broker-specific names that apply:queue(SQS, Azure Service Bus),topic(Kafka, GCP Pub/Sub, Azure Service Bus),consumerGroup(Kafka), orsubscription(GCP Pub/Sub, Azure Service Bus).targetPods[]- the target pods seen for the session, each withpatched(carries the split's env-var patch) andready(running with all containers ready).
Phases
Pending
The split is being set up: temporary queues are being created or target pods are restarting.
Ready
All queues are resolved and every target pod is patched and ready. Messages are being split.
Failed
Setup failed. See status.message (or the MESSAGE line in the detailed CLI view) for why.
Multi-cluster
In a multi-cluster setup the primary operator aggregates the view from every connected cluster, so mirrord queues status -A and kubectl get queuesplits -A against the primary show splits running in remote clusters too. A namespaced list (-n <namespace>, the default) also includes the splits the primary aggregates from other clusters for that namespace.
Last updated
Was this helpful?

