Mediates the voltage-dependent potassium ion permeability of excitable membranes. Assuming opened or closed conformations in response to the voltage difference across the membrane, the protein forms a potassium-selective channel through which potassium ion.