-
Hey guys, I have a problem I'm hammering my head against for some time now. My goal is to be able to create my own app and db resources that refer to services running inside a Kubernetes cluster, without using NodePort service type and auto-discovery. But I can make it work, and getting DNS-related errors. This is how it looks in the logs when I do something like
Similar problem occurs when I open an application:
My setup looks like this:
I use Terraform to wind up some services (e.g. Postgres, Redis, code-server) and manually define Teleport resources. At different points in time services were running on k0s controller (which was in single mode at that time) and worker nodes. If I define these resources with URI based on svc.cluster.local, I see DNS errors mentioned above. If I allow agent to discover applications, I can see that generated Teleport resources contain svc.cluster.local URIs, and these auto-discovered applications work. I couldn't get DB auto-discovery working, so can't report on that. I've switched agent image to My guess is, auto-discovered apps are in some way "bound" to agent, and thus benefit from in-cluster DNS resolution, while my manually created apps are "bound" to Teleport cluster controller which uses host's (not Kubernetes') DNS resolution and thus fails to do proper look-ups. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Could you please you share some example Teleport configs/values that would allow reproduction of your issue? I think you are partly correct, but my understanding is that the |
Beta Was this translation helpful? Give feedback.
@webvictim's answer is correct.
You appear to be using dynamic registration. I recommend having a read through the docs to better understand how this feature works.
In a nutshell, you have registered an app named
test
with terraform that contains the following labels:Your app service is declaring that it can proxy the traffic for any and all apps with these labels:
If you are…