Create Virtual K8s (vK8s) Object

Objective

This document provides instructions on how to create Virtual K8s (vK8s) on Volterra network cloud and edge cloud. Volterra provides mechanism to easily deploy applications using vK8s 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.

Using the instructions provided in this guide, you can create a virtual site to group sites managed by Volterra network cloud or edge cloud and associate it with Volterra vK8s. You can then deploy applications at your sites using this vK8s object. See K8s Deployment for instructions on how to perform application deployment using the vK8s object.

  • During maintenance or reboot of the edge site, the vK8s pods are replaced with new pods and new names in order to obtain fresh identities for pods.
  • Refer to the Restrictions in case of deploying apps using vK8s for network cloud sites (REs).

Prerequisites


Restrictions

The following restrictions apply in case deploying applications on Volterra network cloud (REs):

  • Running of containers/pods with host networking hostNetwork, host PID hostPID or host IPC hostIPC is not supported.
  • Running containers/pods as privileged is not supported.
  • Running containers/pods as root user is not supported. The container images are required to support running under arbitrary user id and group id. Filesystem write permissions should not be specified to a particular user id. Else container will crash with the permission denied message.
  • Container/pod can use only ports higher than 1024.
  • The containers are not supported to use host mount volumes. The list of supported Kubernetes volumes are:

    • configMap
    • downwardAPI
    • emptyDir
    • persistentVolumeClaim
    • projected
    • secret

Configuration

Volterra enables you to deploy applications on its network cloud sites. These sites are managed by Volterra and you can leverage Volterra Virtual Kubernetes (vK8s) to deploy applications and manage them at scale.

The following image shows the workflow of deploying applications on Volterra network cloud.

image3
Figure: Deploying Applications on Volterra’s Network Cloud Site

Configuration Sequence

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

Phase Description
Obtain Volterra Network Cloud/Edge Site Information Get the list of Volterra network cloud (RE) sites or edge (CE) sites and the labels associated with them.
Create Virtual Sites Create a virtual site and use the labels of the REs or CEs in the label expression to group them into the virtual site.
Create Volterra vK8s Create Volterra vK8s service object.

Obtain Volterra Network Cloud or Edge Site Information

This section explains the steps of selecting the network cloud or edge sites for deploying an application.

Step 1: Select Sites in the configuration menu and Site List in the options pane. In the filter section on the top, select Site Type and select REGIONAL_EDGE or CUSTOMER_EDGE from the dropdown menu.

sitetype
Figure: Filter Site Type

The following example is a sample of network cloud site filtering.

re sites
Figure: List Network Cloud Sites

The following example is a sample of edge site filtering.

ce sites
Figure: List Edge Sites

Step 2: Expand any site to read its schema. The metadata section contains all labels associated with the site.

sitelabels re
Figure: Site Labels

For example, the above sample site contains the labels ‘siteType’=’re’ and ‘region’=’newyork’. Using these keys/labels, you can create an expression to group this site in a virtual site.


Create Virtual Site

Virtual sites provide mechanism to group the sites and by associating a virtual site with the vK8s object, you can easily deploy the apps to those sites. You can create virtual sites in shared namespace or application namespace. Virtual sites in shared namespace can be used for vK8s in all namespaces. This example shows creating virtual sites in application namespace.

Step 1: Change to your application namespace using the namespace selector. Select Applications -> Virtual Sites from the configuration menu. Click Add virtual site to create a virtual site.

Step 2: Enter the name, labels, and description for the Name, Labels, and Description fields respectively. Select a type for the Site Type field.

Step 3: Prepare label expression to group edge (CE) or network cloud sites (REs).

Network Cloud Virtual Site: This example shows selecting RE sites of type given by label ves.io/siteType=ves-io-re and located in region given by label ves.io/Region=ves-io-paris. This creates a virtual site which maps to all the sites of type RE in Paris region.

Configure first label (site type) with the following values:

  • Known-key = “ves.io/siteType”
  • operator = ‘In’
  • value = “ves-io-re”

image15
Figure: Virtual Site ‘SiteType’ Label

Configure second label (site region) with the following values:

  • Known-key = “ves.io/region”
  • operator = ‘In’
  • value = “ves-io-paris”

image2
Figure: Virtual Site Region Label

Edge Cloud Virtual Site: This example shows selecting CE sites of type given by label ves.io/siteType=ves-io-ce and provider given by label provider=AWS. This creates a virtual site which maps to all the CE sites with AWS provider.

Configure first label (site type) with the following values:

  • Known-key = “ves.io/siteType”
  • operator = ‘In’
  • value = “ves-io-ce”

Configure second label (site region) with the following values:

  • Key = “provider”
  • operator = ‘In’
  • value = “AWS”

provider aws ce
Figure: CE Virtual Sites with Provider Label

Step 4: Click Add virtual site to create virtual site.

Note: You can check the sites selected by the virtual site by visiting the Site Map of virtual site monitoring view. Click on your virtual site from the list of virtual sites displayed in the Applications -> Virtual Sites view.


Create Volterra vK8s

This section explains the procedure of creating a Virtual K8s (vK8s) object. A namespace can only hold one vK8s object.

Step 1: Change to your application namespace using the namespace selector. Select Applications -> Virtual K8s from the configuration menu. Click Add virtual K8s to create a vK8s object.

add vk8s
Figure: vK8s Creation

Step 2: Enter a name and click select vsite ref. Select virtual sites for applying the vK8s with that site.

The following example associates the virtual site that selects all the AWS edge sites.

vsite ref ces
Figure: Virtual Site Selection for Edge Sites

The following example associates the virtual site that selects all Volterra network cloud sites in Paris region.

vsite ref res
Figure: Virtual Site Selection

Step 3: Click Add virtual K8s to create vK8s. The vK8s object gets created and gets displayed on the screen.

Step 4: Download kubeconfig of vK8s created above. This is required for any CLI based operations.

vk8s kcfg
Figure: Download vK8s KubeConfig

Note: You can edit the virtual site associated with vK8s object using the Edit Virtual Sites option.

image8
Figure: vK8s Virtual Site Selection

Note: You can use Volterra specific annotations to select the sites where the Kubernetes application needs to be deployed. These annotations can be provided alongside with other configuration in the Kubernetes Deployment manifest. For more information on annotations, see Resource Management for Volterra vK8s.

"annotations": {
      "ves.io/virtual-sites": "demo-volterra/demo-vK8s-network-cloud"
    }

Concepts


API References