I've just deployed Medik8s, and it automatically created a namespace called `medik8s-leases`. Our organization requires system namespaces to use an `infra-` prefix, so I'd like to use a name such as `infra-medik8s-leases` instead. I couldn't find a namespace setting in the supplied manifests. Since this is still a fresh installation, redeploying is fine—what is the recommended way to configure Medik8s to use a different lease namespace?
3 Answers
One possible workaround is to patch the controller manager to set the lease namespace through the environment variable used by Medik8s’ lease manager. Then remove the existing lease resources and namespace, clear any finalizers if deletion gets stuck, and restart the controller so it recreates everything under the new name. I’d treat this as experimental, though, because a future upgrade or reconciliation may restore the original value unless the patch is managed declaratively.
Check the Helm values and manifests for a configurable lease namespace first. Some operators let you change the installation namespace, but still hard-code a separate lease namespace such as `medik8s-leases`. If that name is embedded in the operator code or generated manifests, it would need an upstream configuration option or code change rather than a simple namespace rename.
A namespace can’t be renamed after it’s created because other resources may reference its name. Since this is a new installation, the usual approach is to remove the current deployment and install it again in a namespace with the required name—assuming Medik8s supports configuring that lease namespace before installation.
Redeploying is fine in my case. I’m mainly trying to find the Medik8s-specific setting because the provided manifests don’t expose an obvious namespace option.

That might work, but I’m hesitant to rely on a manual patch if the namespace ever needs to be recreated. It would be better if the setting could be included permanently in the installation configuration.