/ Developer

Creating Kubernetes by Terraform

To create a server using kubernetes:

Create a Personal access tokens and save the generated token somewhere:

Captura-de-Tela-2018-06-25-a-s-14.16.54-1

Then create a ssh key and save the Fingerprint.

In the terraform directory run:

PS: In the terraform plan and terraform apply commands, the token, the number of workers and the fingerprint, respectively, must be entered.

terraform init

terraform plan

terraform apply

After the execution is finished, you can see the clusters running:

kubectl --kubeconfig ./secrets/admin.conf get nodes

Nodes must be Ready.

If you only want a node master without workers, execute:

kubectl taint nodes --all node-role.kubernetes.io/master-

Creating Kubernetes by Terraform
Compartilhe isto