zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.36k stars 980 forks source link

Installation with Kustomize Problem in another namespace #1763

Open marcellodesales opened 2 years ago

marcellodesales commented 2 years ago

πŸ” Error during install

the namespace from the provided object "default" does not match the namespace

🐞 Why can't we provide the namespace when installing with kustomize?

$ kubectl apply -k github.com/zalando/postgres-operator/manifests -n super-platform
clusterrole.rbac.authorization.k8s.io/postgres-operator unchanged
clusterrole.rbac.authorization.k8s.io/postgres-pod unchanged
clusterrolebinding.rbac.authorization.k8s.io/postgres-operator unchanged
configmap/postgres-operator unchanged
service/postgres-operator unchanged
deployment.apps/postgres-operator unchanged
error: the namespace from the provided object "default" does not match the namespace "super-platform". You must pass '--namespace=default' to perform this operation.

πŸ”’ Versions

☁️  aws-cli@2.2.32 πŸ”– aws-iam-authenticator@0.5.3
☸️  kubectl@1.22.4 πŸ“› kustomize@v4.3.0 🎑 helm@3.7.0 πŸ‘½ argocd@2.2.0 ✈️  glooctl@1.9.0
FxKu commented 2 years ago

Is it because of the namespace in the RBAC manifest? Try to all mentions from that file ans try again. In general, these manifest files we provide are just examples and everybody can customize them for their needs.