F5 XC EMEA Workshop > Class 5 - F5 XC K8s > Virtual Kubernetes Source |
Lab 1 - Virtual Kubernetes¶
For this lab, we will create the Virtual Kubernetes environment, add the Stocks service and route the traffic to the container deployed in the F5 XC environment.
We will now create the Virtual Kubernetes environment.
Go to Distributed Apps -> Applications -> Virtual K8s -> Add Virtual K8s -> Set the Name to $$vk8sName$$ -> Save and Exit
Create the workload that will define the configuration on how and where to deploy the Stocks POD
Click on $$vk8sName$$ -> Workloads -> Add VK8s Workload
Object Value Name arcadia-stocks Select Type of Workload Service In the same screen -> Configure -> Under Containers click Add Item -> Fill the bellow data -> Apply
Object Value Name stocks Image Name registry.hub.docker.com/sorinboiaf5/arcadia-stocks:ocp Select Container Registry Private Registry Private Registry shared/emeaworkshops In the same screen -> Under Where to Deploy the workload choose Regional Edge Sites -> Configure -> Fill the bellow data -> Apply
Object Value Input box system/tn2-lon In the same screen -> Under Advertise In Cluster click Configure -> Toggle the Show Advanced Fields switch -> Fill the bellow data -> Apply -> Apply -> Save and Exit
Object Value Port 80 Target Port Different than Port Different than Port 8080
1 Click ConfigCheck that the Stocks pod is up and running by clicking the Pods tabs in the Virtual Kubernetes
We need to create an Origin Pool which will dicover the POD
Multi-Cloud App Connect -> Load Balancers -> Origin Pool -> Add Origin Pool -> Fill the bellow data
Object Value Name arcadia-stocks-vk8s Port 80 In the same screen -> Origin Servers -> Add Item -> Fill the bellow data -> Apply -> Save and exit
Object Value Select Type of Origin Server K8s Service Name of Origin Server on given Sitess Service Name arcadia-stocks.$$namespace$$ Site or Virtual Site Virtual Site Virtual Site ves-io-shared/ves-io-all-res Select Network on the site vK8s Networks on Site
We need to change the routing to of the Stocks service to point to the Pod Origin Pool
Go to Multi-Cloud App Connect -> Load Balancers -> HTTP Load Balancer -> Click the 3 dots under the arcadia-ce-k8s-lb row -> Manage Configuration -> Edit Configuration -> Under Routes and click Edit Configuration -> Click the 3 dots to the right under the Path Prefix /v1/stock/ row -> Edit -> Click the Pen Icon respective to the Origin Pool row -> Under Routes and click Edit Configuration -> Change the Origin Pool to $$namespace$$/arcadia-stocks-vk8s -> Apply -> Apply -> Apply -> Save and Exit