context: You may have heard the old line about kidney stones: These, too, shall pass. Better yet, don't get them in the first place. They're easier to avoid than you might think. With the right foods, plenty of water, and proper medication, you can lower your chances of kidney stones. Maybe you'll pass them right out of your life. " Kidney stones" is a term that covers different types of small, solid crystals. They can have different causes and different food culprits. Some are related to kidney infections. Others form because you have too much of certain minerals in your system. Genes can play a role, too. Forty percent of the people who get kidney stones have relatives who have them, too. Their bodies may get rid of too much calcium or too little citrate (a chemical found in citrus fruits) in their pee, for instance. Other conditions that make kidney stones more likely include: Obesity . When you're overweight, you tend to get them more often. The same is true if you havediabetes. Gout. This painful condition happens when uric acid builds up in your blood. That makes crystals form in the joints or kidneys. Intestinal surgery. If you've had certain types of gastric bypass surgery or other intestinal surgery, your risk may go up. Hyperthyroidism. It can aises calcium levels in your blood and trigger kidney stones. Certain kidney diseases. One example is polycystic kidney disease, in which clusters of cysts grow in your kidneys. Another is medullary sponge kidney, a birth defect that causes cysts to form in the organ's tubes. Middle-aged men are most likely to get kidney stones, though it can happen to people of any age or gender. Even if you're in good health, your diet may encourage kidney stones to grow. One top reason is you may not be drinking enough water. That means you'll make too little pee, which gives the stones more chances to form. Other things to watch: Colas. These beverages are high in fructose and phosphates, which may lead to kidney stones. Oxalates. These are organic compounds found in a number of foods, including healthy ones such as spinach and sweet potatoes. But oxalates also bind easily to certain minerals, including calcium, which then help form kidney stones. Salt (specifically, sodium). Lots of sodium, which you get mainly through salt, means more calcium in your pee. That ups you odds for kidney stones. Eating calcium-rich foods like kale and salmon isn't a bad thing -- just when you also eat too much salt. Too little calcium in your diet may lead to kidney stones in certain people. Animal protein. Too many steaks, chicken, eggs, and seafood can build up calcium and uric acid in your body. That's another cause of kidney stones. Previous kidney stones. If you've had them once, you're likely to get them again, unless you take steps. Take charge of your diet and take any meds your doctor prescribed. Also try to: Drink lots of water. Stay hydrated, especially when you exercise. Check food labels. Read the ingredients. Avoid or eat less of foods with high amounts of ingredients like sodium chloride, monosodium glutamate ( MSG), and sodium nitrate. Choose foods wisely. Usually it's good to get more spinach and nuts in your diet. But if you have calcium oxalate stones, which are the most common type, your doctor may tell you to avoid limit foods high in oxalates: Nuts, including almonds, cashews, pistachios, and peanuts Soy products, including soy burger, soy milk, and soy cheese Chocolate Oat and oat bran Red kidney beans, navy beans, fava beans Beets, spinach, kale, tomato These foods are low in oxalates. Caution: Too much dairy foods and animal protein can up your chances of less common types of kidney stones: Grapes, melon, bananas Cucumbers, cauliflower, cabbage, peas Cheese, milk, butter Beef, bacon, chicken, ham Eat citrus fruits. Lemons and limes are high in citrate, which helps prevent kidney stones.