Tanzu Community Edition

Documentation

Deploy a Test Workload to a Workload or Unmanaged Cluster

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

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

Prerequisites

You must have a workload or unmanaged cluster deployed.

Procedure

  1. If you are deploying to a workload cluster, switch configuration context to the target workload cluster.

    kubectl config use-context <WORKLOAD-CLUSTER-NAME>
    

    For example:

    kubectl config use-context tce-cluster-1
    
    Switched to context "tce-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
    

Join us!

Our open community welcomes all users and contributors

Community