I think the battle for running virtual machines in the enterprise was already won by vmware and so OpenStack became a niche for service providers wanting to do Nfvi workloads and had resources to afford dedicated teams to running OpenStack.
Kubernetes on the other hand capitalized on the need for running and orchestrating containers. Kubernetes also got a few things that right such as well documented and prescriptive set of tools one could use to get dev and production cluster up.
On a separate note, having worked on OpenStack I can also attest that the code was gross, not so much in kubernetes.