How to deploy the two couchbase single node cluster in two different namespace

Hi ,

Requirement is as follows:

  • Install CRD , DAC and CAO in namespace ‘alpha’.
  • One Couchbase Cluster in namespace ‘Beta’.
  • Second Couchbase Cluster in namespace ‘meta’.

in K8s .

Version details:

k version --short

Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.27.3
Kustomize Version: v5.0.1
Server Version: v1.26.15

CAO version is 2.7.0

bin/cao version

cao 2.7.0 (build 230, revision 8496f1c7d65cc30ab0b7ea5aa9df3b515ec53bba)

Do we need to do some extra setting while creating the cao in alpha namespace.

I have made the changes as per IG guide Role to ClusterRole and RoleBinding to ClusterRoleBinding while creating/ depolying CAO.

Attaching the CAO yamls for reference.
create_cao_yaml.zip (1.2 KB)

Regards,
Sameer Malve

Hello Sameer!

We recommend that you deploy the DAC and the CRD’s at the cluster level, and then create an Operator deployment inside each namespace that you want to manage a Couchbase Cluster in. You can find documentation on this recomendation here.

Once you have the operator in each namespace, you can just create the CouchbaseCluster resource as desired in each namespace.

Thanks,

Justin Ashworth
Manager, Cloud Native Enginering.

Hi @justin.ashworth ,

we have done the as recommended in documentation by installing DAC and CRD at cluster level and Operator as namespace level by changing the Role and Role Binding to ClusterRole and ClusterRoleBinding.

  1. Install the CRD and DAC in namespace cb.

  2. Install the Operator in namespace imas

3 . Attaching the crd.yaml , create_dac.yaml and create_cao.yaml
Yamls.zip (76.6 KB)

But we are still facing the below error in the logs.

{"level":"info","ts":"2024-12-10T10:07:42Z","msg":"k8s.io/client-go@v0.28.3/tools/cache/reflector.go:229: failed to list *v1.Service: services is forbidden: User \"system:serviceaccount:imas:couchbase-operator\" cannot list resource \"services\" in API group \"\" in the namespace \"imas\""}
{"level":"error","ts":"2024-12-10T10:07:42Z","msg":"k8s.io/client-go@v0.28.3/tools/cache/reflector.go:229: Failed to watch *v1.Service: failed to list *v1.Service: services is forbidden: User \"system:serviceaccount:imas:couchbase-operator\" cannot list resource \"services\" in API group \"\" in the namespace \"imas\"","stacktrace":"k8s.io/client-go/tools/cache.DefaultWatchErrorHandler\n\tk8s.io/client-go@v0.28.3/tools/cache/reflector.go:147\nk8s.io/client-go/tools/cache.(*Reflector).Run.func1\n\tk8s.io/client-go@v0.28.3/tools/cache/reflector.go:292\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tk8s.io/apimachinery@v0.28.3/pkg/util/wait/backoff.go:226\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tk8s.io/apimachinery@v0.28.3/pkg/util/wait/backoff.go:227\nk8s.io/client-go/tools/cache.(*Reflector).Run\n\tk8s.io/client-go@v0.28.3/tools/cache/reflector.go:290\nk8s.io/client-go/tools/cache.(*controller).Run.(*Group).StartWithChannel.func2\n\tk8s.io/apimachinery@v0.28.3/pkg/util/wait/wait.go:55\nk8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1\n\tk8s.io/apimachinery@v0.28.3/pkg/util/wait/wait.go:72"}

Can you please suggest

Regards,
Sameer Malve