# Kong removes https when sending request to upsteam service

**URL:** <https://discuss.konghq.com/t/kong-removes-https-when-sending-request-to-upsteam-service/7948>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [February 24, 2021, 9:21pm UTC](https://discuss.konghq.com/t/kong-removes-https-when-sending-request-to-upsteam-service/7948 "2021-02-24T21:21:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbellrose](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@bbellrose](https://discuss.konghq.com/u/bbellrose)\
**Post date:** [February 24, 2021, 9:21pm UTC](https://discuss.konghq.com/t/kong-removes-https-when-sending-request-to-upsteam-service/7948/1 "2021-02-24T21:21:02Z")

</div>

I am testing a kong ingress to the kubernetes dasboard. I noticed that when my request comes in as https, kong ingress receives it, but then sends on to the dashboard service as http…

[error] 22#0: \*16441569 readv() failed (104: Connection reset by peer) while reading upstream, client: 172.16.44.192, server: kong, request: “GET /db HTTP/2.0”, upstream: "[http://172.16.127.154:8443](http://172.16.127.154:8443)

How do I get kong to keep https?

Here is my ingress:  
apiVersion: [networking.k8s.io/v1](http://networking.k8s.io/v1)  
kind: Ingress  
metadata:  
name: dashboard  
annotations:  
[kubernetes.io/ingress.class:](http://kubernetes.io/ingress.class:) kong  
[konghq.com/protocol:](http://konghq.com/protocol:) “https”  
namespace: kubernetes-dashboard  
spec:  
rules:

- host:mydashboard.test.com  
http:  
paths:
  - path: /db  
pathType: Prefix  
backend:  
service:  
name: kubernetes-dashboard  
port:  
number: 443

And my service:  
Name: kubernetes-dashboard  
Namespace: kubernetes-dashboard  
Labels: k8s-app=kubernetes-dashboard  
Annotations:   
Selector: k8s-app=kubernetes-dashboard  
Type: ClusterIP  
IP Families:   
IP: 10.109.116.58  
IPs: 10.109.116.58  
Port: https 443/TCP  
TargetPort: 8443/TCP  
Endpoints: 172.16.127.154:8443  
Session Affinity: None  
Events:

---

<div class="post-metadata">

**Author:** ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)\
**Post date:** [February 26, 2021, 7:20pm UTC](https://discuss.konghq.com/t/kong-removes-https-when-sending-request-to-upsteam-service/7948/2 "2021-02-26T19:20:19Z")

</div>

The [konghq.com/protocol annotation](https://docs.konghq.com/kubernetes-ingress-controller/1.1.x/references/annotations/#konghqcomprotocol) needs to be applied to your Service rather than your Ingress. That controls the protocol the proxy uses for upstream traffic.

Ingresses support a [konghq.com/protocols annotation](https://docs.konghq.com/kubernetes-ingress-controller/1.1.x/references/annotations/#konghqcomprotocol) (the names are similar, but not the same–the Service annotation is singular protocol, whereas the Ingress annotation is the plural protocol **s** ). That determines which protocols are accepted for inbound client traffic. Setting that to `https` only will redirect HTTP clients to HTTPS, using the [konghq.com/https-redirect-status-code annotation](https://docs.konghq.com/kubernetes-ingress-controller/1.1.x/references/annotations/#konghqcomhttps-redirect-status-code).

---

<div class="post-metadata">

**Author:** ![bbellrose](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@bbellrose](https://discuss.konghq.com/u/bbellrose)\
**Post date:** [March 1, 2021, 12:56pm UTC](https://discuss.konghq.com/t/kong-removes-https-when-sending-request-to-upsteam-service/7948/3 "2021-03-01T12:56:57Z")

</div>

Ok, thanks. I will look at that.

Brian
