I tried this many years ago when I was building racks and stuff for customers. I bought a big bag of 3/4" and 1" plastic endcaps from McMaster Carr but I didn't like the way they looked and they always seem to work their way out.
Something that I found the other day is
these... Looks pretty cool but would require welding.
They are found under the tabs section
of this site...