apache/druid · error · IllegalArgumentException

Invalid pod adapter [%s], only pod adapter [%s] can be speci

Error message

Invalid pod adapter [%s], only pod adapter [%s] can be specified when sidecarSupport is enabled

What it means

Thrown by MultipleKubernetesTaskRunnerFactory.buildTaskAdapter when a specific pod adapter type is configured while sidecarSupport is enabled in the effective Kubernetes task runner config. When sidecars are in use, Druid only accepts the multi-container adapter because per-task pods must run multiple containers; any other adapter (e.g. single-container) is incompatible and the Overlord refuses to start the task runner with this IllegalArgumentException.

Source

Thrown at extensions-core/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/MultipleKubernetesTaskRunnerFactory.java:354

        effectiveConfig.getNamespace(),
        useOverlordNamespace ? effectiveConfig.getOverlordNamespace() : "",
        effectiveConfig.isDebugJobs(),
        emitter
    );
  }

  private TaskAdapter buildTaskAdapter(
      @Nullable String adapter,
      DruidKubernetesClient client,
      @Nullable DruidKubernetesClient overlordPodSourceClient,
      @Nullable String overlordPodSourceNamespace,
      KubernetesTaskRunnerEffectiveConfig effectiveConfig
  )
  {
    if (adapter != null
        && !MultiContainerTaskAdapter.TYPE.equals(adapter)
        && effectiveConfig.isSidecarSupport()) {
      throw new IAE(
          "Invalid pod adapter [%s], only pod adapter [%s] can be specified when sidecarSupport is enabled",
          adapter,
          MultiContainerTaskAdapter.TYPE
      );
    }

    if (MultiContainerTaskAdapter.TYPE.equals(adapter) || effectiveConfig.isSidecarSupport()) {
      return new MultiContainerTaskAdapter(
          overlordPodSourceClient,
          overlordPodSourceNamespace,
          client,
          effectiveConfig,
          taskConfig,
          startupLoggingConfig,
          druidNode,
          smileMapper,
          taskLogs
      );

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Change druid.indexer.runner.k8s.adapter.type to multiContainer (MultiContainerTaskAdapter.TYPE) in the Overlord runtime properties
  2. Remove the explicit adapter type so the default adapter is chosen when sidecarSupport is enabled
  3. If multi-container is not actually needed, set druid.indexer.runner.k8s.sidecarSupport=false instead

Example fix

// before
druid.indexer.runner.k8s.adapter.type=singleContainer
druid.indexer.runner.k8s.sidecarSupport=true

// after
druid.indexer.runner.k8s.adapter.type=multiContainer
druid.indexer.runner.k8s.sidecarSupport=true
Defensive patterns

Strategy: validation

Validate before calling

// Before starting the Overlord, assert adapter compatibility
String adapter = props.getProperty("druid.indexer.runner.k8s.adapter.type");
boolean sidecar = Boolean.parseBoolean(props.getProperty("druid.indexer.runner.k8s.sidecarSupport", "false"));
if (sidecar && adapter != null && !"multiContainer".equals(adapter)) {
    throw new IllegalArgumentException(
        "sidecarSupport=true requires adapter.type=multiContainer, found: " + adapter);
}

Prevention

When it happens

Trigger: Calling clusterTaskAdapter/buildTaskAdapter with druid.indexer.runner.k8s.adapter.type set to something other than multiContainer while druid.indexer.runner.k8s.sidecarSupport=true (or sidecars enabled via MultiContainerTaskAdapter config). The adapter value comes straight from configuration, so any non-multiContainer value triggers it.

Common situations: Operators upgrading to enable sidecar containers (e.g. to attach log collectors or proxies per task pod) but leaving the previously configured adapter type in place; copy-pasted configs where adapter.type=singleContainer predates enabling sidecarSupport.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/97cf104a1d221052. Report an issue: GitHub.