Black pipe is ABS
Black PVC pipe is called PAINTED.
What I am going to suggest is Vinyl Fence Post...You may be able to find it in BLACK as well as white (or you can paint it)
Here is one way to mount it...
Drill two fairly large holes (Like 1 inch) under the spot where you are going to put the bolts (Drill in one side only) Center drill a smaller (bolt size) hole on the other side,, Washer over the head of a stove bolt (This is the one with the smooth head and the square shoulder) up to your frame rail or other clamp that fits OVER the frame rail.. You can leave the oles open (Glue a flap of rubber (Blown bicycle inner tube works well( over the hole (Only glue half of it) so the hole acts as a drain.
Method 2: You need some square bottomed "U" bolts and some matching brackets Two per rail.
Put the bolts over the rail, then bring the brackets up under the fence post and apply nylock nuts.. NOTE you need two bolts and two brackets on each end, the bolts go over the rail in front and behind the post, the brackes go bolt to bolt under the post.. (Visualize it)
Method 3,, Temporary.. Like 2 but use tarp straps around post and frame, Good temp mount.. I will continue using it till I get back to Detroit, take some measurements and visit the store where a now deceased friend of mine worked,,,, They always have a few screws loose there (It is what they sell, Tradesman Fasteners)
Oh the caps.. On one end use glue or screws to attach a top cap to the fence post
On the other end I used a comination of screws, hinges and glue and some shims (made from excess post) to make a hinged cover, I use a common sliding bolt latch mounted so DOWN is latched (The hinges are on top) Works great.