# Use https protocol for endpoints in Kubernetes Services

**URL:** <https://discuss.kubernetes.io/t/use-https-protocol-for-endpoints-in-kubernetes-services/14051>\
**Category:** General Discussions\
**Created:** [December 10, 2020, 4:00pm UTC](https://discuss.kubernetes.io/t/use-https-protocol-for-endpoints-in-kubernetes-services/14051 "2020-12-10T16:00:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pri](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/pri/32/6436_2.png) [@Pri](https://discuss.kubernetes.io/u/Pri)\
**Post date:** [December 10, 2020, 4:00pm UTC](https://discuss.kubernetes.io/t/use-https-protocol-for-endpoints-in-kubernetes-services/14051/1 "2020-12-10T16:00:35Z")

</div>

Tried creating a Kubernetes endpoints service to invoke resource hosted outside the cluster via static IP’s over HTTPS protocol. Below is the endpoint code.

```auto
kind: Service
apiVersion: v1
metadata:
  name: serviceRequest
spec:
  ports:
    - port: 8081
      targetPort: 8094      
      
---
kind: Endpoints
apiVersion: v1
metadata:
  name: serviceRequest
subsets:
  - addresses:
      - ip: XX.XX.XX.XX // **external IP which is accessible as https://XX.XX.XX.XX:8094**
    ports:
      - port: 8094

```

But the above configuration is giving 400 Bad Request with message as “This combination of host and port requires TLS.”

Same is working for http not for https exposed “ip”.Could someone please guide how to achieve this.  
##Update1 This is how the flow is configured. [Ingress-\>service-\>endpoints](https://i.stack.imgur.com/PQkYT.png)
