# Custom domain using Nginx proxy in kubernetes

**URL:** <https://discuss.elastic.co/t/custom-domain-using-nginx-proxy-in-kubernetes/250483>\
**Category:** Kibana\
**Created:** [September 30, 2020, 10:44am UTC](https://discuss.elastic.co/t/custom-domain-using-nginx-proxy-in-kubernetes/250483 "2020-09-30T10:44:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaykumars](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@ajaykumars](https://discuss.elastic.co/u/ajaykumars)\
**Post date:** [September 30, 2020, 10:44am UTC](https://discuss.elastic.co/t/custom-domain-using-nginx-proxy-in-kubernetes/250483/1 "2020-09-30T10:44:13Z")

</div>

Hi,  
Since using [https://12312jsdjsfavhjdf.elastic.com](https://12312jsdjsfavhjdf.elastic.com) is a pain point for our customers. So to have a custom domain like [https://kibana.domain.com](https://kibana.domain.com) I have an Nginx proxy in front of the elastic cloud so our custom domain will be used to access kibana and requests will be routed through the proxy. it was working fine to some extent yet suddenly it has become too slow. any other ways to achieve this with better performance?

steps:

1. Create an Nginx image with [https://12312jsdjsfavhjdf.elastic.com](https://12312jsdjsfavhjdf.elastic.com) as a proxy pass.  
server{  
listen 80;  
server\_name localhost;  
location /{  
proxy\_pass "[https://12312jsdjsfavhjdf.elastic.com](https://12312jsdjsfavhjdf.elastic.com)";

}}  
2. Create a deployment and service with the above-created image.  
3. Have an Nginx proxy ingress on Kubernetes in front of service.

apiVersion: extensions/v1beta1  
kind: Ingress  
metadata:  
name: kibanaingress  
namespace: dev  
annotations:  
[kubernetes.io/ingress.class:](http://kubernetes.io/ingress.class:) kibanaingress  
spec:  
tls:

- hosts:
  - [kibana.domain.com](http://kibana.domain.com)  
secretName: combined  
rules:

- host:  
http:  
paths:
  - backend:  
serviceName: kibana-service  
servicePort: 80  
path: /

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [October 5, 2020, 5:28pm UTC](https://discuss.elastic.co/t/custom-domain-using-nginx-proxy-in-kubernetes/250483/2 "2020-10-05T17:28:18Z")

</div>

Are you doing cache invalidation anywhere? I don't why any of the methods would impact Kibana that much other than maybe doing cache invalidation.

---

<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:** [November 2, 2020, 5:28pm UTC](https://discuss.elastic.co/t/custom-domain-using-nginx-proxy-in-kubernetes/250483/3 "2020-11-02T17:28:20Z")

</div>

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