# Examples from ECK not working propertly

**URL:** <https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [March 26, 2024, 7:59pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205 "2024-03-26T19:59:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyderfs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weyderfs/32/32935_2.png) [@weyderfs](https://discuss.elastic.co/u/weyderfs)\
**Post date:** [March 26, 2024, 7:59pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/1 "2024-03-26T19:59:15Z")

</div>

Hi,  
I've been creating a YAML for deployment of `kind: Elasticsearch`, after deployed with success the ECK Operator, but when try use multiples nodeSets return the following error:

```auto
Error from server (Forbidden): error when creating "stack-dev.yaml": admission webhook "elastic-es-validation-v1.k8s.elastic.co" denied the request: Elasticsearch.elasticsearch.k8s.elastic.co "eck-sentinel" is invalid: [spec.nodeSets[0].config: Forbidden: Detected a combination of node.roles and node.remote_cluster_client. Use only node.roles, spec.nodeSets[1].config: Forbidden: Detected a combination of node.roles and node.remote_cluster_client. Use only node.roles]

```

Following my YAML file:

```yaml

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: eck
  namespace: observability
spec:
  version: 8.13.0
  nodeSets:
  - name: es-masters
    count: 1
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
            runAsUser: 0
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']    
    config:
      node.roles: ["master"]
      xpack.ml.enabled: true      
      node.remote_cluster_client: false
  - name: es-data
    count: 1
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
            runAsUser: 0
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']       
    config:
      node.roles: ["data", "ingest", "ml", "transform"]
      node.remote_cluster_client: false        

```

Is someone know how to solve?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 31, 2024, 6:57pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/2 "2024-03-31T18:57:14Z")

</div>

> [@weyderfs](#):
>
> `node.remote_cluster_client: false`

Hi @weyderfs did you try to remove that line as suggested by the error?

---

<div class="post-metadata">

**Author:** ![weyderfs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weyderfs/32/32935_2.png) [@weyderfs](https://discuss.elastic.co/u/weyderfs)\
**Post date:** [April 2, 2024, 1:38pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/3 "2024-04-02T13:38:49Z")

</div>

I removed, but now I can´t use the Stack Monitoring, because needs the definition previously mentioned

```auto
Access Denied

You are not authorized to access Monitoring. To use Monitoring, you need the privileges granted by both the `kibana_admin` and `monitoring_user ` roles.

If you are attempting to access a dedicated monitoring cluster, this might be because you are logged in as a user that is not configured on the monitoring cluster.

Since Cross Cluster Search is enabled (`monitoring.ui.ccs.enabled` is set to `true`), make sure your cluster has the `remote_cluster_client` role on at least one node.

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 2, 2024, 1:52pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/4 "2024-04-02T13:52:41Z")

</div>

Perhaps try

`node.roles: ["data", "ingest", "ml", "transform", "remote_cluster_client"]`

---

<div class="post-metadata">

**Author:** ![weyderfs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weyderfs/32/32935_2.png) [@weyderfs](https://discuss.elastic.co/u/weyderfs)\
**Post date:** [April 2, 2024, 3:00pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/5 "2024-04-02T15:00:44Z")

</div>

> [@stephenb](#):
>
> `node.roles: ["data", "ingest", "ml", "transform", "remote_cluster_client"]`

Now, looks like working fine, I guess that needs update the documentation [here](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-node-configuration.html), because in the example the config it's out of the array mentioned previously.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 2, 2024, 4:09pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/6 "2024-04-02T16:09:07Z")

</div>

~~I think that is technically correct (set to `false`), but yes~~ Corrected... they should show the role in the array.

---

<div class="post-metadata">

**Author:** ![weyderfs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weyderfs/32/32935_2.png) [@weyderfs](https://discuss.elastic.co/u/weyderfs)\
**Post date:** [April 2, 2024, 5:21pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/7 "2024-04-02T17:21:43Z")

</div>

On ECK deployment, if set to false returns the error:

```json
Name: "eck-elasticsearch", Namespace: "observability"
for: "stack-dev.yaml": error when patching "stack-dev.yaml": admission webhook "elastic-es-validation-v1.k8s.elastic.co" denied the request: Elasticsearch.elasticsearch.k8s.elastic.co "eck-elasticsearch" is invalid: spec.nodeSets[1].config: Forbidden: Detected a combination of node.roles and node.remote_cluster_client. Use only node.roles
}}

```

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 2, 2024, 5:48pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/8 "2024-04-02T17:48:11Z")

</div>

Hmmm, it looks like you are right; sorry, that's interesting.  
Perhaps you can open an issue against the repository for a document update.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 30, 2024, 5:48pm UTC](https://discuss.elastic.co/t/examples-from-eck-not-working-propertly/356205/9 "2024-04-30T17:48:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
