I made a ladder rack that fits in the stake pockets of my pickup out of rectangular and square steel tubing. I used 1-1/2" X 2" tubing for the verticals and 2" square tubing for the crossbars. The rectangular tubing is a very snug fit in my stake pockets and the frame had to be driven into the front pockets. I used light angle iron to tie the frames together at the top and angle clips to hold the verticals to the bed. Other than the welds on the crossbars, the whole thing is held together with sheet metal screws. I don't use any diagonal braces, but could put a pair from the front frame to the bed rails. I'd us 3/4" thinwall conduit with the ends smashed flat and bent to fit the frame, a sheet metal screw in each end. If you don't want to put screws through the bed, you could use C-clamps to hold the frame down. Using the stake pockets, it may not be absolutely necessary to fasten the frame to the bed, but it gives me a bit of extra comfort.