Earned income- SS

I am collecting a pension more than 27k and would like to start collecting SS at 65 (2 yrs before full eligibility).  Will the pension count as earned income, resulting in penalties or repayment once I start collecting SS?

 

thanks

 

A