kube-hetzner / terraform-hcloud-kube-hetzner

Optimized and Maintenance-free Kubernetes on Hetzner Cloud in one command!
MIT License
2.43k stars 371 forks source link

Add solution to example docs: Request to itself takes too long. #496

Closed mysticaltech closed 1 year ago

mysticaltech commented 1 year ago

Discussed in https://github.com/orgs/kube-hetzner/discussions/478

Originally posted by **GranderStark** December 15, 2022 Lets imagine we have external dns address, that we want to request from one of the virtual machines provided by hetzner(kubernetes node). Request chain looks like this: (one of variants): [hetzner-vm-1] -> [dns] -> [hetzner LB/klipper LB] -> [ internal-network(created by this repo) ] -> [ traefik/nginx ] -> [ hetzner-vm-1/2/3 ] -> [ pod ] -> [ container ] **Problem**: request from the inside of the node with dns address pointed to this exact cluster takes 1.04 minutes to respond. As an example - `wget -S --spider https://{YOUR-DNS-HERE}/` from inside of the vm. Example close to actual usage - I'm hosting docker container registry in my cluster, I'm want my cluster to be able to download anything from this DCR using DNS. From any other place(my laptop, as example) - everything is ok. From inside the cluster CRIO gets timeout because it takes 1m4sec and timeout is hardcoded to 30 sec. I have tried to contact with hetzner support - they respond that everything is ok. Problem started after 21.11.2022. Nodes used Control planes - cpx11 - 3 Agent - cpx21 - 1 Storage - cpx21 - 1 Repo version - latest master (9b4e813dadbc3021c39d223f06e53fdb2976a60a)
mysticaltech commented 1 year ago

This is fixed in the upcoming release, we've added a lb_hostname to proactively set a hostname and avoid DNS related slowdowns on internal to internal comms.