Replies: 3 comments 2 replies
-
Hi @leisefuxX, This is not a bug - the To add custom ports to your load balancer, you need to use the ingress controller configuration. Since you have several ingress controllers commented out in your config, I'll show you how to do it for each one: For Traefik (default):# Add this to your module configuration:
ingress_controller = "traefik" # This is the default
traefik_additional_ports = [
{
name = "git-ssh"
port = 22
exposedPort = 22
}
]
# Then configure your traefik_values to handle the port:
traefik_values = <<EOT
ports:
git-ssh:
port: 22
exposedPort: 22
expose: true
protocol: TCP
# ... rest of your traefik configuration
EOT For Nginx:If you're using nginx, you would need to configure it through the ingress_controller = "nginx"
nginx_values = <<EOT
tcp:
22: "default/your-git-service:22"
controller:
# ... your existing nginx config
EOT Important Notes:
The module version 2.17.4 you're using is recent and supports these configurations. There's no need to downgrade or look for a non-existent Would you like help setting up the complete configuration for your specific ingress controller? |
Beta Was this translation helpful? Give feedback.
-
hello @mysticaltech i am using the defaults (traefik). i added your snippet (traefik_additional_ports) and added your code to my traefik_values codeblock to my so my kube.tf, planned and applied my kube.tf to my cluster and then traefik won't configure and keeps crashing... i am using stock and default kube.tf, only added a hostname to my loadbalancer so far... i want to open port 22 on my loadbalancer and forward it (ideally) to port 2222 on my forgejo (selfhosted git) pod ... i added a ssh service definition on my forgejo.yaml like so: service:
type: ClusterIP
ports:
http: 3000
ssh:
enabled: true
type: ClusterIP
port: 2222
externalTrafficPolicy: Cluster what am i missing? why does your code crash my traefik? and please keep the window to respond longer than 8 hours (: |
Beta Was this translation helpful? Give feedback.
-
it`s a stock installation. where can i find the helm values? i only applied the kube.tf to a fresh cluster. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
hey git'sters!
in addition to port 80 and 443 on the loadbalancer, I would like to forward port 22 to my worker nodes (for a git installation) aka "add a service to the loadbalancer". i want this state to be reflected by my kube.tf because when i add it by hand, the service tends to dissappear within minutes
For this I first asked the KH assistant, which gave me a code that is conclusive for me
if I now enter this code in my kube.tf and try to use it, I get the error:
I've fed the error code back to KH Agent (which imho knows more than me about this topic) which responded with
i am using version 2.17.4 according to my .terraform/modules/modules.json
❯ more modules.json {"Modules":[{"Key":"","Source":"","Dir":"."},{"Key":"kube-hetzner","Source":"registry.terraform.io/kube-hetzner/kube-hetzner/hcloud","Version":"2.17.4","Dir":".terraform/modules/kube-hetzner"},{"Key":"kube-hetzner.agents","Source":"./modules/host","Dir":".terraform/modules/kube-hetzner/modules/host"},{"Key":"kube-hetzner.control_planes","Source":"./modules/host","Dir":".terraform/modules/kube-hetzner/modules/host"}]}
What am I doing wrong, or what is the correct code?
Kube.tf file
Screenshots
No response
Platform
Linux
Beta Was this translation helpful? Give feedback.
All reactions