stern -n kube-system -l k8s-app=pi-temperature -s 10m
Last active
December 9, 2019 23:36
-
-
Save drnic/8f812aff98f5ba50eb3c26f74872857f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
k8s-app: pi-temperature | |
name: pi-temperature | |
namespace: kube-system | |
spec: | |
selector: | |
matchLabels: | |
k8s-app: pi-temperature | |
template: | |
metadata: | |
labels: | |
k8s-app: pi-temperature | |
spec: | |
containers: | |
- image: busybox | |
name: temp | |
command: | |
- sh | |
- -ec | |
- | | |
while :; do | |
echo "$(cat /etc/node/etc/hostname): $(cat /etc/node/thermal_zone0/temp)" | |
sleep 60 | |
done | |
volumeMounts: | |
- name: thermalzone | |
mountPath: /etc/node/thermal_zone0/ | |
- name: node-etc | |
mountPath: /etc/node/etc/ | |
volumes: | |
- name: thermalzone | |
hostPath: | |
path: /sys/class/thermal/thermal_zone0/ | |
- name: node-etc | |
hostPath: | |
path: /etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment