kubernetes-ingress icon indicating copy to clipboard operation
kubernetes-ingress copied to clipboard

nginx.ingress.kubernetes.io/backend-protocol":"HTTPS" not work

Open slehlib opened this issue 2 years ago • 7 comments

version : Image: nginx/nginx-ingress:2.2.2 kube version : v1.21.1 OS version; Red Hat Enterprise Linux Server release 7.9 (Maipo)

i have new application use https backend, i added the nginx.ingress.kubernetes.io/backend-protocol":"HTTPS" annotation but ingress use http. i have this msg in app log: 022-06-10 09:19:38 +0000 SSL error, peer: 10.233.102.237, peer cert: : #<Puma::MiniSSL::SSLError: OpenSSL error: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request - 156>

In the nginx/conf.d ngnix dont have change the proxy_pass http in proxy_pass https:// i modify manualy, restart nginx et now all work . this is my ingress file apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress namespace: app annotations: kubernetes.io/ingress.class: "nginx" ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" spec: tls:

hosts:
    app.compagny.com
    secretName: tls
    rules:
host: app.compagny.com
http:
paths:
- path: /
backend:
serviceName: svc
servicePort: 35415

slehlib avatar Jun 10 '22 10:06 slehlib

Hi @slehlib thanks for reporting!

Be sure to check out the docs while you wait for a human to take a look at this :slightly_smiling_face:

I've parsed the text of your issue and it looks like you might be mixing up the two Ingress Controllers, please take a look at this page to see the differences between nginxinc/kubernetes-ingress (this repo) and kubernetes/ingress-nginx.

Cheers!

github-actions[bot] avatar Jun 10 '22 10:06 github-actions[bot]

Terribly sorry for the confusion. The annotations nginx.ingress.kubernetes.io are specifically for the K8s community ingress controller project (which also uses NGINX). The annotations for this project are nginx.org and can be found here: https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/

Examples for using the Ingress resource with this project can be here: https://github.com/nginxinc/kubernetes-ingress/tree/v2.2.2/examples Examples for using the more powerful Custom Resources of this project can be found here: https://github.com/nginxinc/kubernetes-ingress/tree/v2.2.2/examples/custom-resources

brianehlert avatar Jun 10 '22 15:06 brianehlert

sorry for this am confused. Thank you for your help

slehlib avatar Jun 10 '22 19:06 slehlib

What is the alternative to nginx.ingress.kubernetes.io/backend-protocol":"HTTPS" for nginx inc ingress controller? Trying to deploy portainer with cert manager with nginx inc ingress but not able to configure it properly to get the certificates. Self test failing in cert manager. Wondering if the issue is with this annotation somehow.

uGiFarukh avatar Jul 04 '22 20:07 uGiFarukh

https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/#upstreamtls

brianehlert avatar Jul 05 '22 14:07 brianehlert

I am still confused on how to implement that annotation. An explanation would be very helpful. Thank you.

uGiFarukh avatar Jul 07 '22 11:07 uGiFarukh

The link I provided uses the CRDs of this project to implement TLS to the backend / upstream. Not an annotation.

Instead of using Ingress, you would use VirtualServer

brianehlert avatar Jul 07 '22 17:07 brianehlert

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Oct 06 '22 02:10 github-actions[bot]

This issue was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Oct 16 '22 02:10 github-actions[bot]