Cut a 1-inch hole in the bottom of your grow bed. Insert your 1-inch pipe in the hole, making sure to keep it straight, and the top of the pipe is 1-inch under the expected level of the gravel of pebble. Use the underwater glue to secure it in place.
Cut the 2-inch pipe so it is 1-inch above the top of the 1-inch pipe. Glue the cap on the 2-inch pipe.
Drill 10 holes on two levels 1 inch apart on the end of the 2-inch pipe opposing the capped end.
Drill a hole on the capped end of the pipe and insert the 1/4-inch plastic tube. Glue it in place. Once glued, use the zip tie to secure it to the side of the pipe. Cut the tube where you want the water to stop draining.
Install the 2-inch pipe on top of the 1-inch pipe and fill the bed with pebbles or gravel, making sure to keep the 2-inch pipe firmly in place.