He went undrafted but was signed to a professional contract by the Buffalo Sabres of the National Hockey League on March 25, 2008. He spent 1 season with the Sabres' AHL, the Rochester Americans and then two seasons with the new affiliate, the Portland Pirates. He returned to the Rochester Americans for the 2010–11 AHL season. He then signed a contract with Rochester's then-affiliate, Florida Panthers. The Panthers traded Kostka along with Evan Oberg, to the Tampa Bay Lightning for James Wright and Mike Vernace. He played for the Norfolk Admirals and helped them win the Calder Cup during the 2011–12 AHL playoffs. He was then signed as a free agent by the Toronto Maple Leafs to a one-year contract. He got his first NHL point during his debut NHL game against the Montreal Canadiens on January 19, 2013.