<p>I am setting up Kubernetes in a RedHat server in my institution, the server has an internal IP of <strong>10.2.3.4</strong>. I can only view the pod by using kubectl port-forward. e.g</p>

<p>My traefik service has the following:</p>

<pre><code>#minikube service list
| kube-system | traefik    | web/80        | http://172.17.0.3:31909 |
|             |            | websecure/443 | http://172.17.0.3:30584 |
|             |            | admin/9001    | http://172.17.0.3:32316 |
|-------------|------------|---------------|-------------------------|
</code></pre>

<p>Now I can only curl this link</p>

<pre><code> $curl http://172.17.0.3:32316/dashboard/
&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;Traefik&lt;/title&gt;&lt;meta charset=utf-8&gt; ........
</code></pre>

<p>However, if I want to preview the admin dashboard on my browser on 9001 port, the only way I have found yet is though port-forward:</p>

<pre><code>kubectl port-forward -n kube-system $(kubectl get pods  --output=name -n kube-system | grep 'traefik') --address 10.2.3.4 9001:9001
</code></pre>

<p>I tried to set <code>externalIPs</code> on service YAML settings but it doesn't work:</p>

<pre><code># Service
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: traefik
    release: traefik
  name: traefik
  namespace: kube-system
spec:
  externalIPs:
    - 10.2.3.4
  externalTrafficPolicy: Local
  ports:
    - name: web
      nodePort: 31909
      port: 3838
      protocol: TCP
      targetPort: 3838
    - name: admin
      nodePort: 32316
      port: 9001
      protocol: TCP
      targetPort: 9001
  selector:
    app: traefik
    release: traefik
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

</code></pre>

<p>I know the port-forward should be used in debug mode, I cannot add my own domain since it is restricted in my institution, I wonder if there are settings I should make the kubernete services exposed to <strong>10.2.3.4</strong>?</p>

Horizon
<p>Simple way to expose your service is </p>

<pre><code>kubectl expose deployment *name* --type=LoadBalancer --name=trafik
</code></pre>

<p><strong>name</strong> - says deployement name which you should have given in deployment.yaml</p>

<p>I am assuming, you use traefik as Gateway/LoadBalancer here. You can use the same execution for any services to expose internal IP.</p>
