{"record":{"id":"82e538ba10dabbd8","repo":"amir20/dozzle","slug":"update-container-is-not-supported-in-kubernetes-mo","errorCode":null,"errorMessage":"update container is not supported in Kubernetes mode","messagePattern":"update container is not supported in Kubernetes mode","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/support/k8s/k8s_service.go","lineNumber":110,"sourceCode":"\nfunc (k *K8sClientService) SubscribeContainersStarted(ctx context.Context, containers chan<- container.Container) {\n\tk.store.SubscribeNewContainers(ctx, containers)\n}\n\n// CheckImageUpdate is not supported in Kubernetes mode, where image rollout is\n// the cluster's responsibility rather than Dozzle's.\nfunc (k *K8sClientService) CheckImageUpdate(ctx context.Context, c container.Container, force bool) (imagecheck.Result, error) {\n\treturn imagecheck.Result{\n\t\tImage:     c.Image,\n\t\tStatus:    imagecheck.StatusSkipped,\n\t\tReason:    \"image update checks are not supported in Kubernetes mode\",\n\t\tCheckedAt: time.Now(),\n\t}, nil\n}\n\nfunc (k *K8sClientService) UpdateContainer(ctx context.Context, c container.Container, progressCh chan<- container.UpdateProgress) (bool, error) {\n\tdefer close(progressCh)\n\treturn false, fmt.Errorf(\"update container is not supported in Kubernetes mode\")\n}\n\nfunc (k *K8sClientService) Attach(ctx context.Context, c container.Container, events container.ExecEventReader, stdout io.Writer) error {\n\tcancelCtx, cancel := context.WithCancel(ctx)\n\tsession, err := k.client.ContainerAttach(cancelCtx, c.ID)\n\tif err != nil {\n\t\tcancel()\n\t\treturn err\n\t}\n\n\tvar wg sync.WaitGroup\n\n\twg.Go(func() {\n\t\tdefer session.Writer.Close()\n\t\tdefer cancel()\n\n\tloop:\n\t\tfor {","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/amir20/dozzle/blob/d9463cbe21874e44ab79db6fa63e746ca7d22928/internal/support/k8s/k8s_service.go#L92-L128","documentation":"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.","triggerScenarios":"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.","commonSituations":"Users running Dozzle in k8s mode who click 'update container' in the UI; automated container-update integrations that assume Docker-mode capabilities.","solutions":["Do not use the container update feature in Kubernetes mode; update the image via the pod/deployment manifest or kubectl rollout instead","Deploy Dozzle in standalone (Docker) mode if container updates from the UI are required","Check mode support before exposing the update action in any automation (skip when mode is k8s)"],"exampleFix":"// before\nok, err := svc.UpdateContainer(ctx, c, progressCh)\n// after\nif isK8sMode {\n    return fmt.Errorf(\"updates must be done via kubectl in k8s mode\")\n}\nok, err := svc.UpdateContainer(ctx, c, progressCh)","handlingStrategy":"try-catch","validationCode":"if (config.mode === 'k8s') {\n  throw new Error('container update is unavailable in k8s mode');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await updateContainer(id);\n} catch (e) {\n  if (String(e.message).includes('not supported in Kubernetes mode')) {\n    notify('Use kubectl to update containers in k8s mode');\n  } else { throw e; }\n}","preventionTips":["Gate update actions on deployment mode in the UI/automation","Know the capability matrix: agent/k8s backends implement a subset of Docker operations"],"tags":["kubernetes","unsupported-operation","container-update"],"backgroundTag":"unsupported-operation","analyzedSha":"d9463cbe21874e44ab79db6fa63e746ca7d22928","analyzedAt":"2026-09-07T10:08:55.855Z","contentChangedAt":"2026-09-07T10:08:55.855Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}