This page describes how to create a new Kubernetes cluster via OpenStack Magnum by using Terraform or OpenTofu.
| Table of Contents |
|---|
Pre-requisites
The following pre-requisites must be satisfied.
- Have read and followed the EWC - IaC via Terraform and OpenTofu page.
- The Terraform or OpenTofu CLI installed.
- Application credentials to access the Openstack cloud project
There is a set of mandatory inputs required to create a new cluster which are:
- flavor_name : the resources (CPU, RAM, Disk) configuration for the VM (see as reference EWC VM plans )
- key_pair : configured SSH key which is needed to connect to the VM (see EWC - OpenStack Command-Line client for how to import it )
- security_groups : security groups are sets of applied IP filter rules which define networking access to the instance
- network : the network to be attached to the VM : external-internet: access to the Internet with public IP ; private-<tenant>: local private network within the tenant.
| Excerpt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The available selectable options could also be checked using the Opnstack CLI commands :
Write configuration filesCreate a directory for your configuration and change directory into it:
Create the main configuration file to define the infrastructure:
Open the
Replace the following fields as desired:
For instance for ECMWF can be :
Run Terraform or OpenTofu to create a Kubernetes cluster via OpenStack MagnumInitialize the directory :
Review the required changes:
Apply the changes to create the Kubernetes cluster :
Status can be then seen via:
Destroy the ClusterThe created cluster can be then destroyed by simply running:
|