The recognized whale watching season for Alaska is May through September, although a few stragglers might be seen near-ish this time on their journey to or from elsewhere in the Pacific, such as Hawaii or Mexico.
If you're lucky, you may see some from your cruise ship but you can certainly make an excursion of the event as there are plenty of pre-planned activities offered within the cruise industry or as result of the presence of cruise passengers.
You might catch glimpse of the gray whale, beluga, orca (killer whale), regionally renown humpback whale, and even the gigantic blue whale!
Here's where Kenai is, a little west from Anchorage and somewhat northwest along Alaska's Pacific Coast from where many glacier-viewing cruise itineraries stop in Juneau.
When we were in SE Alaska (Juneau and South) on a fishing trip whales (greys and humpbacks) were everywhere, all the time. It got to the point where we didn't even pay attention any longer. However, the Orca population there has declined because of the decline of salmon from over-commercial fishing. We were there at the end of June. According to the locals this is the best time of year weather-wise as long stretches of sunny weather are not uncommon, and being this is a temperate rain forest is a nice thing.
In many places around the world, marine animals are protected or there are local laws of some sort which prohibit interfering with them. This includes sea turtles and whales, in most instances.
Which means any interaction is typically at the discretion of the whales themselves, any respectable ship's captain will stay a safe distance or even disengage the engines when whales are in proximity. If you're really lucky, they'll come closer or even swim somewhat alongside your vessel. This is known as "mugging". Who wouldn't want to be mugged by a whale!