Skip to content

Unclear MEMCACHED_IMAGE env variable usage in tutorial when deploying to cluster #7007

@ovcharenko-di

Description

@ovcharenko-di

What is the URL of the document?

https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/#2-run-as-a-deployment-inside-the-cluster

Which section(s) is the issue in?

2-run-as-a-deployment-inside-the-cluster

What needs fixing?

When you follow tutorial literally and run make deploy, the controller cannot create pods. Instead, it just logs errors like the following:

2025-11-03T10:25:53Z    ERROR   Failed to define new Deployment resource for Memcached  {"controller": "memcached", "controllerGroup": "cache.example.com", "controllerKind": "Memcached", "Memcached": {"name":"memcached-sample","namespace":"memcached-operator-system"}, "namespace": "memcached-operator-system", "name": "memcached-sample", "reconcileID": "bc4fe710-acb1-4ae3-a1b6-86c15bd50f30", "error": "unable to find MEMCACHED_IMAGE environment variable with the image"}
github.com/example/memcached-operator/internal/controller.(*MemcachedReconciler).Reconcile
        /workspace/internal/controller/memcached_controller.go:205

It would be nice to point out in the tutorial where this env variable should be set. As I cannot add env: to the sample manifest (kind: Memcached), I just patched my deployment and the pods started successfully. I think there must be another way and it should be described in that section.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/documentationCategorizes issue or PR as related to documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions