Wow the responses here are really off at the moment. I'm going to try and help.
So, what you're going to want to do is add all the subdomain A records you need to you DNS (sounds like you're using cloudflare for that, not required, but that should be fine).
Those DNS records are all going to be the same IP record, that's fine.
What you need to do after that, so that you don't have to enter ports is a bit more complicated. For web servers, some kind of reverse proxy like nginx, haproxy, apache, etc is what you need. The term you're looking for is "virtual host".
A virtual host setup is basically one where a reverse proxy looks at the domain name that was used to access the server over HTTP and then uses that to decide what server running on the machine you actually talk to.
It's HTTP that actually is passing along the domain name you used, so if the service isn't HTTP you may or may not be able to do anything depending on the underlying protocol.
So to recap:
- Set up your DNS records
- Set up an HTTP reverse proxy
- Add virtual hosts for each service you added a DNS record for to the reverse proxy (so that the reverse proxy can turn foo.example.com into example.com:xyz -- localhost:xyz in practice, morally example.com:xyz though -- behind the scenes)