How to change Operator to different namespace - cniackz/public GitHub Wiki
Objective:
To change Operator to different namespace.
Steps:
- Let's assume you have deployed Operator and Tenant under the same namespace:
 
$ k get pods -n tenant-lite
NAME                             READY   STATUS    RESTARTS   AGE
cesar-pool-0-0                   2/2     Running   0          3m15s
cesar-pool-0-1                   2/2     Running   0          3m15s
cesar-pool-0-2                   2/2     Running   0          3m15s
cesar-pool-0-3                   2/2     Running   0          3m15s
console-db6c89f77-nk8zc          1/1     Running   0          4m53s
minio-operator-8f4489df8-dglfr   1/1     Running   0          4m53s
$ helm list -n tenant-lite
NAME       	NAMESPACE  	REVISION	UPDATED                             	STATUS  	CHART         	APP VERSION
tenant-lite	tenant-lite	1       	2023-05-01 13:40:45.797488 -0400 EDT	deployed	operator-5.0.4	v5.0.4
- Save the Tenant:
 
k get tenant -n tenant-lite -o yaml | k neat > tenant.yaml
- Uninstall the Operator from that namespace:
 
$ helm uninstall tenant-lite -n tenant-lite
release "tenant-lite" uninstalled
- Re-install Operator in 
minio-operatornamespace: 
$ helm install \
     --namespace minio-operator \
     --create-namespace minio-operator \
     operator-5.0.4
$ helm list -n minio-operator
NAME          	NAMESPACE     	REVISION	UPDATED                             	STATUS  	CHART         	APP VERSION
minio-operator	minio-operator	1       	2023-05-01 13:57:58.366175 -0400 EDT	deployed	operator-5.0.4	v5.0.4 
- Apply back the original Tenant with same original configuration, existing PVCs and PVs will be re-used and data preserved:
 
$ k apply -f tenant.yaml 
tenant.minio.min.io/cesar created
Note:
Services might need to be reconfigured if using NodePort on them.