# How to use apiserver ## Preparation The apiserver is enabled by default, but you need some extra works to make it accessible outside the k8s cluster. 1. For development environment, you can use `kubectl port-forward` to access the KubeVela apiserver. ```shell kubectl port-forward --namespace vela-system service/kubevela-vela-core-apiserver 8000:80 ``` 2. For production environment, you can set up Ingress to expose the KubeVela apiserver. ```shell cat < * 80 99m ``` ## Api ### Create or Update Application 1. URL ``` POST /v1/namespaces//applications/ ``` 2. Request Body Example ```json { "components": [ { "name": "express-server", "type": "webservice", "properties": { "image": "crccheck/hello-world", "port": 8000 }, "traits": [ { "type": "ingress", "properties": { "domain": "testsvc.example.com", "http": { "/": 8000 } } } ] } ] } ``` ### Delete Application ``` DELETE /v1/namespaces//applications/ ```