# Connect to Zeebe-Gateway over ingress-controller with node-js-sdk

**URL:** <https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939>\
**Category:** Camunda 8 Topics\
**Tags:** zeebe, self-managed, node-js-sdk\
**Created:** [June 5, 2024, 12:55pm UTC](https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939 "2024-06-05T12:55:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maiksfd](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@maiksfd](https://forum.camunda.io/u/maiksfd)\
**Post date:** [June 5, 2024, 12:55pm UTC](https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939/1 "2024-06-05T12:55:05Z")

</div>

Hi everyone,

i just started to learn using camunda self managed with an ingress controller in a local kind cluster while following this guide: [https://camunda.com/blog/2024/01/camunda-self-managed-absolute-beginners-part-2-ingress-tls-ssl/](https://camunda.com/blog/2024/01/camunda-self-managed-absolute-beginners-part-2-ingress-tls-ssl/)

Everythink works, i can access the components (e.g. operate) via the browser and the zeebe-gateway with zbctl (under zeebe.camunda.local:443).

**But when i try to connect to zeebe in Node i get the following error:**

zeebe | ERROR: [deployResource]: 14 UNAVAILABLE: No connection established. Last error: Client network socket disconnected before secure TLS connection was established

**This is my index.ts:**

```auto
import { Camunda8 } from "@camunda8/sdk";
import path from "path";

const camunda = new Camunda8({
	ZEEBE_GRPC_ADDRESS: 'zeebe.camunda.local:443',
	ZEEBE_CLIENT_ID: 'zeebe',
	ZEEBE_CLIENT_SECRET: 'zecret',
    CAMUNDA_OAUTH_DISABLED: true, // Identity is disabled
});
const zeebe = camunda.getZeebeGrpcApiClient();

async function main() {
    const deploy = await zeebe.deployResource({
      processFilename: path.join(process.cwd(), "process.bpmn"),
    });
    console.log(
      `[Zeebe] Deployed process ${deploy.deployments[0].process.bpmnProcessId}`
    );
}
  
main();

```

I assume i have to pass my generated cert anywhere because when i use zbctl i pass the certificate aswell.  
There is an option called CAMUNDA\_CUSTOM\_ROOT\_CERT\_PATH but i dont know if thats what i need (putting the cert in my folder and adding the path does not help).

Strange is that it does not matter what the ZEEBE\_GRPC\_ADDRESS is, i always get the error. So maybe its a general problem and not because of the missing cert? Are there any major differences when trying to connect to zeebe with the node sdk over an ingress?

Any help is appreciated 🙂

---

<div class="post-metadata">

**Author:** ![Arjun1007](https://forum.camunda.io/letter_avatar_proxy/v4/letter/a/a6a055/32.png) [@Arjun1007](https://forum.camunda.io/u/Arjun1007)\
**Post date:** [June 9, 2024, 8:25pm UTC](https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939/2 "2024-06-09T20:25:34Z")

</div>

> [@maiksfd](#):
>
> ```auto
> ZEEBE_CLIENT_ID: 'zeebe',
> ZEEBE_CLIENT_SECRET: 'zecret',
> 
> ```

Ideally, it shouldn’t be an cert issue. With the details you shared, I can guess it can be due to ZEEBE\_CLIENT\_ID.  
Did you change or configure the value for ZEEBE\_CLIENT\_ID? Usually it will be **zeebe-api** not zeebe in Camunda identity.

Below is the high level of how identity works in a client app (node/springboot) integration:

1. Create new credentails for the Node client app. Generally will be M2M connection.
2. Configure ID and Secret for the Node app. Identity will authenticate the client app and generates a access token.
3. The access token is passed while making the call to Zeebe gateway.

Hope this help!

---

<div class="post-metadata">

**Author:** ![maiksfd](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@maiksfd](https://forum.camunda.io/u/maiksfd)\
**Post date:** [June 10, 2024, 9:18am UTC](https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939/3 "2024-06-10T09:18:59Z")

</div>

Hey and thanks for the response!

I did not configure anything and strictly followed the guide for the local kind-ingress-setup. As i said, identity is disabled:

```auto
global:
  ingress:
    enabled: true
    className: nginx
    host: "camunda.local"
    tls:
      enabled: true
      secretName: "tls-secret"
  identity:
    auth:
      # Disable Identity authentication for local development
      # it will fall back to basic-auth: demo/demo as default user
      enabled: false

# Disable Identity for local development
identity:
  enabled: false

# Disable Optimize
optimize:
  enabled: false

operate:
  contextPath: "/operate"

tasklist:
  contextPath: "/tasklist"

# Reduce for Zeebe and Gateway the configured replicas and with that the required resources
# to get it running locally
zeebe:
  clusterSize: 1
  partitionCount: 1
  replicationFactor: 1
  pvcSize: 10Gi
  resources: {}
  initResources: {}

zeebe-gateway:
  replicas: 1
  ingress:
    enabled: true
    className: nginx
    host: "zeebe.camunda.local"
    tls:
      enabled: true
      secretName: "tls-secret-zeebe"

connectors:
  enabled: true
  inbound:
    mode: disabled

elasticsearch:
  master:
    replicaCount: 1
    # Request smaller persistent volumes.
    persistence:
      size: 15Gi

```

Do i need to enable identity to be able to connect to zeebe-gateway with the node-sdk? The documentation (github) states that it should work with an minimal setup too (without identity).

You als mentioned the client credentials. The only thing i found on how to configure these is with the camunda console which is an enterprise feature for self managed. So do i need an enterprise license to get this whole thing working or is there a “standard” client that i can use (i tought this would be the ZEEBE\_CLIENT\_ID=‘zeebe’ as shown in the documentation)?

Best regards.

---

<div class="post-metadata">

**Author:** ![maiksfd](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@maiksfd](https://forum.camunda.io/u/maiksfd)\
**Post date:** [June 10, 2024, 3:13pm UTC](https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939/4 "2024-06-10T15:13:53Z")

</div>

I found the solution. I had to use **ZEEBE\_ADDRESS** and not **ZEEBE\_GRPC\_ADDRESS** :

```auto
import { Camunda8 } from "@camunda8/sdk";
import path from "path";

const camunda = new Camunda8({
	ZEEBE_ADDRESS: 'zeebe.camunda.local:443',
	ZEEBE_CLIENT_ID: 'zeebe',
	ZEEBE_CLIENT_SECRET: 'zecret',
    CAMUNDA_OAUTH_DISABLED: true,
    CAMUNDA_CUSTOM_ROOT_CERT_PATH: path.join(process.cwd(), "cert-zeebe.pem")
});
const zeebe = camunda.getZeebeGrpcApiClient();

```

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [June 17, 2024, 3:14pm UTC](https://forum.camunda.io/t/connect-to-zeebe-gateway-over-ingress-controller-with-node-js-sdk/52939/5 "2024-06-17T15:14:21Z")

</div>

Closed on June 17, 2024, 3:14pm UTC

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