title: Kubernetes can't port-forward externalName service
body: <p>Im create service with type external name:</p>
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: my-service
    namespace: dev
  spec:
    externalName: google.com
    ports:
    - port: 80
      protocol: TCP
      targetPort: 80
    sessionAffinity: None
    type: ExternalName
  </code></pre>
  <p>By off <a href="https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors" rel="noreferrer">K8s docs</a> add new endpoint:</p>
  <pre><code>apiVersion: v1
  kind: Endpoints
  metadata:
    name: my-service
    namespace: dev
  subsets:
  - addresses:
    - ip: 172.217.20.206
    ports:
    - port: 80
      protocol: TCP
  </code></pre>
  <p>And trying forward it to my localhost:</p>
  <pre><code>kubectl port-forward -n dev svc/my-service 8080:80
  </code></pre>
  <p>and got the error:</p>
  <blockquote>
  <p>error: cannot attach to *v1.Service: invalid service 'my-service':
  Service is defined without a selector</p>
  </blockquote>
  <p>AFAIU, I did all steps by off docs, where I missed ? Or K8s not provide ability port-forward externalName in general?</p>