This module deploys single-master Kubernetes cluster on NIFCLOUD using kubeadm.
This project is for develop environment, so please do not use this in production
Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:
- Terraform are installed on the machine where Terraform is executed.
- The Nifcloud Account you execute the module with has the right permissions.
- You can set environment variable
NIFCLOUD_ACCESS_KEY_ID
andNIFCLOUD_SECRET_ACCESS_KEY
- You can set environment variable
There are examples included in the examples folder but simple usage is as follows:
# Provider
provider "nifcloud" {
region = "jp-west-1"
}
# Module
module "minimum_k8s_cluster" {
source = "ystkfujii/minimum-k8s-cluster/nifcloud"
availability_zone = "west-11"
instance_key_name = "deployerkey"
}
Then perform the following commands on the root folder:
terraform init
to get the pluginsterraform plan
to see the infrastructure planterraform apply
to apply the infrastructure buildterraform destroy
to destroy the built infrastructure
Name | Description | Type | Default |
---|---|---|---|
availability_zone | The availability zone | string | |
cni | cni | string | containerd |
prefix | Prefix to include in the name of the resource to be created | string | 001 |
private_network_subnet | The subnet of private network | string | 192.168.10.0 |
instance_key_name | The key name of the Key Pair to use for the instance | string | |
instance_count_wk | Number of worker to be created | number | 2 |
instance_type_wk | The instance type of worker | string | e-large |
instance_type_cp | The instance type of control plane | string | e-large |
accounting_type | Accounting type | string | 1 |
Name | Description |
---|---|
security_group_name | The security group used in the cluster |
private_network_id | The private network used in the cluster |
worker_info | The worker information in cluster |
control_plane_info | The control plane information in cluster |
- Terraform 1.3.7
- Terraform Provider for Nifcloud 1.7.0
- Yoshitaka Fujii (@ystkfujii)