Looking for the best way to design a small cylinder with magnets inside

Hi, I am currently struggling trying to design a magnetic cap. The design includes a 1/4 inch cone housed within a small cover. I want to incorporate magnets inside the cylinder to connect to a cone-shaped magnet. How can I effectively integrate the magnets into the cylinder to ensure a secure and functional connection with the magnetic spike? I attached a photo of the basic design. Let me know if you have questions :)