Is Kubernetes capable of assigning URLs depending on particular constraints/programming logic? The following is the high-level behavior that I'm after.
my.container.a.url.com
or my.container.a.url.net
depending on a particular criteria, such as if the container is for external or internal use.Without context on what you're trying to achieve it's quite hard to answer. But I'll try anyway.
In Kubernetes you don't expose bare containers, but you wrap them in Pods and expose services - which are sort of load balancers for a group of containers.
In your particular case, you can create two services, one for internal and the other for external use. The former is connected to all Pods (containers) for internal use, the latter to all Pods (containers) for external use.
You can learn more about service here: https://kubernetes.io/docs/concepts/services-networking/service/
Once you have a service, you still aren't able to connect to it from the outside world. Depending on your requirement you can:
NodePort
s https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport