<p>I've provisioned a kubernetes cluster on my own couple of virtual machines via kubespray. Kubespray uses project-calico as default network-plugin which fits my requirements of proxying services in the cluster network to the outer world pretty well.</p>

<p>Kubespray deploys the apiserver itself as a ClusterIP Service. To make it reachable from outside it defines an Endpoint of this service with the master nodes Host IP Adress, which is routed to the internal ClusterIP by Calico as far as I could figure it out by myself.</p>

<p>My Question is: How is it possible to define my own endpoint (for another service), as these get implicietly defined already by provisioning the service.yaml and cannot be overwritten. I would like to follow a similar approach to get my Rook/Ceph Dashboard visible from outside the cluster.</p>

<p>EDIT: Note that <code>kubectl get ingresses.networking.k8s.io --all-namespaces</code> returns <code>No resources found.</code> and <code>kubectl describe service kubernete</code> returns</p>

<pre><code>Name:              kubernetes
Namespace:         default
Labels:            component=apiserver
                   provider=kubernetes
Annotations:       &lt;none&gt;
Selector:          &lt;none&gt;
Type:              ClusterIP
IP:                10.233.0.1
Port:              https  443/TCP
TargetPort:        6443/TCP
Endpoints:         192.168.103.254:6443
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>

<p>I'll refer to your question:</p>
<blockquote>
<p>How is it possible to define my own endpoint?</p>
</blockquote>
<p>You'll have to:</p>
<p>1 ) Create a Service without a Pod selector:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 9376
</code></pre>
<p>(At this point, no auto-generated Endpoints will be created by K8S because it can't decide to which pods those Endpoints should be referring).</p>
<p>2 ) Create an <code>Endpoints</code> object and map it to the desired network address and port where the external resource is running:</p>
<pre><code>apiVersion: v1
kind: Endpoints
metadata:
  name: my-service
subsets:
  - addresses:
      - ip: 192.0.2.45
    ports:
      - port: 9376
</code></pre>
<p>(*) Notice that there should be a match between the service name and the name of the Endpoints object.</p>
