Automating the provisioning of an entire new cluster is very easy, at least for some people with the required resources. But even for a small shop it is possible to automate it using stuff like Jenkins and Ansible. It is still relatively sophisticated stuff. It is not rocket science but not an elementary school project level either.
The aks-engine repo let you peep to what goes behind the scenes, but this is not the kind of beast you will grow at home - it is a public cloud provider with global scale, with the expected level of complexity and engineering. It is available on: https://github.com/Azure/aks-engine
This is doable through various provider/vendor-specific APIs. Pivotal's PKS has an API. GKE has one, EKS, AKS and so on have them too.
In the longer run there's meant to be a full Cluster API, which I presume will take over for that role: https://github.com/kubernetes-sigs/cluster-api