# How to test client connection with fdb EKS

**URL:** <https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008>\
**Category:** Kubernetes Operator\
**Tags:** operator\
**Created:** [June 15, 2023, 4:47pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008 "2023-06-15T16:47:14Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [June 15, 2023, 4:47pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/1 "2023-06-15T16:47:14Z")

</div>

how to test client connection with fdb EKS

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [June 16, 2023, 8:49am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/2 "2023-06-16T08:49:18Z")

</div>

Can you add some more context here? This is a very generic question. Are those clients running in the same EKS cluster, outside of EKS, in the same namespace, outside of AWS, in different AWS account/VPC?

In general you can test connectivity by getting the connection string from the `FoundationDBCluster` status and in the most simplest case you use `fdbcli` to connect to the cluster.

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [June 16, 2023, 6:25pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/3 "2023-06-16T18:25:11Z")

</div>

basically i want to test by deploying the client myself in the same EKS cluster… with this file , so i just need to copy this file and apply it ?

> <https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/config/samples/client.yaml>

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [June 20, 2023, 11:01am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/4 "2023-06-20T11:01:18Z")

</div>

Using the Deployment from this file should be enough if you already have a cluster running. You have to adjust the name of the ConfigMap that should be mounted by the deployment.

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [June 20, 2023, 6:02pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/5 "2023-06-20T18:02:03Z")

</div>

do u mean this part ? also after adding these details ? how to test the connection with the client ?

- configMap:  
items:  
- key: cluster-file  
path: fdb.cluster  
name: test-cluster-config  
name: config-map
  - emptyDir: {}  
name: dynamic-conf

what is this part ? do we need to change this ?

- emptyDir: {}  
name: dynamic-conf

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [June 21, 2023, 8:21pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/6 "2023-06-21T20:21:27Z")

</div>

any help is appreciated

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [June 22, 2023, 6:33am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/7 "2023-06-22T06:33:45Z")

</div>

The `dynamic-conf` is used to copy the fdb client libraries to the client: [fdb-kubernetes-operator/config/tests/client/client.yaml at main · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/config/tests/client/client.yaml#L18-L35)

This line must be updated: [fdb-kubernetes-operator/config/tests/client/client.yaml at main · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/config/tests/client/client.yaml#L64) in the example the expectation is that the created cluster was called `test-cluster`, if the name is different you have to modify it.

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [June 22, 2023, 2:28pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/8 "2023-06-22T14:28:09Z")

</div>

thanks, i got the client.yaml deployed and got 2 pods for client.  
now how do we test the connections from client to fdb ? i got into the client pod and did fdbcli and it did not work.

these are my pods now  
msubramanyam@FAN-J44M6R9FG4 ~ % kubectl get pods -n platform-fdb  
NAME READY STATUS RESTARTS AGE  
test-cluster-client-f6d9d54b8-9tdx9 1/1 Running 0 31h  
test-cluster-client-f6d9d54b8-cdz82 1/1 Running 0 31h  
test-cluster-cluster-controller-1 2/2 Running 0 6d10h  
test-cluster-log-1 2/2 Running 0 6d10h  
test-cluster-log-2 2/2 Running 0 6d10h  
test-cluster-log-3 2/2 Running 0 6d10h  
test-cluster-log-4 2/2 Running 0 6d10h  
test-cluster-new-cluster-controller-1 2/2 Running 0 6d10h  
test-cluster-new-log-1 2/2 Running 0 6d10h  
test-cluster-new-log-2 2/2 Running 0 6d10h  
test-cluster-new-log-3 2/2 Running 0 6d10h  
test-cluster-new-log-4 2/2 Running 0 6d10h  
test-cluster-new-storage-1 2/2 Running 0 6d10h  
test-cluster-new-storage-2 2/2 Running 0 6d10h  
test-cluster-new-storage-3 2/2 Running 0 6d10h  
test-cluster-storage-1 2/2 Running 0 6d10h  
test-cluster-storage-2 2/2 Running 0 6d10h  
test-cluster-storage-3 2/2 Running 0 6d10h

root@test-cluster-client-f6d9d54b8-cdz82:/app# fdbcli -C /var/dynamic-conf/fdb.cluster  
Invalid cluster file `/var/dynamic-conf/fdb.cluster’: 2104 Connection string invalid  
root@test-cluster-client-f6d9d54b8-cdz82:/app#

[10:00](https://fanatics.slack.com/archives/C0551A4RP61/p1687453205671029)

root@test-cluster-client-f6d9d54b8-cdz82:/app# cat /var/dynamic-conf/fdb.cluster  
test\_cluster:s0xugqpQz2rKGX3L0cDrslBNXGSp967O@test-cluster-log-1.test-cluster.platform-fdb.svc.cluster.local:4501,test-cluster-log-2.test-cluster.platform-fdb.svc.cluster.local:4501,test-cluster-log-3.test-cluster.platform-fdb.svc.cluster.local:4501

root@test-cluster-client-f6d9d54b8-cdz82:/usr/bin# fdbcli -v  
FoundationDB CLI 6.1 (v6.1.12)  
source version 90ba203c166c62ae9173b2523081a0c6afaa1604  
protocol fdb00b061060001

not sure i am trying the right thing

[10:23](https://fanatics.slack.com/archives/C0551A4RP61/p1687454606513429)

what is the expectation from client.yaml

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [June 26, 2023, 7:07am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/9 "2023-06-26T07:07:06Z")

</div>

The sample App I basically this one: [foundationdb/packaging/docker/samples/python at main · apple/foundationdb · GitHub](https://github.com/apple/foundationdb/tree/main/packaging/docker/samples/python#python-sample-using-docker-compose), you should be able to make the according API calls from that document.

You are using DNS names in the connection string, so it is expected that your fdbcli version 6.1 is not working as the DNS support was added in 7.0. The fdbcli binary should be under `/var/dynamic-conf` (see: [fdb-kubernetes-operator/config/samples/client.yaml at main · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/config/samples/client.yaml#L54C22-L54C39)), if you use the fdbcli version 7.0+ connecting to the cluster should work.

Since you’re using DNS names in the connection string, you want to use this client config: [fdb-kubernetes-operator/config/tests/dns/client.yaml at main · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/config/tests/dns/client.yaml) (it is basically the same as the other one but not copying the 6.3 library and binaries, as those are useless for DNS connection strings).

The DNS limitation are documented here: [fdb-kubernetes-operator/docs/manual/customization.md at main · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/docs/manual/customization.md#using-dns)

```auto
FDB supports to use DNS in the cluster file since 7.1 and the operator can make use of that

```

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [June 29, 2023, 6:18pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/10 "2023-06-29T18:18:58Z")

</div>

ok thanks, so do i also need the Kind: service part in this file ?

[fdb-kubernetes-operator/config/tests/dns/client.yaml at main · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/main/config/tests/dns/client.yaml).

Previously u said only deployment section is enough

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [June 30, 2023, 8:03am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/11 "2023-06-30T08:03:18Z")

</div>

Only the Deployment section is needed. You can use the port-forward command from kubectl to access the APIs: [Use Port Forwarding to Access Applications in a Cluster | Kubernetes](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [August 1, 2023, 5:27pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/12 "2023-08-01T17:27:23Z")

</div>

## thanks , will try tas u siggested , but one more question, what is this part in the client.yaml and why we dont need it

apiVersion: v1  
kind: Service  
metadata:  
name: test-cluster-client  
labels:  
app: test-cluster-client  
spec:  
selector:  
app: test-cluster-client  
type: LoadBalancer  
ports:  
- port: 9562  
targetPort: 5000

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [August 2, 2023, 6:26am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/13 "2023-08-02T06:26:00Z")

</div>

> [@Minaxi](#):
>
> ## thanks , will try tas u siggested , but one more question,
> 
> what is this part in the client.yaml and why we dont need it
> 
> apiVersion: v1  
> kind: Service  
> metadata:  
> name: test-cluster-client  
> labels:  
> app: test-cluster-client  
> spec:  
> selector:  
> app: test-cluster-client  
> type: LoadBalancer  
> ports:
> 
> - port: 9562  
> targetPort: 5000

This will create a Kubernetes service to expose the test client, depending on the configuration of your Kubernetes cluster, this might expose the application to the public internet. There is no need for this, as you can access the client application with the port-forwarding feature: [Use Port Forwarding to Access Applications in a Cluster | Kubernetes](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/).

---

<div class="post-metadata">

**Author:** ![johscheuer](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@johscheuer](https://forums.foundationdb.org/u/johscheuer)\
**Post date:** [August 2, 2023, 6:40am UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/14 "2023-08-02T06:40:22Z")

</div>

JFYI: I removed the service in this PR: [Remove the client service in the sample by johscheuer · Pull Request #1772 · FoundationDB/fdb-kubernetes-operator · GitHub](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/1772) as it seems to add additional confusion and is not required.

---

<div class="post-metadata">

**Author:** ![Minaxi](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Minaxi](https://forums.foundationdb.org/u/Minaxi)\
**Post date:** [August 2, 2023, 5:39pm UTC](https://forums.foundationdb.org/t/how-to-test-client-connection-with-fdb-eks/4008/15 "2023-08-02T17:39:25Z")

</div>

thanks for your clarification, in our case we are going to have the ingress.yaml to to expose the application, i think that will serve the same purpose , is that correct?
