Kubernetes ingress-nginx fails when accessing the host from within the cluster

4/19/2021

I've got a problem with ingress-nginx. Which is working if I access the host publicly. However, accessing the host from within the cluster seems to fail. PS: I installed nginx-ingress as DigitalOcean one-click install suggestion. But I don't think the problem has in DO. I've been trying find and solve this issue for last 3 days.

2021/04/19 07:40:28 [error] 887#887: *2244049 broken header: "���'V�����Y%��i�����:U��Ta�fv�n
                                                                                              mg
                                                                                                {>3�����B� �ջ��+Mw���hc��ސZ�,�+�0��.�2���/��-�1�" while reading PROXY protocol, client: 10.244.3.30, server: 0.0.0.0:443
2021/04/19 07:40:28 [error] 887#887: *2244050 broken header: "������b���Tڒ�1��w0���zF�A<� �e�USs!��l�JOca�"�� *)�˄Z�,�+�0��.�2���/��-�1" while reading PROXY protocol, client: 10.244.3.30, server: 0.0.0.0:443

I tested it by SSLPoke, got same result. This is testing it within as cluster. enter image description here

the result from curl in pod (within cluster), but when i check it publicly it's working right:

enter image description here

the configuration in digitalocean loadbalancer

enter image description here

-- yondkoo
digital-ocean
kubernetes
nginx-ingress

1 Answer

3/23/2022

Inside the cluster you should use pure http without SSL.

SSL is used only from "outside"

-- Ondřej Kolman
Source: StackOverflow