In this section, we will compromise a container by gaining 'exec' access and generate violation alerts on CBC Cloud Console.
Apply the compromised container yaml file:
Create a local proxy to reach the exposed dashboard service:
kubectl port-forward -n myapp service/dashboard 8080:8080
Visit the dashboard by opening http://localhost:8080 on your browser from within the VMware Tanzu Horizon Desktop
Hit Ctrl + C twice to exit out of the running proxy.
List the myapp pod. Copy the App name (Highlighted in screenshot below) by using Right Click or Ctrl + C
kubectl get pods -n myapp
Replace <dashboard-name> in the below command with the App name copied in previous step
kubectl exec -it <dashboard-name> -n myapp -c dashboard -- bash