I'm moving my sink. And I have to run my drain pipe through my floor joist or cabinets. My floor joist are 2×8's. Can I run a 2 inch pipe through them. And if i did run them through my joist would it make them weaker?
It depends on the size of your drain. You can do it with a 1.5" PVC but a 2" really won't work.
Allowable hole size in joist
The maximum allowed hole you can drill in a joist is 1/3rd the depth of that joist. The actual depth of a 2x8 joist is 7.25" allowing only a 2.4" hole.
A 2" PVC pipe is 2.375" outer diameter (2-3/8") and you'll probably never get a 2.375" pipe into a 2.4" hole. Milwaukee is the brand plumbers use in my area and Milwaukee's hole saw kits don't even come with 2-3/8" saws because they're not practical.
If your drain is 1.5", Family Handyman has a helpful article showing you the right way to plan where to drill the hole in your joist. Note you need to plan on a 1/4" slope per foot of drain line, too; so don't figure on going through very many joists in series with this drain, or you'll be too far from the center of the joists and compromise them.
1.5" drain capacity
A 1.5" drain is only enough for 3 drainage fixture units (DFUs). That's sufficient for your kitchen sink & garbage disposal (DFUs per fixture table) but it is not enough for an additional dishwasher to meet code.