Eat whole foods of plant origin Whole plant-based foods like fruits, vegetables, nuts, seeds, and legumes are rich in nutrients and antioxidants that can give you an edge against harmful pathogens. Get enough sleep Sleep and immunity are closely related. In fact, poor sleep or poor quality sleep is linked to increased susceptibility to the disease. Eat fermented foods or take a probiotic supplement These foods include yogurt, sauerkraut, kimchi, kefir, and natto. Train moderately Examples of moderate exercise include brisk walking, biking, jogging, swimming, and light hiking. Most people should try to get at least 150 minutes of moderate exercise per week. Avoid harmful sugars You need to limit your sugar intake to less than 5 percent of your daily calories. This equates to about 2 tablespoons (25 grams) of sugar for someone on a 2,000 calorie diet.