Debug in the environment
When you deploy your application in a test environment and find problems with the application, you may want to debug the application in the environment. KubeVela provides the command to help you debug your application in the environment.
If your application uses workflow, make sure your app has the debug
policy before using the vela debug
command:
You can also use vela up -f <application yaml> --debug
to automatically add debug policy to your application.
You can also use vela debug <application-name> -s <step-name> -f <variable>
to view the contents of specified variables in a single step.
Applications with components only
Deploy the following application. The first component will use k8s-objects
to create a Namespace, and the second component will use the webservice
with gateway
trait to create a Deployment and its corresponding Service and Ingress.
apiVersion: core.oam.dev/v1beta1
metadata:
name: gateway-app
spec:
components:
type: k8s-objects
properties:
objects:
- apiVersion: v1
kind: Namespace
metadata:
name: test-ns1
properties:
image: oamdev/hello-world
ports:
- port: 8000
traits:
- type: gateway
properties:
domain: testsvc.example.com
"/": 8000
After the application is deployed, you can use the vela debug <application-name>
command to view all the resources rendered by the application.