Highly specific potassium binding protein that is required for normal growth in the presence of high levels of external K(+). May act as a sensor of cytoplasmic K(+) concentration. Binds a single K(+) ion, which induces a large conformational change. Can also bind the larger alkali metal ions Rb(+) and Cs(+), and NH(4)(+) (PubMed:27112601). May be involved in the regulation of peptidoglycan cross-linking (PubMed:25422305). Transcriptionally regulated by CpxR, which binds directly to the promoter region. BON and LysM domains are both required for full K(+) binding. The major K(+) binding site is located in the BON domain and this initial complex is stabilized by interaction with the LysM domain. Deletion mutant shows retarded growth at high concentrations of K(+) (PubMed:27112601). Deletion of the gene impacts the abundance of muropeptide species. The absence of YgaU leads to the activation of the Cpx pathway (PubMed:25422305).