Preheat the electric pressure cooker by selecting sauté. Adjust the mode to 'Less'.
When the inner pot is hot, after about 30 seconds, add 1 cup water.
Break the spaghetti in half and place it into the pot in layers.
Pour the remaining cup of water. The pasta should now be submerged in water. If not, add 1/4 to 1/2 a cup of additional water into the pot.
Add the marinara sauce. Do not stir.
Pressure cook on high for 7 minutes. When the cooking cycle is complete, wait for 5 minutes and release pressure. [see note on how to calculate cooking times for pasta]
The pasta may be a little watery, but it will absorb the liquid in a few minutes.
If you are using spinach, add at this time. It should soften and wilt in a minute or two. Mix well and add salt as needed.
Carefully remove the inner pot from the Instant Pot, or the pasta will start drying up. Serve immediately with freshly grated parmesan cheese.
Notes
I used homemade marinara sauce, but you can use storebought sauce too. We love Rao's marinara sauce. Pasta cooking time = recommended cooking time on the box divided by 2 + 1 minute. Wait for 5 minutes after the cooking cycle is complete and then release pressure.For example, if the guideline on the box says 11 minutes, you should round it down to 10 minutes. Divide it into 2 to get 5 minutes, and then add 1 minute for a total cooking time of 6 minutes.If the pasta box shows a range, e.g. 11-13 minutes, I pick the middle of the range, which is 12. I would then do the math as per the formula above, and cook the pasta in the Instant Pot for a total of 7 minutes.
Water to pasta ratio
Always start with adding 1 cup of water to the heated inner pot, followed by the pasta. Then add as much water as you need to submerge the pasta. It usually ends up at a total of 2 cups of water for 8 oz pasta.
Tips for a perfect pasta
Preheat the inner pot and always add 1 cup of water first, followed by pasta.
Make sure the pasta is completely submerged in the water, or else you'll end up with undercooked pasta.
Add marinara sauce last, and do not stir it in.
Troubleshooting pasta
Got undercooked pasta? Cook it using the saute mode and add more liquid if needed.