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?
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