# Error while connecting to temporal in Kubernetes

**URL:** <https://community.temporal.io/t/error-while-connecting-to-temporal-in-kubernetes/1956>\
**Category:** Community Support\
**Tags:** go-sdk, mysql, helm, worker\
**Created:** [April 19, 2021, 7:12am UTC](https://community.temporal.io/t/error-while-connecting-to-temporal-in-kubernetes/1956 "2021-04-19T07:12:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mreddimasi](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mreddimasi](https://community.temporal.io/u/mreddimasi)\
**Post date:** [April 19, 2021, 7:12am UTC](https://community.temporal.io/t/error-while-connecting-to-temporal-in-kubernetes/1956/1 "2021-04-19T07:12:09Z")

</div>

Hi,

I’ve deployed temporal using helm on to our test environment and created another deployment with only a worker.

`helm upgrade --install temporal -f temporaltest\values\values.mysql.yaml --set elasticsearch.enabled=false --set prometheus.enabled=false --set grafana.enabled=false --set elasticsearch.enabled=false --set kafka.enabled=false --timeout 900s -n workflow temporaltest\`

The temporal services come up fine,

`  
λ kubectl get svc -n workflow

```
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
temporal-admintools ClusterIP 10.102.41.223 <none> 22/TCP 24h
temporal-frontend ClusterIP 10.101.214.79 <none> 7233/TCP 24h
temporal-frontend-headless ClusterIP None <none> 7233/TCP,9090/TCP 24h
temporal-history-headless ClusterIP None <none> 7234/TCP,9090/TCP 24h
temporal-matching-headless ClusterIP None <none> 7235/TCP,9090/TCP 24h
temporal-web ClusterIP 10.111.5.251 <none> 8088/TCP 24h
temporal-worker-headless ClusterIP None <none> 7239/TCP,9090/TCP 24h

```

`

but when trying to connect to the temporal from the worker deployment, It fails with an error stating

`health check error: context deadline exceeded`

The HostPort in the worker is: temporal-frontend.workflow.svc.cluster.local:7223

---

<div class="post-metadata">

**Author:** ![mreddimasi](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mreddimasi](https://community.temporal.io/u/mreddimasi)\
**Post date:** [April 19, 2021, 7:18am UTC](https://community.temporal.io/t/error-while-connecting-to-temporal-in-kubernetes/1956/2 "2021-04-19T07:18:01Z")

</div>

The following is how I’m trying to connect in the worker deployment, the hostPort value is temporal-frontend.workflow.svc.cluster.local:7223, I’ve even tried connecting using headless, but still get the same result

```
temporalClient, err := client.NewClient(client.Options{

        HostPort: hostPort,

    })

    if err != nil {

        log.Println("Error while connecting to temporal: ", err)

        log.Fatalf("Unable to create Temporal Client Connection to: %s\n", hostPort)

    }
```
