'How does Consul's script(args) check run in my pod?

I deploy Coscul through helm-chart, and don't enable to inject sidecar.
Then I register service which has args check as below.

    {
      "name": "demo-svc",
      "Address": "demo-svc.default.svc.cluster.local",
      "port": 8080,
      "checks": [
        {
            "name": "args check",
            "args": ["/bin/ls", "/home"],
            "interval": "3s",
            "timeout": "1s"
        }
      ]
    }

And get Output

consul

This health check result is not as expected, it shows the folder that isn't in my pod, looks like the script just runs in Consul-server.

Can the Consul's arges check execute script in my pod?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source