Skip to main content

APIs from External URLs

External Services refer to remote APIs that are located outside a Kubernetes cluster.


Traefik Hub uses the ExternalName Service of Kubernetes to manage APIs which are running outside the Kubernetes cluster, such as VMs or other systems.

Using an External Domain Name

ExternalName Services don't have selectors, or any defined ports or endpoints, therefore, you can use an ExternalName Service to direct traffic to an external Service.

Using an external domain name service tells the system that the DNS name in the externalName field ( is the location of the resource that backs the service.

When a DNS request is made against the Kubernetes DNS server, it returns the externalName in a CNAME record, informing the client to look up the returned name to get the IP address.

ExternalName Services are implemented at the DNS level. A CNAME DNS record is created for the service. Therefore, clients connecting to the service will connect to the external service directly.

Managing external URLs Using CRDs

spec.typeThe Kubernetes Service type, for example, ExternalName.Yes
spec.type.externalNameSpecifies the location (FQDN) at which that external Service can be reached at, for example,
spec.type.ports.portSpecifies the reachable port of the external Service.No


Defines ExternalName object
apiVersion: v1
kind: Service
name: api-apis-guru
namespace: traefik
type: ExternalName
# FQDN of the external API
- port: 443