About a month ago, a recruiter at Google told me that if I didn't get an internship at Google this Fall, the closest thing I could get to an internship is to regularly contribute to an open source project that Google maintains such as Kubernetes or Angular. Long story short, I didn't get the position, but that advice really stuck with me, and I started contributing to open source.
So far I made contributions to more than 7 codebases, all maintained by different organizations I admire ranging from a browser vendor such as Mozilla to a developer focused blogging platform such as DEV.
I think contributing to an open source project is the closest experience you can get to an internship. For one, you have direct access to 2-3 project maintainers as mentors. And second you're contributing to a large code base just as you would do at any programming job. The best thing about contributing to open source is that you needn't formally apply on a competitive job board. You simply raise your hand and ask if you can help, and for the most part the project maintainers are totally happy to have you on board. Remember: very few people say no to free labor.
The final takeaway: do you ever want to play in the big leagues? If yes, contributing to an open source project that is actively maintained by a target company is a pretty decent proxy.