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.
Procedure
- 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".
- Deploy the
kuard
demo app.
kubectl run --restart=Never --image=gcr.io/kuar-demo/kuard-amd64:blue kuard
Expected result:
pod/kuard created
- Verify that the pod is running.
Expected result:
NAME READY STATUS RESTARTS AGE
kuard 1/1 Running 0 10d
- 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
- 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.
- Stop port forwarding by pressing
Ctrl+C
in the kubectl session.
- Delete the
kuard
pod.
Expected result:
pod "kuard" deleted
- Verify that the pod is deleted.