vK8s Resources


This document provides instructions on how to deploy resources 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.

The vK8s resources covered in this guide are:

  • Service
  • Job
  • Config map
  • Secret

To deploy vK8s resources, 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 resources with the kubeconfig of the vK8s object.



You can deploy vK8s resource in one of the following two ways:

  • Using the resource manifest directly in the VoltConsole.
  • Using the resource manifest and kubeconfig file of vK8s cluster from CLI with Kubectl.

Perform the following steps:

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.
  • Click ...-> Download for the created vK8s object to download its kubeconfig file.
  • Set environment variable for the downloaded kubeconfig in your local machine.
export KUBECONFIG=<vK8s-kubeconfig>

Note: In case of deployment using kubectl, setting KUBECONFIG variable deploys the resources to the vK8s.

Step 1.2: Prepare the manifest file for the resource.

Create a file in your local machine and enter the manifest content in JSON or YAML format. The following is the list of sample manifests:

  • vK8s service manifest sample:
apiVersion: v1
kind: Service
  name: emailservice
    app: emailservice
    ves.io/proxy-type: HTTP_PROXY
    ves.io/http2-enable: "true"
  type: ClusterIP
    app: emailservice
  - name: grpc
    port: 5000
    targetPort: 8080
  • vK8s job manifest sample:
apiVersion: batch/v1
kind: Job
  name: pi
      - name: pi
        image: perl
        command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
      restartPolicy: Never
  backoffLimit: 4
  • vK8s config map manifest sample:
apiVersion: v1
  mysqld.conf: "[mysqld]\npid-file\t            = /var/run/mysqld/mysqld.pid\nsocket\t\t
    \           = /var/run/mysqld/mysqld.sock\n# Where the database files are stored
    inside the container\ndatadir\t\t            = /var/lib/mysql\n\n# My application
    special configuration\nmax_allowed_packet          = 32M\nsql-mode                    =
    'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION'\n\n# Accept connections from any
    IP address\nbind-address\t            =\n"
kind: ConfigMap
  creationTimestamp: null
  name: mysql-conf
  • vK8s secret - Generate the secret using the following command:
kubectl create secret docker-registry dock-secret --docker-server=docker.io --docker-username="<registry username>" --docker-password="<registry password>" --docker-email=<registry email>

Note: In case of generating the secret using above command, the secret is directly created on vK8s and there is no need of performing any action on VoltConsole.

Step 1.3: Deploy the resource.
Step 1.3.1: Deploy from VoltConsole.
  • Navigate to your namespace and select Applications -> Virtual K8s.
  • Click on your vK8s object to open its dashboard.
  • Click Services tab. Click Add Service and enter the service manifest prepared in Step 1.2. Click Save.

vk8s service
Figure: vK8s Services

  • Click Jobs tab. Click Add Job and enter the job manifest prepared in Step 1.2. Click Save.

vk8s job
Figure: vK8s Jobs

  • Click Configmaps tab. Click Add ConfigMap and enter the config map manifest prepared in Step 1.2. Click Save.

vk8s configmap
Figure: vK8s ConfigMaps

  • Click Secrets tab. Click Add Secret and enter the secret manifest prepared in Step 1.2. Click Save.

Note: You can directly create secret on vK8s using kubectl as shown in Step 1.2.

vk8s secret
Figure: vK8s Secrets

Step 1.3.2: Deploy using Kubectl.

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. See Step 1.2 for sample manifests.

Enter the following command to deploy the resource. This sample deploys a vK8s service.

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


API References