kube-arangodb icon indicating copy to clipboard operation
kube-arangodb copied to clipboard

Unable to deploy ArangoDB cluster in Kubernetes with namespaced mode

Open saipavan9 opened this issue 3 years ago • 2 comments

Hi, I am trying to deploying ArngoDB cluster in our own kubernetes cluster. I have successfully added the CRDs to our cluster. Using the following command from helm 2.17 template I generated the YAML manifests with namespace scope of the deployment.

helm template kube-arangodb-1.1.10.tgz \                           
                       --name "deployment" \
                       --set "operator.image=arangodb/kube-arangodb:1.1.10" \
                       --set "operator.imagePullPolicy=Always" \
                       --set "operator.resources=null" \
                       --set "operator.scope=namespaced" \
         	       --namespace "arango"

When deployed everything is running but when I deploy the cluster and check the logs of it.I getting the following. When I reached the community for this issue. They said it would only try to list nodes if you are using cluster scope deployment but not with namespace scoped but yet this is the error I am getting. I can share the generated YAML manifests for verification.

2021-07-09T17:05:00Z ERR Unable to get nodes error="Unable to get nodes: nodes is forbidden: User \"system:serviceaccount:ac-refurb-ops-planning-kube:arango-deployment-operator\" cannot list resource \"nodes\" in API group \"\" at the cluster scope" component=deployment deployment=production-cluster operator-id=6kpnl
2021-07-09T17:05:00Z DBG ...deployment inspect started component=deployment deployment=production-cluster interval=250ms operator-id=6kpnl
2021-07-09T17:05:00Z DBG Inspect deployment... component=deployment deployment=production-cluster operator-id=6kpnl
2021-07-09T17:05:01Z ERR Unable to get nodes error="Unable to get nodes: nodes is forbidden: User \"system:serviceaccount:ac-refurb-ops-planning-kube:arango-deployment-operator\" cannot list resource \"nodes\" in API group \"\" at the cluster scope" component=deployment deployment=production-cluster operator-id=6kpnl
2021-07-09T17:05:01Z DBG ...inspected deployment component=deployment deployment=production-cluster interval=250ms operator-id=6kpnl
2021-07-09T17:05:01Z DBG Inspect deployment... component=deployment deployment=production-cluster operator-id=6kpnl
2021-07-09T17:05:01Z ERR Unable to get nodes error="Unable to get nodes: nodes is forbidden: User \"system:serviceaccount:ac-refurb-ops-planning-kube:arango-deployment-operator\" cannot list resource \"nodes\" in API group \"\" at the cluster scope" component=deployment deployment=production-cluster operator-id=6kpnl

saipavan9 avatar Jul 14 '21 14:07 saipavan9

Same, with version 1.2.1. Can someone please advise? Is there a version known to work?

djmcgreal-cc avatar Aug 09 '21 20:08 djmcgreal-cc

It doesn't look like there's a path in the code that avoids inspectDeployment trying to access the nodes. https://github.com/arangodb/kube-arangodb/blob/5a1500293fbc09fa13a81d91a9ef47403b4ff76f/pkg/deployment/deployment_inspector.go#L85

djmcgreal-cc avatar Aug 09 '21 20:08 djmcgreal-cc