Lab 1 - Review vK8s Cluster and Deploy vK8s Workload

In this lab, we will learn the following:

  • Review the previously-created Virtual K8s cluster

  • Configure a vK8s workload utilizing a containerized app from a private registry

  • Deploy a vK8s workload within a vK8s site

  • Advertise a vK8s workload within a cluster via custom HTTP port

Core concepts

Workload

Workload is used to configure and deploy a workload in Virtual Kubernetes. A workload may be part of an application. Workload encapsulates all the operational characteristics of Kubernetes workload, storage, and network objects (deployments, statefulsets, jobs, persistent volume claims, configmaps, secrets, and services) configuration, as well as configuration related to where the workload is deployed and how it is advertised using L7 or L4 load balancers. A workload can be one of simple service, service, stateful service or job. Services are long running workloads like web servers, databases, etc. Jobs are “run to completion” workloads. Services and jobs can be deployed on Regional Edges or customer sites. Services can be exposed in-cluster, on the Internet by L7 or L4 load balancer, or on sites using an advertise policy.

Service

A service with one or more containers with configurable number of replicas that can be deployed on a selection of Regional Edge sites or customer sites and advertised within the cluster where is it deployed, on the Internet, or on other sites using TCP or HTTP or HTTPS load balancer.

Deploy

Since Kubernetes is becoming the de-facto industry standard for orchestrating applications, F5® Distributed Cloud has chosen to implement its control plane with a Kubernetes compatible API for orchestration while delivering additional capabilities of managing and securing multiple clusters across distributed locations. This makes it seamless to integrate with third party tools like Spinnaker for CI/CD, etc. For packaging of microservices, we prefer Docker images, which have become another de-facto approach.

For more core concepts, please review F5 Distributed Cloud documentation

Exercise 1 - Review Virtual K8s Site

  1. Access Distributed Apps on the F5XC Console

    ../../_images/1access_distributed_apps_service_menu-updated.png
  2. Select Applications -> Virtual K8s, then your Virtual K8s cluster from the list

    ../../_images/2access_applications_vk8s-udpated.png
  3. Review Sites on the vK8s dashboard - there should be 3. These 3 customer edge sites will be were our workloads will be deployed to.

    ../../_images/3review_vk8s_dashboard_sites-updated.png

Exercise 2 - Configure vK8s Workload Container

  1. Select Workloads -> Add vK8s workload

    ../../_images/4add_vk8s_workload-updated.png
  2. Complete the Metadata section by using your Firstname initial and Lastname altogether and append “-workload” at the end. Ex: For Andrew Smith, the site name will be “asmith-workload” (without the quotes!) Use this value for Name and Description, then select Service from the Select Type of Workload list.

    ../../_images/5workload_metadata_and_service-updated.png
  3. Next, click the Configure link within the Service sub-section.

  4. Select Add Item within the Containers section

    ../../_images/6add_container-updated.png
  5. Complete the Container Configuration section by providing a Name and details for which Image to Use

    • Name: f5xcdemoapp

    • Image Name: colemaneast.azurecr.io/f5xcdemoapp

    • Container Registry: Private Registry

    • Private Registry: shared/azure-registry

    ../../_images/7container_config-updated.png
  6. Click Apply

Exercise 3 - Configure vK8s Workload Deployment Options

  1. Within the Deploy Options section, set Where to Deploy the Workload to Customer Virtual Sites, then click the Configure link within the Customer Virtual Sites section.

    ../../_images/8deploy_options-updated.png
  2. Select the agility-k8s-vsite vK8s site name from List of Customer Virtual Sites to Deploy, then Apply.

    ../../_images/9select_customer_site-updated.png

Exercise 4 - Configure vK8s Workload Advertisement Options

  1. Within the Advertise Options section, set Options to Advertise the Workload to Advertise In Cluster, then click the Configure link within the Advertise in Cluster section

    ../../_images/10select_advertise_options-updated.png
  2. Within the Select Port to Advertise section, set Select Port to Advertise to 3000, set Application Protocol to HTTP. Finally click Apply. This will set the clusterIP port to 3000.

    • Port: 3000

    • Application Protocol: HTTP

    ../../_images/11set_advertise_port-updated.png
  3. With the vk8s workload configuration now completed, Click Apply again, then Save and Exit from the vK8s Workload configuration page

    ../../_images/11_b_vk8s_apply_complete_config.png ../../_images/11_c_vk8s_saveandexit_complete_config.png
  4. In less than a minute, you should see the workload added with 3 total sites and 3 total pods (you may need to click the “Refresh” button)

    ../../_images/12_a_verify_3_workload_sites_pods_pending.png ../../_images/12b_verify_3_workload_sites_pods-updated.png