Question

LoadBalancer not working after updates

Posted July 5, 2021 95 views
NginxNetworkingKubernetes

I recently upgraded my Kubernetes cluster from 1.20.8-d0.2 to 1.21.2-do.1. This caused cert-manager to no longer work (See this issue)

I decided to use this opportunity to upgrade the load balancer as well, as we were still using the deprecated chart from the Helm stable repository. However, now the load balancer seems to be having issues as well.

After pruning the cert-manager and the nginx-ingress, I used the following to re-install them:

helm repo add nginx https://helm.nginx.com/stable
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install nginx-ingress nginx/nginx-ingress \
  --create-namespace \
  --namespace nginx-ingress \
  --version 0.10.0 \
  --set-string 'controller.config.entries.compute-full-forwarded-for=true' \
  --set-string 'controller.config.entries.enable-real-ip=true' \
  --set-string 'controller.config.entries.use-forwarded-headers=true' \
  --set-string 'controller.config.entries.use-proxy-protocol=true' \
  --set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-enable-proxy-protocol=true' \
  --set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-hostname=appsemble.review'
helm install cert-manager jetstack/cert-manager \
  --create-namespace \
  --namespace cert-manager \
  --version 1.4.0 \
  --set 'installCRDs=true'
kubectl create secret generic digitalocean-dns \
  --from-literal "access-token=$DO_ACCESS_TOKEN" \
  --namespace cert-manager
kubectl apply -f https://gitlab.com/appsemble/infra/wikis/config/development/cluster-issuer.yaml

I also configured the DNS settings in the DigitalOcean cloud console to match the new load balancer (and ensured they are applied using dig.

However, if I make a request now, I get the following output:

$ curl -vv https://staging.appsemble.review
*   Trying 188.166.201.193:443...
* TCP_NODELAY set
* Connected to staging.appsemble.review (188.166.201.193) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* error:1408F10B:SSL routines:ssl3_get_record:wrong version number
* Closing connection 0
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

This is the matching log from the nginx-ingress pod

10.133.58.69 - - [05/Jul/2021:14:09:31 +0000] "PROXY TCP4 84.82.161.81 10.18.1.24 34850 443" 400 157 "-" "-" "-"

I also tried if it helps to add ingressClassName: nginx to my ingress, but that doesn’t help either.

What am I missing?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

This is a bug in DigitalOcean Kubernetes version 1.21.2-do.1 and has been fixed in 1.21.2-do.2