title: Kubernetes service in HostAliases
body: <p>Is it possible to have a service name under <code>hostAliases</code> in Kubernetes? I want to point a non-existent domain name to a service instead of an IP.</p>
  
  <p>Something like the following:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: deployment-name
  spec:
    replicas: 1
    template:
      spec:
        containers:
          hostAliases:
          - ip: "my-service-name"
            hostnames:
            - "my.domain.com"
  </code></pre>
  
  <p>If not, how would you guys set up a local hosts file entry for a pod to a service? I need to resolve the <strong>non-existent</strong> domain to the service.</p>