vK8s Workload
Objective
This guide provides instructions on how to create, deploy, and advertise a virtual Kubernetes (vK8s) workload with F5® Distributed Cloud Services vK8s in F5® Distributed Cloud Console (Console). Distributed Cloud Services provide mechanisms to easily deploy applications across a global network and make them available closer to users in major metro markets. To learn more about how Distributed Cloud Services distribute application deployment, see Distributed Application Management.
To learn 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 Edge (RE) sites and advertised on the Internet using an HTTP load balancer.
-
Create a stateful service that is deployed on a Customer Edge (CE) site and advertised locally on the site.
Prerequisites
The following prerequisites apply:
-
A Distributed Cloud Services Account. If you do not have an account, see Create an Account.
-
To deploy applications on your sites, first create a vK8s object per the instructions in the Create Virtual K8s Object document.
-
A CE site for deploying the stateful service application on CE sites. 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 performed for each step.
The following video tutorial shows how to configure a simple service using vK8s workload:
Configuration Sequence
Deploying applications on the Distributed Cloud Services 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: Navigate to the vK8s Workload configuration.
-
Log into Console.
-
Select
Distributed Apps
.
Figure: Console Homepage
-
Select your application namespace or create one where your application needs to be deployed.
-
Select
Applications
>Virtual K8s
. -
Select the vK8s object to open its dashboard.
Note: If you did not previously create the vK8s object, then the
Add Virtual K8s
option will be available to create vK8s.
- Select the
Workloads
tab.
Step 2: Start the workload creation process.
- Select
Add VK8s Workload
to open the workload creation form.
Figure: Start Workload Creation
-
In the
Metadata
section, enter a name for this workload. -
In the
Select Type of Workload
section, select an option from theSelect Type of Workload
menu. The following options are supported:-
Select
Simple service on all REs
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 a simple service.
Figure: Workload Service Options
- Select
Simple service on all REs
and then selectConfigure
.
Figure: Simple Service
Step 3: Configure Simple Service.
Perform the following:
Step 3.1 Configure container.
-
Select
Configure
. -
In the
Name
field, enter a name for the container. -
In the
Image Name
field, enter a name. TheImage Name
is the name of the Docker image to use and specified in the<path>:<imagetag>
format.
Note: If your registry is a Docker Hub, then the value of the
Image Name
field should be specified in thedocker.io/<path>:<imagetag>
format.
- From the
Select Container Registry
menu, select the type of registry used:Public Registry
orPrivate Registry
.
Figure: Container
-
To configure more options, select
Show Advanced Fields
. -
Select
Apply
.
Step 3.2 Optionally, add configuration parameters.
-
Select from the left menu or scroll to the
Configuration Parameters
section. -
Select
Add Item
.
Figure: Configuration
- From the
Select Configuration Parameter Type
menu, selectEnvironment Variable
.
Figure: Select Environment Variable
-
Enter the
Name
andValue
for the environment variable. -
Select
Apply
.
Step 3.3 Configure the advertise options.
-
Select from the left menu or scroll to the
Advertise Options
section. -
From the
Select Advertise Options
menu, selectDomains and Service Port
from the options. -
In the
Service Port
field, enter the port number on which the container will listen. -
In the
List of Domain
field, enter a domain.
Figure: Advertise Options
Step 4 Configure persistent storage.
By default, this option is set to Disabled
.
-
In the
Persistence
section, selectEnabled
from thePersistent Storage
menu. -
Configure the settings and select
Apply
to save the persistent storage settings.
Step 5 Complete creating the simple service workload.
-
Select
Apply
to go back to the workload configuration page. -
Select
Save and Exit
to finish creating the workload.
Figure: Save and Exit
- In the
Workloads
tab, check that the workload was created.
Verify the Workload (Simple Service) Status
Select the Deployments
tab and verify that the deployment with the same name as the workload is running.
Stateful Service
Deploy Workload (Stateful Service) to vK8s
Step 1: Navigate to the vK8s Workload configuration.
-
Log into Console.
-
Select
Distributed Apps
.
Figure: Console Homepage
-
Select your application namespace or create one where your application needs to be deployed.
-
Select
Applications
>Virtual K8s
. -
Select the vK8s object to open its dashboard.
Note: If you did not previously create the vK8s object, then the
Add Virtual K8s
option will be available to create vK8s.
- Select the
Workloads
tab.
Step 2: Start the workload creation process.
- Select
Add vK8s workload
to open the workload creation form.
Figure: Start Workload Creation
-
In the
Metadata
section, enter a name for this workload. -
In the
Select Type of Workload
section, select an option from theSelect Type of Workload
menu. The following options are supported:-
Select
Simple service on all REs
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.
-
-
Select
Stateful Service
and then selectConfigure
.
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
Containers
section. -
Select
Add Item
and then perform the following:-
In the
Name
field, enter a name for the container. -
In the
Image Name
field, enter a name. TheImage Name
is the name of the Docker image to use and specified in the<path>:<imagetag>
format.
-
Note: If your registry is a Docker Hub, then the value of
Image Name
field should be specified in thedocker.io/<path>:<imagetag>
format.
-
From the
Select Container Registry
menu, select the type of registry used:Public Registry
orPrivate Registry
. -
To configure more options, select
Show Advanced Fields
. -
Select
Apply
.
Step 3.2 Optionally, add configuration parameters.
-
Select from the left menu or scroll to the
Configuration Parameters
section. -
Select
Add Item
. -
From the
Select Configuration Parameter Type
menu, selectEnvironment Variable
. -
Enter the
Name
andValue
for the environment variable. -
Select
Apply
.
Step 3.3 Configure persistent storage.
-
Select from the left menu or scroll to the
Persistent Storage
section. -
Select
Add Item
. -
In the
Name
field, enter a name for the storage volume. -
In the
Storage Configuration
field, selectConfigure
.- Enter a value (in GiB) in the
Size
field for the persistent storage, and then selectApply
.
- Enter a value (in GiB) in the
-
In the
Volume Mount
section:-
From the
Mode
menu, selectRead Write
, and enter theMount Path
of the volume to the container. -
Select
Apply
.
-
Figure: Persistent Storage
Step 3.4 Optionally, configure ephemeral volume options.
-
In the
Volumes
section, selectShow Advanced Fields
. -
Select
Add Item
. -
Complete the configuration parameters and then select
Apply
.
Step 3.5 Configure deploy options.
-
Select from the left menu or scroll to the
Deploy Options
section. -
From the
Where to Deploy the workload
menu, selectCustomer Sites
. -
Select
Configure
to open the new form. -
Select a site from the list to deploy the stateful service on.
-
Select
Apply
to apply the deploy configuration.
Step 3.6 Configure advertise options.
-
Select from the left menu or scroll to the
Advertise Options
section. -
Select
Advertise In Cluster
from the options and then selectConfigure
to open the new form. -
Enter the port number in the
Port
and selectApply
to apply the advertise options. The port number is the port on which the container is listening.
Step 4 Complete creating the stateful service workload.
-
Select
Apply
to go back to the workload configuration page. -
Select
Save and Exit
to finish creating the workload. -
In the
Workloads
tab, check that the workload was created.
Verify the Workload (Stateful Service) Status
Select the Stateful Sets
tab and verify that a stateful set with the same name as the workload is running.