Confidentiality in pediatrics is maintained by safeguarding medical records and ensuring that information is only shared with individuals who have a legitimate need to know. Pediatricians must balance the child's right to privacy with the parents’ right to be informed about their child's health.