As well as excreting the processed metabolites of the body, the kidneys also get rid of all excess fluid, salt etc that we take in over our daily requirements. Diet becomes increasingly important as renal function deteriorates, because the body becomes less able to deal with excessive intake first, and later, with the normal output of the body.
Peter Quaife cartoon by kind permission of Jazz Communications. Peter Quaife (Wikipedia) was a founder member of and bass guitarist for The Kinks, a hugely successful 1960s band. He subsequently became a graphic artist and cartoonist, and drew a brilliant series of kidney-relevant cartoons while on dialysis.
Deteriorating kidney function
Restrict salt; moderate protein; in late stages, phosphate and potassium often become important issues.
Where blood pressure control is possible, evidence no longer supports restricting protein below moderate levels. It does not seem to protect kidney function, and severe restriction of protein can be hazardous.
Salt, protein, fluid, potassium and phosphate are important to varying degrees depending on the type and frequency of dialysis, and on whether there is a little bit of residual renal function
With good kidney function, it is important to eat a healthy diet to minimise cardiovascular risk.