Kubernete questions

Hey guys,

Im was recently introduced to kubernetes and as a result i have some questions.
The first question comes to cloud provisioning, by this i mean if its possible to use kubernete to inicializate a cloud instance like terraform. Or do i need to use ansible or terraform to do it?
I found Cloud Providers - Kubernetes where they talk about clouds but it does not provide much of an answer.

The second question comes from the Kubernetes API does it need to be done through command line ? not sure if i got it right.

Sorry, not sure I understand your first question. You mean if you can use the terraform kubernetes provider to create a cluster?

In that case, no. But you can use terraform to define the EC2 VMs and choose an AMI that with some user data does the trick.

Or, if you use kops, it generates terraform output and you can basically create, update, etc. your cluster with terraform easily.

Regarding the second question, yes. But you have a CLI, that underneath communicates with the API server, or a dashboard, etc. Is not that you need to do an HTTP request. Tools do that for you underneath and give you a nice interface to interact with.

Did I understand your questions correctly?

Thanks for the answers
The first one i already understood

As for teu second i wanted ti know if they dont have an interface to Interact direcly through code
Instead of requiring me do create a shell script to run commands

Yes, you can also do that.

If you’re using a cloud provider like Google Kubernetes Engine then you could easily enough call the GKE API to create your instances. This also applies to AWS (EKS) and Azure (AKS).

If you’re wanting to use something like ansible, or kubespray, you can use AWX/Ansible Tower to be able to hit a REST API to initiate the work.