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 1


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
  name: home-assistant
    device: myraspi
    - image: <image-name>
      imagePullPolicy: Always
      name: led-blue
        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 Bot
    May 14, 2022 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.