Skip to content

Instantly share code, notes, and snippets.

@drnic
Last active December 9, 2019 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnic/8f812aff98f5ba50eb3c26f74872857f to your computer and use it in GitHub Desktop.
Save drnic/8f812aff98f5ba50eb3c26f74872857f to your computer and use it in GitHub Desktop.
stern -n kube-system -l k8s-app=pi-temperature -s 10m

example

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