kNN - what happens if more than K observation have the same distance to the centroid of the cluster
K-means does not make an assumption regarding how many observations should be assigned to each cluster. K is simply the number of clusters one chooses to generate. During each iteration, each observation is assigned to the cluster having the nearest mean. There is no assumption that all clusters should have a comparable number of observations assigned (i.e., for N observations, there is no expectation that each cluster should have ~ N/K observations assigned).

It is quite possible that the numbers of observations in the various clusters are highly imbalanced. This can be due to the distribution of the data, the number of clusters chosen (K), or even how the cluster means are initialized.