This module deploys single-master Kubernetes cluster to SAKURA Cloud using kubeadm
.
This project is for develop environment, so please do not use this in production
Customizations to the base installation are made to the Terraform variables for each deployment.
Examples of variables are provided in the file examples/kubernetes.tf
.
Get the modules and providers that Terraform will use to create the cluster resources:
$ terraform init
Test the blueprint before deploying:
$ terraform plan
Next, deploy the cluster:
$ terraform apply
This should run for a short time, and when complete, the cluster should be ready.
ssh
Nodes credentials are written beneath the certs/
directory.
You can use this to access the cluster by ssh.
$ usacloud server ssh -i certs/id_rsa <your-node-name>
kubectl
To use kubectl
command on the local machine, you need to download the kubeconfig
file as follows:
$ usacloud server scp -i certs/id_rsa <your-master-node-name>:/etc/kubernetes/admin.conf ./admin.conf
$ export KUBECONFIG=$(pwd)/admin.conf
$ kubectl cluster-info
terraform-sakuracloud-kubernetes-single-master
Copyright (C) 2018-2019 Kazumichi Yamamoto.
This project is published under Apache 2.0 License.