Chapter 5: Deploy an Application to Kubernetes
Activity 5: Installing and Scaling a WordPress Blog in Kubernetes Using Helm
Solution:
Perform the following steps to complete this activity:
- Install the WordPress helm chart. The release name should be devops-blog and the username should be admin. Use devops as your password and DevOps Blog as the blog name:
helm install --name devops-blog \
--set wordpressUsername=admin,wordpressPassword=devops \
--set wordpressBlogName="DevOps Blog" \
stable/wordpress
Figure 5.25: Helm installation of the WordPress chart
With successful installation, the output lists all the resources installed alongside the WordPress chart.
- Wait until all the pods are running and are ready:
kubectl get pods
Figure 5.26: The WordPress installation pods
- Open the home page of WordPress and check that it is installed successfully.
The URL can be found using the following commands:
# Google Kubernetes Engine installation
kubectl get svc devops-blog-wordpress -o jsonpath...