# K8S GKE Deployment - Connect to Internal DNS

**URL:** https://discuss.elastic.co/t/k8s-gke-deployment-connect-to-internal-dns/323463
**Category:** Elasticsearch
**Created:** [January 19, 2023, 1:41am UTC](https://discuss.elastic.co/t/k8s-gke-deployment-connect-to-internal-dns/323463 "2023-01-19T01:41:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jennifer\_Klemisch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jennifer_klemisch/32/116059_2.png) [@Jennifer\_Klemisch](https://discuss.elastic.co/u/Jennifer_Klemisch)
#### Post date: [January 19, 2023, 1:41am UTC](https://discuss.elastic.co/t/k8s-gke-deployment-connect-to-internal-dns/323463/1 "2023-01-19T01:41:25Z")

</div>

I have a Terraform created GKE. Then I use Yaml files to install ES (8.6.0) and Kibana. As part of my terraform IAAS I reserve 2 IPs, and 2 "google\_dns\_record\_set" (es\_dns and kb\_dns) which sit on our company shared VPC subnet. My thought is to have the dns, & static IPs, and load 2 internal load balancers (one for kibana and one for ES) with my static IPs called out as loadBalancerIPs. In my mind I should then be able to go to my dns address in my browser.

I'm not sure my logic is sound, would love input on where my missing piece to the puzzle is.

- Deployed K8s with terraform
- use Terraform to reserve 2 IPs (one for Kibana and one for ES)
- used terraform to create a google\_dns-record\_set in our company shared vpc
- used terrafrom to create a gcp service account that can access the k8s cluster
- generated credentials file
- Deployed es with the configuration below.
- deployed a loadbalancer for es with the config below.
- but nothing is showing up when I go to https:dns address or the ip; what am I missing

es config yaml:  
\<  
apiVersion: [elasticsearch.k8s.elastic.co/v1](http://elasticsearch.k8s.elastic.co/v1)  
kind: Elasticsearch  
metadata:  
name: main  
spec:  
version: 8.6.0  
volumeClaimDeletePolicy: DeleteOnScaledownAndClusterDeletion  
secureSettings:

- secretName: gcs-credentials  
nodeSets:
  - name: ndpool  
count: 3  
config:  
node.store.allow\_mmap: false  
xpack.ml.enabled: true  
volumeClaimTemplates:
    - metadata:  
name: elasticsearch-data  
spec:  
accessModes:
      - ReadWriteOnce  
resources:  
requests:  
storage: 2Gi  
/\>

ES Load balancer Yaml: (kibana is similar)  
\<  
apiVersion: v1  
kind: Service  
metadata:  
name: eslb-https  
annotations:  
[networking.gke.io/load-balancer-type:](http://networking.gke.io/load-balancer-type:) "Internal"  
spec:  
type: LoadBalancer  
selector:  
[elasticsearch.k8s.elastic.co/name:](http://elasticsearch.k8s.elastic.co/name:) main  
ports:  
- protocol: TCP  
port: 443  
targetPort: 9200  
loadBalancerIP: 10.x.x.x  
/\>

---

<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: [February 16, 2023, 1:42am UTC](https://discuss.elastic.co/t/k8s-gke-deployment-connect-to-internal-dns/323463/2 "2023-02-16T01:42:22Z")

</div>

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