Substances mainly secreted into renal tubule are; H+, K+, NH3, urea, creatinine, histamine and drugs like penicillin. Tubular secretion occurs at Proximal Convoluted Tubule (PCT) and Distal Convoluted Tubule (DCT); for example, at proximal convoluted tubule, potassium is secreted by means of sodium-potassium pump, hydrogen ion is secreted by means of active transport and co-transport, i.e. antiporter, and ammonia diffuses into renal tubule. Other functions
Hormone secretion
The kidneys secrete a variety of hormones, including erythropoietin, calcitriol, and renin. Erythropoietin is released in response to hypoxia (low levels of oxygen at tissue level) in the renal circulation. It stimulates erythropoiesis (production of red blood cells) in the bone marrow. Calcitriol, the activated form of vitamin D, promotes intestinal absorption of calcium and the renal reabsorption of phosphate. Renin is an enzyme which regulates angiotensin and aldosterone levels. Maintaining homeostasis
The kidney is responsible for maintaining a balance of the following substances:

The body is very sensitive to its pH. Outside the range of pH that is compatible with life, proteins are denatured and digested, enzymes lose their ability to function, and the body is unable to sustain itself. The kidneys maintain acid-base homeostasis by regulating the pH of the blood plasma. Gains and losses of acid and base must be balanced. Acids are divided into "volatile acids" and "nonvolatile acids". See also titratable acid. The major homeostatic control point for maintaining this stable balance is renal excretion.
However, when plasma blood volume is low and ADH is released the aquaporins that are opened are also permeable to urea. This allows urea to leave the collecting duct into the medulla, creating a hyperosmotic solution that "attracts" water. Urea can then re-enter the nephron and be excreted or recycled again depending on whether ADH is still present or not. The single effect describes the fact that the ascending thick limb of the loop of Henle is not permeable to water but is permeable to sodium chloride. This allows for a countercurrent exchange system whereby the medulla becomes increasingly concentrated, but at the same time setting up an osmotic gradient for water to follow should the aquaporins of the collecting duct be opened by ADH. Blood pressure
Although the kidney cannot directly sense blood, long-term regulation of blood pressure predominantly depends upon the kidney. This primarily occurs through maintenance of the extracellular fluid compartment, the size of which depends on the plasma sodium concentration. Renin is the first in a series of important chemical messengers that make up the renin–angiotensin system. Changes in renin ultimately alter the output of this system, principally the hormones angiotensin II and aldosterone. Each hormone acts via multiple mechanisms, but both increase the kidneys absorption of sodium chloride, thereby expanding the extracellular fluid compartment and raising blood pressure. When renin levels are elevated, the concentrations of angiotensin II and aldosterone increase, leading to increased sodium chloride reabsorption, expansion of the extracellular fluid compartment, and an increase in blood pressure.