-
Notifications
You must be signed in to change notification settings - Fork 641
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
Unable to get the kubelet monitor to run #584
Comments
I ran into these same problems and was able to successfully run node-problem-detector with access to
I was also able to successfully get the spec:
# health-checker for kubelet uses the local network to check kubelet's /healthz
hostNetwork: true
containers:
- name: node-problem-detector
command:
- /node-problem-detector
- --logtostderr
- --config.system-log-monitor=[files]
- --config.custom-plugin-monitor=[files]
image: custom-registry/custom-image:0.8.9
securityContext:
privileged: true
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: log
mountPath: /var/log
readOnly: true
- name: kmsg
mountPath: /dev/kmsg
readOnly: true
# Make sure container is in the same timezone with the host.
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: config
mountPath: /config
- mountPath: /etc/machine-id
name: machine-id
readOnly: true
- mountPath: /run/systemd/system
name: systemd
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /var/run/dbus/
name: dbus
mountPropagation: Bidirectional
volumes:
- name: log
# Config `log` to your system log directory
hostPath:
path: /var/log/
- name: kmsg
hostPath:
path: /dev/kmsg
- name: localtime
hostPath:
path: /etc/localtime
- name: config
configMap:
defaultMode: 0744
name: node-problem-detector-config
- name: machine-id
hostPath:
path: /etc/machine-id
type: File
- name: systemd
hostPath:
path: /run/systemd/system/
type: Directory
- name: dbus
hostPath:
path: /var/run/dbus/
type: Directory
- name: docker-sock
hostPath:
path: /var/run/docker.sock
type: Socket I hope that this helps others that run into these challenges. Cheers! Related Issue: |
I run into this issue due to error logs about missing I just played around with the For me adding systemctl and curl seem to be no big deal. docker.io on the otherhand, I don't know. Many people has replaced docker with containerd, but on the other hand. If you enables the docker health check the binary is needed. One idea can be to create a PR that adds Any thoughts on this? |
A few issues have popped up where the provided image doesn't have the required packages for certain health checking operations (like kubernetes#584 (comment)). This installs curl and systemd in the container to help alleviate these issues.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
I am running into a similar issue as #214 and #439
I am using the
k8s.gcr.io/node-problem-detector/node-problem-detector:v0.8.8
image (which doesn't havesystemd
installed) and installing it into a bottlerocket host that does havesystemd
.Everything works great until I try to enable the kubelet monitor as that shells out to
systemctl
to get uptime ofkubelet
.I've tried mounting
/bin/systemctl
and the other suggestions in those issues without luck.Is mounting
systemctl
from the host the only way to get the kubelet monitor running? Or is installingnode-problem-detector
on the host itself a better solution?The text was updated successfully, but these errors were encountered: