How to expose services using TCP ports in nginx_values and set Load balancer hostname in one pass? #912
Replies: 4 comments 1 reply
-
Little update on exposing a service in the default namespace through TCP ports.
indeed I was trying the correct method, just wrongly indented it in
I can see the two TCP ports opened..
On the console the 2 new services (ports) appear as unhealthy dough. |
Beta Was this translation helpful? Give feedback.
-
@vinnytwice Don't worry about the health status, we do not have the health check endpoints well defined for all ports, that you need to do yourself because it changes depending on your ports. |
Beta Was this translation helpful? Give feedback.
-
Also check this PR #908, the changes will be shipped in the next release coming in a day or two. |
Beta Was this translation helpful? Give feedback.
-
@mysticaltech I tested this unhealthy status for tcp connections and it appears to happen only when i use arm nodes. I'll do more testing but so far when using x86 nodes tcp connections are healthy. |
Beta Was this translation helpful? Give feedback.
-
Description
Hi, and thanks for the project once again.
I’m trying setting up nginx controller using the
nginx_values
parameter as I need need to both assign a hostname (for Certificates HTTP-01 LE challenge) and expose a Service in the default namespace using two TCP ports.As read in this issue solution suggestion #354 (comment) I’m setting the load balancer hostname in the controller.service.annotations portion in
nginx_values
and I made sure to wait enough for my A and AAAA DNS records to propagate.I realised that when I set the
"load-balancer.hetzner.cloud/hostname": “<my A record>.<my domain>”
then provisioning the infrastructure hangs until Terraform throws the error:If I instead apply it in a second pass by uncommenting the line and then apply the change it succeeds with no errors.
Is it only settable in a second pass?
Now, for the TCP port exposing part, for my cluster in Azure I installed ingress-nginx controller using Helm chart directly by a “helm_release” terraform resource with the TCP ports to service exposing done as:
I know I could manually use a
ConfigMap
, edit thenginx-ingress-nginx-controller
Service
andDeployment
created in the nginx namespace as per docs at https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/ and done in this issue #818 (comment) but I rather edit thenginx_values
as I see suggested in the same issue here #818 (comment) as I prefer to set up the infra directly in one go (or two considering the load balancer hostname parte above) with Terraform.I’m trying setting the
nginx_values
asAs you can see I tried various indentations or parameters ( looking at the chart here https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml) but I guess that my tried approach `tcp: 7687: “default/tls-secret” is only valid for installing nginx controller using Helm charts, as when I check I don’t see those ports opened :
How do I set those ports in
nginx_values
?Many many thanks.
Vincenzo
Kube.tf file
Screenshots
No response
Platform
MacBook Air M1
Beta Was this translation helpful? Give feedback.
All reactions