Virtual Data Center allows you to create your virtual infrastructure, which usually consists of virtual machines, internal networks, and public IP addresses. You can use your virtual machines for any type of workload, such as object storage, network storage, container host, Kubernetes cluster, etc.
This tutorial will help you configure your Virtual Data Center project on CinderCloud hosting using the GUI. As an example, we will present how to create a simple virtual infrastructure architecture for a testing Kubernetes Cluster.
Example Use Case: Virtual Architecture Setup for Kubernetes Cluster
Our virtual Kubernetes cluster consists of 3 nodes based on Ubuntu 24.04 LTS. We will also create a jump host to allow users to reach our virtualized K8s cluster from the Internet. The Jump Host may work as a Gateway for Kubernetes nodes to communicate with the Internet.
For the sake of this use case, we will assign the following virtual machines' IP address setup:
JumpHost:
- Public IP: 212.XXX.XXX.XXX
- Internal IP: 192.168.1.1
Kubernetes node #1:
- Internal IP: 192.168.1.11
Kubernetes node #2:
- Internal IP: 192.168.1.12
Kubernetes node #3:
- Internal IP: 192.168.1.13
1. Creating a Virtual Network
First, we must create a Virtual Network (internal, isolated network), which our K8s nodes will use for inter-node communication. We also need one interface on the Jump Host to be connected to the Virtual Network, so that the Jump Host can communicate with Kubernetes nodes.
Click on the Create New Virtual Network button:
Fill in the parameters for the Virtual Network:
Creating the network may take up to 1 minute. After creation, the network is visible on the Virtual Networks list:
2. Creating JumpHost / Router Virtual Machine
JumpHost will let us connect to our secure, isolated resources, and it can also act as a router and gateway for internal Kubernetes nodes to access software updates from within the VDC.
Click on the Add New Virtual Machine button:
On the New Virtual Machine configuration page, type in the VM name, description, and choose VM image type:
Scroll down, and type in the remaining VM parameters. Because this VM will act as a JumpHost / Router, we need to assign two network interfaces and IP addresses, one from the Internet, and another one from the Virtual Network (IP: 192.168.1.1).
Mandatory VM parameters:
vCPU - the number of cores assigned to the VM
CPU Limit - this value should be equal to the vCPU value
VM RAM [MiB] - the amount of assigned RAM
Disk Size [GiB] - total disk capacity
Default User - regular, non-root user of the VM, our VM images don't have a root password configured, use sudo with regular user for elevated privileges
Password - default user password
Optional VM parameters:
Search Domain: domain name to be automatically added to the hostname during DNS search
Name Server: main nameserver IP address
Second Name Server: alternative nameserver IP address
Once the parameters are filled in, click the Confirm button to create the VM.
VM creation may take up to 10 minutes; once accomplished, the VM status will change from Build to Stopped.
To start the VM, click on the Pencil Icon to display VM details:
On the Product Details page of the JumpHost VM, click on the Start tile to start the VM:
3. Creating virtualized Kubernetes nodes
Since K8s nodes are supposed to work in an isolated environment, they need only one network interface, attached to the previously created internal-net.
To create the first VM to be used for the Kubernetes node (kubernetes-1), click on the Add New Virtual Machine Button:
On the New Virtual Machine configuration page, type in the VM name, description, and choose VM image type:
Scroll down, and type in the remaining VM parameters. This VM will act as an internal Kubernetes node, so we need to assign only one network interface and one internal IP address (IP: 192.168.1.11):
Once the parameters are filled in, click the Confirm button to create the VM.
Repeat the steps above to create the remaining kubernetes-2 and kubernetes-3 nodes analogously.
The picture below presents our complete Kubernetes testing environment setup:
Our virtual infrastructure is complete and ready to start operating system configuration inside the virtual machines.