In general, a food item will most likely knock you out of ketosis if it causes your insulin and blood sugar levels to increase significantly. Any foods that are high in carbs and low in fat, fiber, and protein will have the most profound adverse effects on your ketone levels. Conversely, foods that are high in fat and/or fiber and very low in both carbs and protein will cause almost no increase in blood sugar and insulin, thus promoting ketone production.
In other words, more fat and fiber in a food makes it more likely to support ketosis, while a food that has more carbs and protein will typically impair ketone production.
For these reasons, it is best to stick to foods that have almost no carbs, low to moderate protein (so you can reap the other health benefits of protein), and high fat. For specific examples of what foods will keep you in ketosis and kick you out of ketosis, check out our keto diet food list.