GO:0055075: potassium ion homeostasis
Any process involved in the maintenance of an internal steady state of potassium ions within an organism or cell.