The chemical reactions and pathways involving 21U-RNAs, a class of single-stranded RNA molecules of about 21 nucleotides in length characterized by a uridine 5'-monophosphate and a modified 3' end resistant to periodate degradation. 21U-RNAs are derived from distinct, autonomously expressed loci within the genome.