I've been experimenting with camel-kubernetes and noticed some odd behaviour after my camel context is shut down. It seems that not everything is cleaned up and there are still some background threads running.
I wrote a unit test that can help to replicate the problem.
Run the test, then wait for the camel context to shut down. Afterwards, the thread will sleep for 5 minutes. During this time, stop the Kubernetes cluster and you'll see the following exception thrown (or something like it):
Which indicates that the pod watcher was still active and connected to the k8s cluster, despite camel having been shutdown. This is not ideal when Camel is run within an OSGI or JavaEE container.