Kate Hudson never appeared on Glee.
You are likely thinking of Gwyneth Paltrow, who guest-starred as Holly Holliday (substitute teacher) in Season 2. She performed several musical numbers (e.g., "Forget You," "Landslide," "Do You Wanna Touch Me"). It's unclear if she did all her own dancing; the show used professional dancers for complex routines.