# \[HELP\] - expose / access to my service with traefik dosen't work

**URL:** https://community.traefik.io/t/help-expose-access-to-my-service-with-traefik-dosent-work/25731
**Category:** Traefik v3 (latest)
**Tags:** kubernetes-ingress
**Created:** [December 25, 2024, 7:37pm UTC](https://community.traefik.io/t/help-expose-access-to-my-service-with-traefik-dosent-work/25731 "2024-12-25T19:37:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Th3Heavy](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Th3Heavy](https://community.traefik.io/u/Th3Heavy)
#### Post date: [December 25, 2024, 7:37pm UTC](https://community.traefik.io/t/help-expose-access-to-my-service-with-traefik-dosent-work/25731/1 "2024-12-25T19:37:53Z")

</div>

```auto
helm : v3.16.3
kubernetes:
	Client Version: v1.31.3
	Kustomize Version: v5.4.2
	Server Version: v1.31.2
Argo CD: v2.13.1+af54ef8
Traefik version 3.2.2

```

Hello,

I can't access the services without using port-forwarding.

**Information:**  
I’m setting up a home server to practice using these tools.  
I use Terraform to set up my Kubernetes cluster and ArgoCD, then ArgoCD to deploy my applications.

I connect to the server (Ubuntu Server without GUI) via SSH from my personal computer.

My goal is to expose my services to manage them externally (or at least within my local network).

Using port-forwarding, I can access the ArgoCD dashboard:

```auto
kubectl port-forward service/argocd-server 30443:80 --address 0.0.0.0

```

Then, from my personal computer (local network), by going to `http://homeserver:30443`, I can successfully access the ArgoCD dashboard.

Without port-forwarding, I cannot access the URL. After some research, I understood that I needed an ingress controller. So, I deployed Traefik (via ArgoCD, Helm release).  
I set the Traefik service to NodePort (I’m not using cloud providers to assign an IP address and use a LoadBalancer).

Next, I tried installing the Whoami test application, but I couldn’t connect to it via my local network (`http://homeserver/whoami`) or even directly from the server by running:

```auto
curl 192.168.1.43/whoami

```

The result is:

```auto
curl: (7) Failed to connect to homeserver port 80 after 1 ms: Couldn't connect to server

```

However, by using port-forwarding, I can access the Whoami application.

```auto
http://homeserver:30443/whoami

```

Here are the two lines concerning the Whoami application from the Traefik pod logs:

```auto
2024-12-25T10:20:32Z DBG github.com/traefik/traefik/v3/pkg/server/service/service.go:318 > Creating load-balancer entryPointName=web routerName=argocd-whoami-d1d09c71f488fb76bf87@kubernetescrd serviceName=argocd-whoami-d1d09c71f488fb76bf87@kubernetescrd
2024-12-25T10:20:32Z DBG github.com/traefik/traefik/v3/pkg/server/service/service.go:355 > Creating server entryPointName=web routerName=argocd-whoami-d1d09c71f488fb76bf87@kubernetescrd serverName=5153565a47631714 serviceName=argocd-whoami-d1d09c71f488fb76bf87@kubernetescrd target=http://10.244.1.144:80

```

If you need more information, feel free to ask me.

Below are the manifests for the Whoami application. I’ve been trying to figure out what’s wrong for hours and why the service is not exposed.  
I greatly appreciate any help you can provide.

In ArgoCD, everything is fine for the Traefik application. No errors in the pod logs.

```auto
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/argocd-applicationset-controller ClusterIP 10.96.217.85 <none> 7000/TCP 14d
service/argocd-dex-server ClusterIP 10.96.89.71 <none> 5556/TCP,5557/TCP 14d
service/argocd-redis ClusterIP 10.96.24.67 <none> 6379/TCP 14d
service/argocd-repo-server ClusterIP 10.96.42.122 <none> 8081/TCP 14d
service/argocd-server ClusterIP 10.96.13.49 <none> 80/TCP,443/TCP 14d
service/traefik NodePort 10.96.202.123 <none> 80:32041/TCP,443:32462/TCP 6d2h
service/whoami ClusterIP 10.96.116.137 <none> 80/TCP 5d1h

```

**whoami-deployment.yaml**

```auto
kind: Deployment
apiVersion: apps/v1
metadata:
  name: whoami
  labels:
    app: whoami
spec:
  replicas: 1
  selector:
    matchLabels:
      app: whoami
  template:
    metadata:
      labels:
        app: whoami
    spec:
      containers:
        - name: whoami
          image: traefik/whoami
          ports:
            - name: web
              containerPort: 80

```

**whoami-ingressroute.yaml**

```auto
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: whoami
  namespace: argocd
spec:
  entryPoints:
    - web
  routes:
    - kind: Rule
      match: Host(`homeserver`) && PathPrefix(`/whoami`)
      services:
      - kind: Service
        name: whoami
        port: 80
		
		apiVersion: v1

```

**whoami-service.yaml**

```auto
kind: Service
metadata:
  name: whoami
spec:
  ports:
    - name: web
      port: 80
      targetPort: web
  selector:
    app: whoami

```

---

<div class="post-metadata">

### Author: ![Th3Heavy](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Th3Heavy](https://community.traefik.io/u/Th3Heavy)
#### Post date: [December 27, 2024, 9:57am UTC](https://community.traefik.io/t/help-expose-access-to-my-service-with-traefik-dosent-work/25731/2 "2024-12-27T09:57:51Z")

</div>

currently I would think of an iptable problem, I don't have a kube rule, yet I don't have an error in the kube-proxy pod log, in the iptable rules I only have a docker rule.

---

<div class="post-metadata">

### Author: ![Th3Heavy](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Th3Heavy](https://community.traefik.io/u/Th3Heavy)
#### Post date: [December 27, 2024, 11:36am UTC](https://community.traefik.io/t/help-expose-access-to-my-service-with-traefik-dosent-work/25731/3 "2024-12-27T11:36:22Z")

</div>

my problem was i need nginx reverse proxy, i think is good now

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)
#### Post date: [January 4, 2025, 11:02am UTC](https://community.traefik.io/t/help-expose-access-to-my-service-with-traefik-dosent-work/25731/4 "2025-01-04T11:02:40Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
