How to manage multiple namespaces with a single elastic operator

I have deployed elastic operator from the quickstart documentation. I have deployed elasticsearch, kibana from the same documentation under the namespace(elastic-system) where I have deployed the elastic operator. Now I am trying to deploy same elasticsearch in another namespace and I have annotated this with
annotations: elastic-operator
but the pods are not even coming up.
I have even enabled the --cluster-roles = --all
Answer would be really appreciated.

Is there any one who can help me on this?


There is no need to add an annotation. If you have followed the quickstart ECK should automatically watch all the namespaces in your cluster.

Could you try to create a resource just by changing the namespace attribute in the manifest or by using the -n option with kubectl ?

Here creating a resources means which resource? you mean elasticsearch?

Yes, something along those lines:

cat <<EOF | kubectl apply -f -
kind: Elasticsearch
  name: quickstart
  namespace: my-namespace # set the namespace here
  version: 7.9.2
  - name: default
    count: 1
      node.master: true true
      node.ingest: true false

Yes, that I have tried but it is not even showing any pods.
I will tell you clearly what I did, I have deployed an operator it got deployed under elastic-system namespace, In the same namespace I have deployed Elasticsearch, kibana. That is working fine.
Now I want to deploy another instance of Elasticsearch, kibana in another namespace but I want this also has to be managed by the same oprerator which I have deployed under elastic-system namespace.
So when I am trying this the pods are not even showing when I am using this command,
kubectl get po -n <namespace_name>.
I think now you understand what I want?

I would need more information:

  • Could you check if there is any error in the operator logs ?
  • Also could you get the events in the target namespace to check if Pod creation is refused by an admission controller ?
  • Could you copy/paste the manifest of the operator's statefulset in elastic-system to check which operator flags are actually set ?

Thanks for your response.

  • I got issues because in operator sts I have mentioned one parameter like
    - namespaces: elastic-system

  • So might be because of that I got those issues.

  • can you give me some clarification on that namespace parameter like when I want to restrict access to few namespaces what I have to do? And some info on the operator behavious on this namespaces?

Operator's flags are described here:

Let me know if the documentation helps you.

This I already have gone through, But that didn't help me....In the documentation they mentioned this

  • Namespaces in which this operator should manage resources. Accepts multiple comma-separated values. Defaults to all namespaces if empty or unspecified.
    So from this when I want my operator to restrict access to only 2 namesapces can I use this flag
  • --namespaces: namespace1,namespace2

--namespaces: namespace1,namespace2

Not sure if it is a typo but it should be --namespaces=namespace1,namespace2 (note the equal sign instead of the colon character)

Hi @michael.morello,

With operator mode of deployment one of my Kibana pod it is not coming to 1/1 running state, error message when checking the logs

{"type":"log","@timestamp":"2020-10-05T09:07:27Z","tags":["warning","plugins-discovery"],"pid":8,"message":"Expect plugin "id" in camelCase, but found: beats_management"}
{"type":"log","@timestamp":"2020-10-05T09:07:27Z","tags":["warning","plugins-discovery"],"pid":8,"message":"Expect plugin "id" in camelCase, but found: triggers_actions_ui"}
[BABEL] Note: The code generator has deoptimised the styling of /usr/share/kibana/x-pack/plugins/canvas/server/templates/pitch_presentation.js as it exceeds the max of 500KB.