By far, the most effective way to generate ketones is to fast.
You don’t have to force-feed yourself unhealthy food to gain the benefits of ketones and ketosis.
Just don’t eat.
Regular fasting that restricts overall calories extends lifespan in virtually every animal species ever tested, including mammals.
(Many experiments in rodents show that feeding them a calorie restricted diet once or twice per day makes them live much longer. Because rodent metabolism runs much faster than humans, this would be the equivalent of a human eating a huge prolonged meal and then fasting for several days. This particular example is extreme, but can be safely done once in a while by most people.)
Fasting is also an excellent way to control weight and keep BMI low, which has proven benefits in humans.
The whole reason that we evolved ketosis in the first place was to provide our bodies— and particularly our brains— with a backup fuel source during periods when we had to go without any food. That’s when ketone levels are naturally at their absolute highest. Frequent periods without food were almost certainly a regular occurrence in our evolutionary history as hominids, so ketosis probably occurred fairly often.
If you believe that ketones and ketosis might be protective against heart disease (unproven but plausible) then incorporating a reasonable amount of fasting into your lifestyle is a healthy way to gain any purported benefits. Even if the ketones end up doing nothing, you will still benefit from the calorie restriction and reduction in BMI that regular fasting provides.

