Creating an ExternalName Service
Services of type ExternalName can be used to proxify applications that are not actually running on your cluster, while still keeping the Service as a layer of abstraction that can be updated at any time.
Let's set the scene: you have a legacy production application running on Azure that you want to access from within your cluster. You can access this legacy application at myoldapp.mydomain.com
. However, your team is currently working on containerizing this application and running it on Kubernetes, and that new version is currently working in your dev
namespace environment on your cluster.
Instead of asking your other applications to talk to different places depending on the environment, you can always point to a Service called my-svc
in both your production (prod
) and development (dev
) namespaces.
In dev
, this Service could be a ClusterIP
Service that leads to your newly containerized application on Pods. The following YAML shows how the...