GCE L7 LB not picking up a custom readinessProbe URL

2,080 views
Skip to first unread message

Maykel Moya

unread,
Jun 16, 2017, 4:12:30 AM6/16/17
to Kubernetes user discussion and Q&A
Hello

I'm trying to deploy a grafana instance inside Kubernetes (server 1.6.4) in GCE. I'm using the following manifests:


It turns out that grafana serves a 302 on '/' but the default healthcheck expects a 200 on '/'. As you can see, there is a custom readinessProbe in the Deployment.

Once I post the previous resources to the kube-apiserver, everything is created as expected. Concretely, the Ingress gets a public ip4 but the healtcheck uses '/' instead of '/login' as path. In this state, I get a 502 if I curl the public ip4.

The problem is fixable by manually changing the probe path to '/login' in the GCE console.

Is this a bug or I'm missing something?

For reference:

Regards,
maykel

Nicks

unread,
Jun 16, 2017, 1:43:29 PM6/16/17
to Kubernetes user discussion and Q&A
Hi Maykel,

The GCE ingress controller requires that you define the port (in your case 3000) within the Pod specification. For instance...

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: my-echo-deploy
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: echo
    spec:
      containers:
      - name: echoserver
        image: nicksardo/echoserver:latest
        ports:
        - name: http
          containerPort: 80
        - name: https
          containerPort: 443
        readinessProbe:
          httpGet:
            path: /healthcheck
            scheme: HTTP
            port: 80

Maykel Moya

unread,
Jun 19, 2017, 10:26:56 AM6/19/17
to Kubernetes user discussion and Q&A
On Friday, June 16, 2017 at 7:43:29 PM UTC+2, Nicks wrote:
Hi Maykel,

The GCE ingress controller requires that you define the port (in your case 3000) within the Pod specification. For instance...

That did the trick. Thanks! 
Reply all
Reply to author
Forward
0 new messages