This service type is a little bit different, as it is not used to provide a stable endpoint to an internal service but to an external one. For example, let’s say we have a database running at my-db.company.com. Instead of having this endpoint hardcoded or defined in a config somewhere, we could create a db service like the following:
xxxxxxxxxx
apiVersion: v1
kind: Service
metadata:
name: db
spec:
type: ExternalName
externalName: my-db.company.com