vK8s Deployment

Objective

This document provides instructions on how to deploy applications on Volterra network cloud or edge cloud using Volterra vK8s. Volterra provides mechanism 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 deploy applications on your sites, first create a vK8s object as per the instructions in the Create Virtual K8s Object document.

Using the instructions provided in this guide, you can deploy applications on your sites with the kubeconfig of the vK8s object.


Prerequisites


Restrictions

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

  • 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
  • During maintenance or reboot of the site, the vK8s pods are replaced with new pods and new names in order to obtain fresh identities for pods.

Configuration

Configuration Sequence

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

Phase Description
Deploy Applications to vK8s Add applications deployments to the created vK8s object.
Verify the Application Deployment Status Check the application deployment status and site status.

Deploy Applications to vK8s

Deploy Kubernetes objects to vK8s after virtual sites are chosen. Any object created through this vK8s gets reflected on all sites which are part of the virtual site.

You can deploy applications via two methods:

  • UI via VoltConsole to deploy applications
  • CLI using kubectl (by obtaining a kubeconfig file from VoltConsole)

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"
    }

This document covers adding a Kubernetes Deployment using CLI.

Step 1.1: Navigate to your vK8s object and download its kubeconfig.
  • Click on the application namespace option on the namespace selector. Select your application namespace from the namespace dropdown list to change to that namespace.
  • Select Applications in the configuration menu and Virtual K8s in the options pane.

    vk8s nav new
    Figure: Navigate to vK8s Creation

  • Click ...-> Download for the created vK8s object to download its kubeconfig file.
Step 1.3: Deploy the web application.

To deploy the web application in a K8s cluster, the following are required:

  • Kubeconfig of the K8s cluster. For this, use the vK8s kubeconfig downloaded in previous step.
  • Manifest file of your web application. Download the sample this example uses and edit its fields as per your application.

Enter the following command to deploy the application:

kubectl apply -f k8s-app-manifest.yaml --kubeconfig vk8s-kubecfg.yaml

This completes deployment of application across all sites selected by the virtual site associated with your vK8s object.

Check the pod creation status:

$ kubectl get pods --kubeconfig vk8s-kubecfg.yaml

NAME                                     READY   STATUS    RESTARTS   AGE
cartservice-7dc68df6db-z77h6             2/2     Running   15         13h
cartservice-847c7b5fb7-kt7nt             2/2     Running   1205       4d18h
cartservice-f479bcf99-626pc              2/2     Running   0          13h
checkoutservice-5565f4b945-79p6l         2/2     Running   0          13h
checkoutservice-66b55f768b-4tnz2         2/2     Running   0          13h
checkoutservice-68b8b49ff8-ds6br         2/2     Running   0          4d18h
currencyservice-6967b6b6d9-cbz8h         2/2     Running   0          10d
currencyservice-976b7969b-ndkbv          2/2     Running   0          13h
currencyservice-d87c46889-q7gdg          2/2     Running   0          13h
emailservice-55b46c6d6b-dxngg            2/2     Running   0          4d18h
emailservice-c5566464c-hhmxb             2/2     Running   0          13h
emailservice-d886bb6f8-xgj64             2/2     Running   0          13h
frontend-6ff5b6764-f2jp2                 2/2     Running   0          13h
frontend-8fd97cd6c-z7lzt                 2/2     Running   0          13h
frontend-bbf4fd775-8wvbz                 2/2     Running   0          10d
loadgenerator-67d7649fd5-xx2bz           2/2     Running   0          13h
loadgenerator-86596bff7d-dzrjh           2/2     Running   0          13h
loadgenerator-d96dd88c8-tm9k2            2/2     Running   0          10d
paymentservice-5598cf5dd-8prlm           2/2     Running   0          10d
paymentservice-5c4f4458df-b4fpg          2/2     Running   0          13h
paymentservice-7579f47d44-xqnd6          2/2     Running   0          13h
productcatalogservice-5c8c679f6f-g25hm   2/2     Running   2          13h
productcatalogservice-7bf45c88bd-8t2p2   2/2     Running   0          13h
productcatalogservice-fc7f9bcf6-7jsbq    2/2     Running   0          10d
recommendationservice-5c6b6b494c-5jjxf   2/2     Running   0          4d18h
recommendationservice-687849c8b-ljkmh    2/2     Running   0          13h
recommendationservice-94867fb55-fn4lg    2/2     Running   0          13h
redis-cart-6dd5596479-99d5c              2/2     Running   0          13h
redis-cart-79988f9fd4-d6rnt              2/2     Running   0          13h
redis-cart-d778ddf99-xjqm7               2/2     Running   0          10d
shippingservice-5f94f76df7-wbg86         2/2     Running   0          13h
shippingservice-6f578dbdf6-2gz4k         2/2     Running   0          13h
shippingservice-7fc4f5b6c6-pqblb         2/2     Running   0          4d18h

Verify the Application Deployment Status

Step 1: After the deployment is created, VoltConsole enables users to check the status of the deployed application. Expand the deployment in the Deployment tab to see the status.

deps
Figure: vK8s Deployment Status

As seen in the above example, the application ‘cartservice’ is healthy and deployed on the virtual site ‘ves-all-res’ which maps to Volterra network cloud sites.

Step 2: Click the Pod tab to get a per-pod view.

pods
Figure: vK8s POD status

Step 3: You can also get information of applications/deployments along with resource metrics based on the Virtual site they are deployed in. Select Applications from configuration menu and Virtual sites from the options pane.

vsite deps
Figure: Network Cloud Virtual Site status

After the application is deployed using vK8s, you can use it with other configuration objects of Volterra platform. For example, advertise the application across the public network.


Concepts


API References