Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom npd check (bash) #959

Open
kotyara85 opened this issue Sep 28, 2024 · 1 comment
Open

custom npd check (bash) #959

kotyara85 opened this issue Sep 28, 2024 · 1 comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@kotyara85
Copy link

Hello everyone,
I followed this instruction - https://github.com/kubernetes/node-problem-detector/blob/4ad49bbd84b8ced45ac825eac01ec93d9235935e/config/custom-plugin-monitor.json

and created a simple check which connects to kube api, fetches kube svc ip and tries to connect to it -

#!/bin/sh
set -e
export KUBECONFIG=/etc/kubernetes/kubelet.conf
kube_svc=$(kubectl  get svc kubernetes -o jsonpath="{.spec.clusterIP}")
curl --cacert /etc/kubernetes/pki/ca.crt https://${kube_svc}

It's mounted using config map

NPD returns this -

I0928 06:09:24.090884       1 plugin.go:281] Start logs from plugin {Type:NPD Condition: Reason:KubeServiceDown Path:/scripts/kube_service.sh Args:[] TimeoutString:0xc000b0ae20 Timeout:5s}
 /scripts/kube_service.sh: 4: kubectl: not found

How are all those scripts supposed to get run if npd, obviously, doesn't have any binaries. Attach an extra container with kubectl?

Thanks

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants