vK8s Workload

Objective

This guide provides instructions on how to create, deploy, and advertise a vK8s Workload on Volterra network cloud or edge cloud using Volterra vK8s in VoltConsole using a guided configuration. Volterra provides mechanisms to easily deploy applications across Volterra global network and make them available closer to users in major metro markets. To know more about how Volterra distributes application deployment, see Distributed Application Management.

To know more about vK8s Workloads, see vK8s Workload.

Using guided creation for vK8s Workload, you can create the following types of workloads:

  • Simple Service
  • Service
  • Stateful Service
  • Job

Using the instructions provided in this guide, you can perform the following:

  • Create a simple service that is deployed on all Regional Edges and advertised on the Internet using an HTTP load balancer.
  • Create a stateful service that is deployed on a Customer site and advertised locally on the site.

Prerequisites

The following prerequisites apply:

  • To deploy applications on your sites, first create a vK8s object as per the instructions in the Create Virtual K8s Object document.
  • A Volterra CE site for deploying the stateful service application on CE site.
  • Note: If you do not have a site, create a site using the instructions included in the Site Management guides.

Configuration

The configuration option to create the vK8s Workload guides you through the steps for the required configuration. This document covers each guided step and explains the required actions to be performed for each step.

Configuration Sequence

Deploying applications on Volterra network cloud requires you to perform the following sequence of steps:

Phase Description
Deploy Workload to vK8s Add vK8s Workload to the created vK8s object.
Verify the Workload Status Check the workload status.

Simple Service

Deploy Workload (Simple Service) to vK8s

Step 1: Log into the VoltConsole and navigate to the vK8s Workload configuration.

Change to your application namespace or create one where your application needs to be deployed. You can navigate to the vK8s Workload in the following way:

  • Select Applications from the configuration menu and Virtual K8s from the options pane. Click on the vK8s object to open its dashboard.

Note: In case vK8s object is not already created, the Add virtual K8s option will be available to create vK8s.

NavVK8s
Figure: Navigate to vK8s Workload

  • Select the Workloads tab
Step 2: Start the workload creation and enter metadata and select workload type.

Click Add Workloads to open the workload creation form and perform the following steps:

  • Enter a name in the Metadata section.
  • Select from the left menu or scroll to the Create Specification section.
  • Select an option for the Select Type of Workload. The following are the supported options:

    • Select Simple Service to create a simple service.
    • Select Service to create a service.
    • Select Stateful Service to create a stateful service.
    • Select Job to create a job.

This example configures simple service.

Metadata
Figure: Metadata and Create Specification

Select Simple Service on all REs and click Edit.

SimpleService
Figure: Simple Service

Step 3: Configure Simple Service.

Perform the following:

Step 3.1 Configure container.
  • Select from the left menu or scroll to the Container section.
  • Enter the Name of the container and the Image Name. The Image Name is the name of the Docker image to use.

Container
Figure: Container

Step 3.2 Optionally, add configuration.
  • Select from the left menu or scroll to the Configuration section.
  • Click on Add Item

ConfigurationAddItem
Figure: Configuration

  • Select Environment Variable from Select Configuration Parameter Type.

ConfigurationEnvVar
Figure: Select Environment Variable

  • Enter the Name and Value of the environment variable.

EnvVar
Figure: Environment Variable

Step 3.3 Configure advertise options.
  • Select from the left menu or scroll to the Advertise Options section.

AdvertiseOptions
Figure: Advertise Options

  • Select Service Port from the option and enter the port number in the Service Port. Service Port is the port on which the container is listening.

ServicePort
Figure: Service Port

Step 4 Complete creating the simple service workload.
  • Click on Apply to go back to the workload configuration page.

Apply
Figure: Apply

  • Click on Save and exit to finish creating the workload.

SaveExit
Figure: Save and Exit

  • Check that the workload is created.

Workload
Figure: Workload

Verify the Workload (Simple Service) Status

Click on the Deployments tab and verify that deployment with the same name as the workload is running.

Deployment
Figure: Deployments


Stateful Service

Deploy Workload (Stateful Service) to vK8s

Step 1: Log into the VoltConsole and navigate to the vK8s Workload configuration.

Change to your application namespace or create one where your application needs to be deployed. You can navigate to the vK8s Workload in the following way:

  • Select Applications from the configuration menu and Virtual K8s from the options pane. Click on the vK8s object to open its dashboard.

Note: In case vK8s object is not already created, the Add virtual K8s option will be available to create vK8s.

NavVK8s
Figure: Navigate to vK8s Workload

  • Select the Workloads tab
Step 2: Start the workload creation and enter metadata and select workload type.

Click Add Workloads to open the workload creation form and perform the following steps:

  • Enter a name in the Metadata section.
  • Select from the left menu or scroll to the Create Specification section.
  • Select an option for the Select Type of Workload. The following are the supported options:

    • Select Simple Service to create a simple service.
    • Select Service to create a service.
    • Select Stateful Service to create a stateful service.
    • Select Job to create a job.

This example configures stateful service.

Metadata
Figure: Metadata and Create Specification

Select Stateful Service and click Edit.

StatefulService
Figure: Stateful Service

Step 3: Configure Stateful Service.

Perform the following:

Step 3.1 Configure container.
  • Select from the left menu or scroll to the Container section.
  • Enter the Name of the container and the Image Name. The Image Name is the name of the Docker image to use.

Container
Figure: Container

Step 3.2 Optionally, add configuration.
  • Select from the left menu or scroll to the Configuration section.
  • Click on Add Item

ConfigurationAddItem
Figure: Configuration

  • Select Environment Variable from Select Configuration Parameter Type.

ConfigurationEnvVar
Figure: Select Environment Variable

  • Enter the Name and Value of the environment variable.

EnvVar
Figure: Environment Variable

Step 3.3 Configure persistent storage.
  • Select from the left menu or scroll to the Persistent Storage section.
  • Enter the Name of the persistent storage volume, the Size (in GiB) of the persistent storage, choose Read Write in the mode, and enter the Mount Path of the volume to the container.

PersistentStorage
Figure: Persistent Storage

Step 3.4 Configure deploy options.
  • Select from the left menu or scroll to the Deploy Options section.

DeployOptions
Figure: Deploy Options

  • Select Customer Sites from the option and click on Configure to open the new form.

CustomerSites
Figure: Customer Sites

  • Select a site from the list to deploy the stateful service on. In this example, we are selecting the Customer Site ce01-azure-new

CE01AzNew
Figure: Select Customer Site

  • Click on Apply to apply the deploy configuration

DeployApply
Figure: Apply

Step 3.5 Configure advertise options.
  • Select from the left menu or scroll to the Advertise Options section.

AdvertiseOptions
Figure: Advertise Options

  • Select Advertise In Cluster from the options and click on Edit to open the new form.

AdvertiseInCluster
Figure: Advertise In Cluster

  • Enter the port number in the Port and click on Apply to apply the advertise options. The port number is the port on which the container is listening.

AdvertisePort
Figure: Advertise Port

Step 4 Complete creating the stateful service workload.
  • Click on Apply to go back to the workload configuration page.

Apply
Figure: Apply

  • Click on Save and exit to finish creating the workload.

SaveExit
Figure: Save and Exit

  • Check that the workload is created.

Workload
Figure: Workload

Verify the Workload (Stateful Service) Status

Click on the Stateful Sets tab and verify that a stateful set with the same name as the workload is running.

StatefulSet
Figure: StatefulSets


Concepts


API References