-
Hello! Long story short:
I include my whole configuration below:
hetzner_token: xxx
cluster_name: candao-dev
kubeconfig_path: "./kubeconfig"
k3s_version: v1.28.3+k3s2
public_ssh_key_path: "~/.ssh/id_rsa.pub"
private_ssh_key_path: "~/.ssh/id_rsa"
use_ssh_agent: true
ssh_allowed_networks:
- 0.0.0.0/0
api_allowed_networks:
- 0.0.0.0/0
schedule_workloads_on_masters: false
masters_pool:
instance_type: cx21
instance_count: 1
location: nbg1
worker_node_pools:
- name: small
instance_type: cpx21
instance_count: 1
location: nbg1
- name: big
instance_type: cpx31
instance_count: 0
location: nbg1
autoscaling:
enabled: true
min_instances: 0
max_instances: 1 ✅ and I created cluster using:
controller:
kind: DaemonSet
nginxDebug: true
logLevel: 3
service:
annotations:
load-balancer.hetzner.cloud/location: nbg1
load-balancer.hetzner.cloud/name: candao-dev
load-balancer.hetzner.cloud/use-private-ip: true
load-balancer.hetzner.cloud/uses-proxyprotocol: true
load-balancer.hetzner.cloud/hostname: domain.com
load-balancer.hetzner.cloud/http-redirect-https: false ✅ and I installed the ingress-nginx using helm: I also tried to deploy a simple
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world
labels:
app: hello-world
spec:
replicas: 1
selector:
matchLabels:
app: hello-world
template:
metadata:
labels:
app: hello-world
spec:
containers:
- name: hello-world
image: rancher/hello-world
ports:
- containerPort: 80
resources:
limits:
memory: "128Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: hello-world
spec:
selector:
app: hello-world
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hello-world
spec:
ingressClassName: nginx
rules:
- host: hello.domain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hello-world
port:
number: 80 ❌ and when I try to reach the cluster I get $ curl hello.domain.com
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html> $ curl domain.com
<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
I've tried to launch the nginx controller in debug mode, but I didn't find anything of use. I include some logs from nginx controller pod
Please 🙏🏻 if anyone could at least point me in some direction I would really appreciate. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, this is not an issue with hetzner-k3s, but a requirement for the ingress controller if you enable the proxy protocol on the load balancer in order to preserve the client IP address. You need to enable the proxy protocol in Nginx as well, otherwise you'll get that error. See https://github.com/vitobotta/hetzner-k3s/blob/main/wiki/Setting%20up%20a%20cluster.md at step 19. |
Beta Was this translation helpful? Give feedback.
-
I've reopened it and will convert it to a discussion since it's not a problem with my tool. |
Beta Was this translation helpful? Give feedback.
Hi,
this is not an issue with hetzner-k3s, but a requirement for the ingress controller if you enable the proxy protocol on the load balancer in order to preserve the client IP address. You need to enable the proxy protocol in Nginx as well, otherwise you'll get that error. See https://github.com/vitobotta/hetzner-k3s/blob/main/wiki/Setting%20up%20a%20cluster.md at step 19.