This topic tells you how to create and apply a workload from a Supply Chain, how to observe a workload, and how to verify the scanning performed in a workload.
This section tells you how to create a workload from an existing Supply Chain that was created by using SCST - Scan 2.0 and one of the following:
You can define a workload in YAML or use the Tanzu Workload CLI plug-in.
Using YAML : Run:
Using Tanzu Workload CLI plug-in : Run:
Using the workload.yaml
created in the previous section, create the workload:
tanzu workload create --file workload.yaml --namespace DEV-NAMESPACE
Where DEV-NAMESPACE
is the same namespace where the intended workload will be.
This section shows you how to use the Tanzu Workload CLI plug-in to observe a workload.
-
List workloads in the cluster by running:
tanzu workload list -n DEV-NAMESPACE
Where
DEV-NAMESPACE
is the namespace where the workload is.Example output:
$ tanzu workload list -n grype-app-scanning-catalog Listing workloads from all namespaces NAMESPACE NAME KIND VERSION AGE grype-app-scanning-catalog golang-app-grype-test grypescs.example.com v1alpha1 35m 🔎 To see more details about a workload, use 'tanzu workload get workload-name --kind workload-kind'
-
View workload details by running:
tanzu workload get Sample WORKLOAD-NAME
Example output:
$ tanzu workload get golang-app-grype-test -n grype-app-scanning-catalog 📡 Overview name: golang-app-grype-test kind: grypescs.example.com/golang-app-grype-test namespace: grype-app-scanning-catalog age: 37m 🏃 Runs: ID STATUS DURATION AGE golang-app-grype-test-run-btlvx Succeeded 4m13s 37m 🔎 To view a run information, use 'tanzu workload run get run-id'
For more information, How to observe the Runs of your Workload.
Get the ImageVulnerabilityScan
name by looking in the namespace it was created in:
kubectl get ivs -n DEV-NAMESPACE
Example output:
NAMESPACE NAME SUCCEEDED REASON AGE
dev-namespace golang-app-test-123-bbrpz True Succeeded 4m52s
For information about how to retrieve scan results by using the ImageVulnerabilityScan
name, see Retrieve scan results.
For more information about how to create a workload, see Work with Workloads.