Need-For-Speed in the Volterra Distributed Application Infrastructure
Creating a Virtual Kubernetes Cluster

We will first need to create a new namespace. This namespace allows users to create and organize the different functions we will be running. Here, as you can see, my namespace is called maarham-test . In this namespace, we will need to create a Virtual Kubernetes Clusters that will go to all the Regional Edges and we will launch our Application in all REs with various pods.

We will fill out the name and the Virtual Site we will be using, which is ves-io-all-res .

In this, you will create a deployment based on your configurations, which is known as the manifests file in YAML code.

Here is the Deployment YAML File that I used:

apiVersion: apps/v1

kind: Deployment

metadata:

name: speedtest-deployment

labels:

app: nginx

spec:

replicas: 1

selector:

matchLabels:

app: nginx

template:

metadata:

labels:

app: nginx

spec:

containers:

- name: speedtest

image: maarham/maarham-speedtest:progress

ports:

- containerPort: 8080

In this, you can see that I used an image that may seem unfamiliar. I will go more in-depth on that subject matter later in the blog.

After that is created, the deployment will run, and then, the pods will begin to run. We will then create a service in this cluster as well with a YAML file.

Here is the Service YAML File:

apiVersion: v1

kind: Service

metadata:

name: Speedtest

spec:

selector:

app: MySpeedtest

ports:

- protocol: TCP

port: 80

targetPort: 8080

We will use the port 80 and target it at 8080, which is the port of the deployment.

KubeConfig Method

There is another method to this step. In this method, we will use vK8s cluster from our PC, instead of implementing the Deployment YAML File through the VoltConsole, we will using a manifests file with the KubeConfig function in the Terminal.

It requires the same type of steps to create the cluster however, after creating the cluster it is quite different.

We will need to download the KubeConfig file of the Virtual Kubernetes Cluster. This should download the file into your downloads folder. Locate and move it to the file you are using for this demonstration using the mv [KubeConfig File Name] [Location] function. Once that is done, we will create the Deployment YAML File vi deployments.yaml and copy-paste this file:

apiVersion: apps/v1

kind: Deployment

metadata:

name: speedtest-deployment

labels:

app: nginx

spec:

replicas: 6

selector:

matchLabels:

app: nginx

template:

metadata:

labels:

app: nginx

spec:

containers:

- name: speedtest

image: maarham/maarham-speedtest:progress

ports:

- containerPort: 8080

It is the same as the last one but we will be implementing it in a different way. We will use KubeConfig. If you do not know what that is, KubeConfig is compatible with kubectl , the CLI Tool of Kubernetes, and allows the user to organize information about clusters. We will be able to organize this deployment file to the specific cluster. To do that, we will need to use this command:

kubectl apply -f deployment.yaml --kubeconfig [KubeConfig file]

When doing this, the deployment will be created in the cluster and can be seen in the VoltConsole when you click on the Virtual Kubernetes Cluster.

You will be able to see the deployment running along with the pods running at each Regional Edge.

We can do the same thing for the service. We will first create the Service YAML File with vi service.yaml and copy-paste this code:

apiVersion: v1

kind: Service

metadata:

name: Speedtest

spec:

selector:

app: MySpeedtest

ports:

- protocol: TCP

port: 80

targetPort: 8080

It is the same Service YAML File we use previously but this time with KubeConfig. In order to do that, we will use this command to create the service within the cluster:

kubectl apply -f service.yaml --kubeconfig [KubeConfig file]

This can all be viewed in the Virtual Kubernetes Cluster in the VoltConsole.
['Aman Arham']
['Company', 'Cloud Computing', 'Technology', 'Volterra']