You deploy the second application, a Wordpress blog to your Tanzu Kubernetes cluster by using Helm and kubectl.
Procedure
- Log in to the Supervisor as a vCenter Single Sign-On Administrator user.
kubectl vsphere login --server supervisor_cluster_IP_address --TanzuKubernetesCluster tanzu_Kubernetes_cluster_name --TanzuKubernetesClusterNamespace tanzu_kubernetes_cluster_namespace --vsphere-username supervisor_cluster_administrator
- Switch the kubectl context to the Tanzu Kubernetes cluster.
kubectl config set-context tanzu_kubernetes_cluster_name
- Create a wordpress namespace.
kubectl create namespace wordpress
- Add the Bitnami repository for Helm charts.
helm repo add bitnami https://charts.bitnami.com/bitnami
- Update your local cache with the Bitnami repository details.
helm repo update
- Search for the Wordpress chart in the Bitnami repository.
helm search repo bitnami/wordpress
You get a return value for the Wordpress chart similar to that output.helm search repo bitnami/wordpress NAME CHART VERSION APP VERSION DESCRIPTION bitnami/wordpress 10.10.8 5.7.1 Web publishing platform for building blogs and ...
- Deploy Wordpress by using Helm CLI.
helm install sfo-w01-tkc01-wp01 --version version --namespace wordpress --set global.storageClass=vsphere-with-tanzu-storage-policy --set wordpressBlogName="Wordpress Instance" --set wordpressUsername=wp-admin --set wordpressPassword=wp-admin_password bitnami/wordpress
- Find the load balancer external IP address for the Wordpress service.
kubectl get svc --namespace wordpress sfo-w01-tkc01-wp01-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"
- After the deployment completes, open a Web browser and enter the load balancer IP from the previous step.
Results
A new browser window or tab opens with the "WORDPRESS INSTANCE" heading and with the "Just another Wordpress site" subheading. This is the Web interface for your new Wordpress website.