# Serverstransport not working with kubernetes ingress

**URL:** <https://community.traefik.io/t/serverstransport-not-working-with-kubernetes-ingress/12211>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress\
**Created:** [October 22, 2021, 12:52pm UTC](https://community.traefik.io/t/serverstransport-not-working-with-kubernetes-ingress/12211 "2021-10-22T12:52:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![z3ky](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/z3ky/32/4220_2.png) [@z3ky](https://community.traefik.io/u/z3ky)\
**Post date:** [October 22, 2021, 12:52pm UTC](https://community.traefik.io/t/serverstransport-not-working-with-kubernetes-ingress/12211/1 "2021-10-22T12:52:59Z")

</div>

HTTPS connection from Traefik to a JuypterHub Kubernetes Service does only work with insecureSkipVerify = true set in the global configuration.

To avoid insecureSkipVerify, I tried to configure serverstransport in the ingress configuration:

```auto
kind: Ingress
apiVersion: networking.k8s.io/v1beta1
metadata:
  name: "jupyter"
  namespace: namespace-jupyterhub
  annotations:
    traefik.ingress.kubernetes.io/service.serversscheme: https
    traefik.ingress.kubernetes.io/service.serverstransport: jupyterhub@file
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.middlewares: secHeaders@file
    traefik.ingress.kubernetes.io/router.tls: "true"
spec:
  tls:
    - hosts:
        - xxx
      secretName: jupyterhub-tls
  rules:
    - host: xxx
      http:
        paths:
          - path: /
            backend:
              serviceName: proxy-public
              servicePort: 443

```

and a dynamic configuration

```auto
  [http.serversTransports.jupyterhub]
    serverName = "xxx"
    rootCAs = "/etc/ssl/chain.pem"

```

The serverstransport works with the same certificates for docker services.

---

<div class="post-metadata">

**Author:** ![kevinpollet](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/kevinpollet/32/1755_2.png) [@kevinpollet](https://community.traefik.io/u/kevinpollet)\
**Post date:** [November 7, 2021, 3:49pm UTC](https://community.traefik.io/t/serverstransport-not-working-with-kubernetes-ingress/12211/2 "2021-11-07T15:49:27Z")

</div>

Hello @z3ky and thanks for your interest in Traefik,

As described in the [documentation](https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-service), the following annotations have to be defined on the Kubernetes service (`proxy-public`).

```yaml
traefik.ingress.kubernetes.io/service.serversscheme: https
traefik.ingress.kubernetes.io/service.serverstransport: jupyterhub@file

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![z3ky](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/z3ky/32/4220_2.png) [@z3ky](https://community.traefik.io/u/z3ky)\
**Post date:** [November 8, 2021, 8:25am UTC](https://community.traefik.io/t/serverstransport-not-working-with-kubernetes-ingress/12211/3 "2021-11-08T08:25:59Z")

</div>

Oooh "On Service" Annotation... get it now. Thank you very much!
