After you have provisioned a Tanzu Kubernetes cluster, it is good practice to deploy a test workload and validate cluster functionality.

Use the kuard demo app to verify that your Tanzu Kubernetes cluster is up and running.

Prerequisites

Procedure

  1. Switch configuration context to the target Tanzu Kubernetes cluster.
    kubectl config use-context TANZU-KUBERNETES-CLUSTER-NAME
    For example:
    kubectl config use-context tkgs-cluster-1
    Switched to context "tkgs-cluster-1".
  2. Deploy the kuard demo app.
    kubectl run --restart=Never --image=gcr.io/kuar-demo/kuard-amd64:blue kuard
    Expected result:
    pod/kuard created
  3. Verify that the pod is running.
    kubectl get pods
    Expected result:
    NAME                     READY   STATUS    RESTARTS   AGE
    kuard                    1/1     Running   0          10d
    
  4. Forward the pod container port 8080 to your local host port 8080.
    kubectl port-forward kuard 8080:8080
    Expected result:
    Forwarding from 127.0.0.1:8080 -> 8080
    Forwarding from [::1]:8080 -> 8080
    Handling connection for 8080
    
  5. Using a browser go to http://localhost:8080.
    The kuard demo app web page appears which you can interact with and verify aspects of your cluster. For example, perform liveness and readiness probes.
  6. Stop port forwarding by pressing Ctrl+C in the kubectl session.
  7. Delete the kuard pod.
    kubectl delete pod kuard
    Expected result:
    pod "kuard" deleted
  8. Verify that the pod is deleted.
    kubectl get pods