Okay okay, so Machiavelli has taught you everything he knows about how to get a kingdom. What about how to keep one?
It's simple, really. The most important question is, if this kingdom were attacked, would the ruler have to use other people's armies, or could they fight themselves?
The first kind can defend themselves. Machiavelli already talked about them (check out chapters 6 and 7) and he will again. But the second kind of ruler is what we're going to talk about. These guys need all the help they can get.
First, fortify your hometown and forget about the rest of the kingdom. People are lazy, and if you've done a good job of protecting yourself, they won't bother.
Look at Germany. No one wants to invade them—the cities are so fortified it would be a total pain in the butt to try. So protect your town and store lots of food and you can laugh while armies sit outside of your gates, playing Angry Birds for a year.
Won't people be pissed that their houses are being destroyed? Poppycock. They'll support their ruler even more because, well, they have no choice now.