|
1 | | -# How to deploy into local Kubernetes cluster |
| 1 | +# Deployment into cluster using Camel JBang Kubernetes plugin |
2 | 2 |
|
3 | | -By default, the deployment aims OpenShift cluster. In case you need to deploy into Kubernetes, there is a small modification needed: |
| 3 | +## Manage deployment lifecycle |
4 | 4 |
|
5 | | -1) open Settings UI in VS Code |
6 | | -2) navigate to `Extensions > Debug Adapter for Apache Camel` |
7 | | -3) modify setting `Camel > Debug Adapter: Kubernetes Run Parameters` as you can see on picture below |
| 5 | +There are extensions which allows you to manage your deployments (which are part of an [Extension Pack for Apache Camel](https://marketplace.visualstudio.com/items?itemName=redhat.apache-camel-extension-pack)): |
8 | 6 |
|
9 | | - |
10 | | - |
11 | | -The picture describes how to deploy to local Kubernetes cluster using Minikube. You can use eg. also `Kind`. In that case, just change to `--cluster-type=kind`. |
| 7 | +- [OpenShift Toolkit](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-openshift-connector) |
| 8 | +- [Kubernetes](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools) |
12 | 9 |
|
13 | | -For more information see [Camel Kubernetes plugin official documentation](https://camel.apache.org/manual/camel-jbang-kubernetes.html). |
| 10 | +or you can use a power of Camel CLI described below. |
14 | 11 |
|
15 | | -## Follow logs |
| 12 | +### Follow logs |
16 | 13 |
|
17 | 14 | You can use Camel CLI to obtain logs of current running integration. In terminal window execute: |
18 | 15 |
|
19 | 16 | ```shell |
20 | 17 | jbang camel@apache/camel kubernetes logs --name=<name> |
21 | 18 | ``` |
22 | 19 |
|
23 | | -## Undeploy |
| 20 | +### Remove deployment |
24 | 21 |
|
25 | 22 | To remove current integration, you can use also Camel CLI. In this case the command is: |
26 | 23 |
|
27 | 24 | ```shell |
28 | 25 | jbang camel@apache/camel kubernetes delete --name=<name> |
29 | 26 | ``` |
| 27 | + |
| 28 | +#### Troubleshooting |
| 29 | + |
| 30 | +For a latest releases of Camel (4.8.1+) there could be problem when deleting deployments using Camel Jbang CLI, for details you can see reported upstream issue [CAMEL-21388](https://issues.apache.org/jira/browse/CAMEL-21388). |
| 31 | + |
| 32 | +In that case please try with previous version which was working better. |
| 33 | + |
| 34 | +```shell |
| 35 | +jbang -Dcamel.jbang.version=4.8.0 camel@apache/camel kubernetes delete --name=<name> |
| 36 | +``` |
| 37 | + |
| 38 | +## How to deploy into local Kubernetes cluster |
| 39 | + |
| 40 | +By default, the deployment aims OpenShift cluster. In case you need to deploy into Kubernetes, there is a small modification needed: |
| 41 | + |
| 42 | +1) open Settings UI in VS Code |
| 43 | + - Linux/Windows - `File > Preferences > Settings` |
| 44 | + - macOS - `Code > Settings... > Settings` |
| 45 | +2) navigate to `Extensions > Debug Adapter for Apache Camel` |
| 46 | +3) modify setting `Camel > Debug Adapter: Kubernetes Run Parameters` as you can see on picture below |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +The picture describes how to deploy to local Kubernetes cluster using Minikube. You can use eg. also `Kind`. In that case, just change to `--cluster-type=kind`. |
| 51 | + |
| 52 | +For more information see [Camel Kubernetes plugin official documentation](https://camel.apache.org/manual/camel-jbang-kubernetes.html). |
0 commit comments