# Configure Traefik to Pass Health Checks on GCP

**URL:** <https://community.traefik.io/t/configure-traefik-to-pass-health-checks-on-gcp/691>\
**Category:** Traefik v1\
**Tags:** kubernetes-ingress\
**Created:** [June 29, 2019, 1:34pm UTC](https://community.traefik.io/t/configure-traefik-to-pass-health-checks-on-gcp/691 "2019-06-29T13:34:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanoisteve](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/hanoisteve/32/346_2.png) [@hanoisteve](https://community.traefik.io/u/hanoisteve)\
**Post date:** [June 29, 2019, 1:34pm UTC](https://community.traefik.io/t/configure-traefik-to-pass-health-checks-on-gcp/691/1 "2019-06-29T13:34:37Z")

</div>

Google Cloud GCP Will NOT forward to Ingress that does not pass health checks. Could anyone share how exactly to configure Traefik Ingress to pass health checks? I think it needs to return a 200 on /health or something like that. But what would exact configuration look like? I am starting traefik using arguments rather than toml file. Thanks. 304 not accepted. Must be 200 I think. If I use the arg list what do I need to do to enable health checks?

UPDATE LATEST: CONFIG AND LOGS:

```auto
traefik.toml: |
    defaultEntryPoints = ["https","http"]

    [entryPoints]

      [entryPoints.http]
      address = ":80"

      [entryPoints.https]
      address = ":443"
        [entryPoints.https.tls]
          [[entryPoints.https.tls.certificates]]
          CertFile = "/ssl/tls.crt"
          KeyFile = "/ssl/tls.key"

      [entryPoints.traefik]
        address = ":8080"
        [entryPoints.traefik.auth.basic]
        users = ["admin:$apr1$imdkeZCP$Kp78/ikmqeoNsnV.L5xjC1"]

    [kubernetes]
      [kubernetes.ingressEndpoint]
        publishedService = "traefik/traefik-ingress-controller-http-service"

    [ping]
    entryPoint = "http"

    [api]
    entryPoint = "traefik"
    [backends]
    [backends.backend1]
       [backends.backend1.healthcheck]
       path = "/health"
       interval = "10s" 
     [backends]
    [backends.backend2]
       [backends.backend2.healthcheck2]
       path = "/ping"
       interval = "10s"

```

```auto
time="2019-06-29T19:38:45Z" level=debug msg="Skipping Kubernetes event kind *v1.Endpoints"

10.28.2.1 - - [29/Jun/2019:19:38:45 +0000] "GET /ping HTTP/1.1" 404 19 "-" "kube-probe/1.13+" 3 "backend not found" "/ping" 0ms

time="2019-06-29T19:38:46Z" level=debug msg="Received Kubernetes event kind *v1.Endpoints"

time="2019-06-29T19:38:46Z" level=error msg="Service not found for kube-system/traefik-web-ui"

time="2019-06-29T19:38:46Z" level=debug msg="Skipping Kubernetes event kind *v1.Endpoints"

time="2019-06-29T19:38:47Z" level=debug msg="Received Kubernetes event kind *v1.Endpoints"

time="2019-06-29T19:38:47Z" level=error msg="Service not found for kube-system/traefik-web-ui"

time="2019-06-29T19:38:47Z" level=debug msg="Skipping Kubernetes event kind *v1.Endpoints"

10.28.2.1 - - [29/Jun/2019:19:38:47 +0000] "GET /health HTTP/1.1" 404 19 "-" "kube-probe/1.13+" 4 "backend not found" "/health" 0ms
UPDATE: Here is my deployment. I think this correct but looking at the logs I am getting:

- - [29/Jun/2019:16:21:44 +0000] "GET /health HTTP/1.1" 404 19 "-" "kube-probe/1.13+" 4 "backend not found" "/health" 0ms

```

How do I setup to return the 200?

UPDATE: there is a ping setting but how to map this to health

```auto
# Ping definition
[ping]
  # Name of the related entry point
  #
  # Optional
  # Default: "traefik"
  #
  entryPoint = "traefik"

```

How to I enable /health which is where health check is done?

```auto
kind: Deployment
apiVersion: apps/v1
metadata:
  name: traefik-ingress-controller
  labels:
    k8s-app: traefik-ingress-controller
spec:
  replicas: 2
  selector:
    matchLabels:
      k8s-app: traefik-ingress-controller
  template:
    metadata:
      labels:
        k8s-app: traefik-ingress-controller
        name: traefik-ingress-controller
    spec:
      serviceAccountName: traefik-ingress-serviceaccount
      terminationGracePeriodSeconds: 35
      containers:
      - image: traefik
        name: traefik-ingress-controller
        imagePullPolicy: Always
        resources:
          limits:
            cpu: 200m
            memory: 384Mi
          requests:
            cpu: 25m
            memory: 128Mi
        livenessProbe:
          failureThreshold: 2
          httpGet:
            path: /health
            port: 80
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 5
        readinessProbe:
          failureThreshold: 2
          httpGet:
            path: /health
            port: 80
            scheme: HTTP
          periodSeconds: 5
        ports:
        - name: http
          containerPort: 80
        - name: https
          containerPort: 443
        - name: dashboard
          containerPort: 8080
        args:
        - --logLevel=DEBUG
        - --api
        - --api.dashboard=true
        - --kubernetes
        - --accesslog=true

```
