How to publicly expose Traefik login controller in Google Cloud Container Engine?

I am trying to use Traefik as Ingress Controller in google cloud container engine.

I have my http deployment / serving up and running (when I exposed it with a regular LoadBalancer it responded well).

Then I removed LoadBalancer and followed this tutorial: https://docs.traefik.io/user-guide/kubernetes/

So I have a new deployment and maintenance traefik-ingress-controller

and login for traefik ui that I can access through the kubectl proxy.

Then I create my login for my http service, but this is where my problem comes in: I can't find a way to expose this from the outside.

I want it to be accessible to someone via an external IP.

What am I missing?

Here's the result kubectl get --export all

:

NAME                                            READY     STATUS    RESTARTS   AGE
po/mywebservice-3818647231-gr3z9                1/1       Running   0          23h
po/mywebservice-3818647231-rn4fw                1/1       Running   0          1h
po/traefik-ingress-controller-957212644-28dx6   1/1       Running   0          1h

NAME                             CLUSTER-IP      EXTERNAL-IP   PORT(S)                       AGE
svc/mywebservice                 10.51.254.147   <none>        80/TCP                        1d
svc/kubernetes                   10.51.240.1     <none>        443/TCP                       1d
svc/traefik-ingress-controller   10.51.248.165   <nodes>       80:31447/TCP,8080:32481/TCP   25m
svc/traefik-web-ui               10.51.248.65    <none>        80/TCP                        3h

NAME                                DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deploy/mywebservice                 2         2         2            2           1d
deploy/traefik-ingress-controller   1         1         1            1           3h

NAME                                      DESIRED   CURRENT   READY     AGE
rs/mywebservice-3818647231                2         2         2         23h
rs/traefik-ingress-controller-957212644   1         1         1         3h

      

+3


source to share


1 answer


You need to open the Traefik service. Set the type of service specification LoadBalancer

. Try the following service file that I used earlier:



apiVersion: v1
kind: Service
metadata:
  name: traefik
spec:
  type: LoadBalancer
  selector:
    app: traefik
    tier: proxy
  ports:
  - port: 80
    targetPort: 80

      

+1


source







All Articles