Make sure there is at least 3 inches of room at the top and back, and 2 inches of room on each side between the appliance and cabinets. This space allows air to circulate around the appliance and provides enough room for the hinges to fully open the doors. The refrigerator relies on a constant supply of room-temperature air to maintain safe food storage temperatures.
Take into account the water supply line, shut-off valve and electrical cables when you design the shape of the enclosing panels. If your refrigerator has an ice maker or water dispenser it will have a pipe running to a connection with your cold water plumbing. Leave a little extra room at the back of the refrigerator for the pipe and power cord.
Avoid building cabinets that prevent the refrigerator being removed. Dust bunnies accumulate behind and below the appliance over time and you should be able to safely roll the refrigerator forward for cleaning. If there's ever a problem with the appliance, you'll appreciate that you did not design a permanent enclosure. The refrigerator can protrude a few inches out of the enclosure if desired. Positioning it flush with the surrounding cabinets allows you to install a door that matches the rest of your kitchen.