Skip to content

httpGet on liveness probes broken: inability to address pod's IP in NetAction? #208

Description

@sthetz

Hello!

After converting my Kubernetes configs into Short format I noticed that my container with a Rails web app started failing liveness/readiness checks. Quick investigation revealed that the problem is default value of host in httpGet.

Here is the probe part of the original Kubernetes config:

livenessProbe:
  httpGet:
    path: /status/online
    port: 3000

When run through Short, it translates into this:

liveness_probe:
  net:
    url: HTTP://localhost:3000/status/online

Which in turn (when translated back into Kubernetes format) translates into this:

livenessProbe:
  httpGet:
    host: localhost
    path: /status/online
    port: 3000
    scheme: HTTP

So, Short adds explicit param host which defaults to localhost. However, Kubernetes documentation on probes states that the host param in httpGet defaults to pod's internal IP. So when liveness probe tries to access localhost instead of pod's IP, the probe fails.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions