# Http error 400 The plain HTTP request was sent to HTTPS port

**URL:** <https://discuss.kubernetes.io/t/http-error-400-the-plain-http-request-was-sent-to-https-port/18460>\
**Category:** microk8s\
**Created:** [December 20, 2021, 9:13am UTC](https://discuss.kubernetes.io/t/http-error-400-the-plain-http-request-was-sent-to-https-port/18460 "2021-12-20T09:13:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![behuf](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/behuf/32/6691_2.png) [@behuf](https://discuss.kubernetes.io/u/behuf)\
**Post date:** [December 20, 2021, 9:13am UTC](https://discuss.kubernetes.io/t/http-error-400-the-plain-http-request-was-sent-to-https-port/18460/1 "2021-12-20T09:13:23Z")

</div>

Hello,

I have two services in my kubernetes cluster (based on microk8s)

reachable on:

[search.example.com](http://search.example.com) and  
[api.example.com](http://api.example.com)

Now it is the case that the access from the [api.example.com](http://api.example.com) pod to [search.example.com](http://search.example.com) pod throws an error - the error comes from niginx

The service pods all run on http and 80 and TCP.

How can I solve the problem with a clean port forwarding via ingress controller?

See my example configuration:

```auto
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: behuf-ingress
  namespace: behuf-example
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "600m"
    nginx.org/client-max-body-size: "600m"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
  tls:
  - hosts:
    - api.example.com
    - search.example.com
    secretName: tls-secret
  rules:
  - host: api.example.com
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: example-erp-service
            port:
              number: 80
  - host: search.example.com
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: example-search-service
            port:
              number: 80
  

```
