amir20/dozzle · error

update container is not supported in Kubernetes mode

Error message

update container is not supported in Kubernetes mode

What it means

K8sClientService.UpdateContainer is a stub: container image updates (e.g. via container-updater/watchtower-style flows) are not implemented for the Kubernetes backend, so it closes the progress channel and immediately returns a hard error. The operation simply has no k8s counterpart in Dozzle.

Solutions

  1. Do not use the container update feature in Kubernetes mode; update the image via the pod/deployment manifest or kubectl rollout instead
  2. Deploy Dozzle in standalone (Docker) mode if container updates from the UI are required
  3. Check mode support before exposing the update action in any automation (skip when mode is k8s)

Example fix

// before
ok, err := svc.UpdateContainer(ctx, c, progressCh)
// after
if isK8sMode {
    return fmt.Errorf("updates must be done via kubectl in k8s mode")
}
ok, err := svc.UpdateContainer(ctx, c, progressCh)
Defensive patterns

Strategy: try-catch

Validate before calling

if (config.mode === 'k8s') {
  throw new Error('container update is unavailable in k8s mode');
}

Try / catch

try {
  await updateContainer(id);
} catch (e) {
  if (String(e.message).includes('not supported in Kubernetes mode')) {
    notify('Use kubectl to update containers in k8s mode');
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling UpdateContainer on a container resolved to a Kubernetes host (k8s mode, --k8s flag), typically via the container update UI or the /update action route which dispatches through ClientService.

Common situations: Users running Dozzle in k8s mode who click 'update container' in the UI; automated container-update integrations that assume Docker-mode capabilities.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of amir20/dozzle@d9463cbe21 (2026-09-07). Data as JSON: /api/errors/82e538ba10dabbd8. Report an issue: GitHub.

Appendix: source

Thrown at internal/support/k8s/k8s_service.go:110

func (k *K8sClientService) SubscribeContainersStarted(ctx context.Context, containers chan<- container.Container) {
	k.store.SubscribeNewContainers(ctx, containers)
}

// CheckImageUpdate is not supported in Kubernetes mode, where image rollout is
// the cluster's responsibility rather than Dozzle's.
func (k *K8sClientService) CheckImageUpdate(ctx context.Context, c container.Container, force bool) (imagecheck.Result, error) {
	return imagecheck.Result{
		Image:     c.Image,
		Status:    imagecheck.StatusSkipped,
		Reason:    "image update checks are not supported in Kubernetes mode",
		CheckedAt: time.Now(),
	}, nil
}

func (k *K8sClientService) UpdateContainer(ctx context.Context, c container.Container, progressCh chan<- container.UpdateProgress) (bool, error) {
	defer close(progressCh)
	return false, fmt.Errorf("update container is not supported in Kubernetes mode")
}

func (k *K8sClientService) Attach(ctx context.Context, c container.Container, events container.ExecEventReader, stdout io.Writer) error {
	cancelCtx, cancel := context.WithCancel(ctx)
	session, err := k.client.ContainerAttach(cancelCtx, c.ID)
	if err != nil {
		cancel()
		return err
	}

	var wg sync.WaitGroup

	wg.Go(func() {
		defer session.Writer.Close()
		defer cancel()

	loop:
		for {

View on GitHub (pinned to d9463cbe21)