I am trying to run Home Assistant from my Raspberry Pi 4 using K3s Kubernetes. I can get it up and running but now I want to give it access to my GPIO. What is the proper way to give those permissions to the pod running the application?
1 Answer
this works by giving the container full privileges
If you have the usb on a dedicated Raspberry Pi you have to label this node first via
kubectl label nodes <node-name> device=myraspi
and then use a node selector to assure that this pod runs on the Pi A Pod definition would look like this
apiVersion: v1
kind: Pod
metadata:
labels:
name: home-assistant
spec:
nodeSelector:
device: myraspi
containers:
- image: <image-name>
imagePullPolicy: Always
name: led-blue
securityContext:
privileged: true
-
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.– Community BotMay 14, 2022 at 20:59