You are entering Canada, even if not exiting the cruise to go on land, you still enter Canadian territory and require a visa/authority to enter.
From Alaska Cruises:
The Canadian government requires foreign citizens from most countries other than the U.S. to obtain a visa for entry into Canada. This law affects all cruises that make a port of call in Canada including most cruises to and from Alaska and the Pacific Coast.
This will be checked and you wouldn’t want to risk it.
Credit:stackoverflow.com‘