In this example, we are deploying a WordPress application, which is a Vplatform for creating websites and blogs. WordPress uses MySQL single instance as its database with persistent volumes dynamically provisioned by PowerFlex CSI driver. The storage class used by PowerFlex CSI is vxflexos. Since the application is already in the Google marketplace, deploying the WordPress application requires just a few mouse clicks.
For more information about WordPress, see WordPress.
- Log in to Google Cloud Platform.
- Select Kubernetes Engine > Marketplace.
- Go to Kubernetes apps and select your deployment environment and search for WordPress.
Note: Since this is a sample workload, the free WordPress application is chosen for demonstration purposes.
Figure 14: WordPress selection wizard
- Select WordPress and click Configure and enter the namespace, PowerFlex storage class as vxflexos and configuration details. Enable Public IP access with create a NodePort service for WordPress web URL access by Node IP and NodePort details as shown in the following figure:
Figure 15: Application configuration
Examples to enter the details:
- Application Instance Name ─ wordpress-1
- Namespace─ WordPress
- StorageClass for Application: Vxflexos
- Storage size of PV in application: 5Gi
- Click Deploy to start the deployment.
- Verify if the deployment has been completed, select Kubernetes Engine > Applications as shown in the following figure:
Figure 16: Successful deployment of WordPress application
Note: Since the WordPress pods run inside the GKE on-premises cluster virtual machines, you will not see any additional virtual machines in vCenter when this application is deployed on a VMware based Anthos cluster.
- Verify that the deployment has created persistent volumes dynamically in the given storage class as shown in the following figure:
Figure 17: Persistent volume verification
- Because the NodePort service is configured during deployment, verify the service details as follows:
- You can access the WordPress application webUI using the following details:
Figure 18: WordPress application WebUI
- To scale application deployment, select Kubernetes Engine > Applications.
Select a deployed application and edit it to change the value of replica set. In this example, the WordPress application is a stateful set, and replica set value edited to five for WordPress and MySQL deployment. The default sample application deployed one replica each for WordPress and MySQL stateful set as shown in Figure 19.
- After editing the application for five replica sets, verify that the deployment is completed, and application is scaled as follows:
Figure 19: Application scaling
The Persistent volumes for new instances are dynamically scaled based on the replica set inputs as follows:
Figure 20: Persistent volumes scaled as per application