Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kamel uninstall seems to remain some resources in the cluster #3013

Closed
catshout opened this issue Feb 15, 2022 · 3 comments
Closed

kamel uninstall seems to remain some resources in the cluster #3013

catshout opened this issue Feb 15, 2022 · 3 comments
Labels
area/installation Installation and Topology

Comments

@catshout
Copy link

We do have 2 namespaces

camel-k for the global Camel-K Operator
integration for integrations

The Camel-K Operator has been installed in global mode in the namespace camel-k.

I did perform the following commands on our k8s cluster to cleanup the Camel-K installation ..

kamel reset -n camel-k
kamel reset -n integration
kamel uninstall --global --all
kubectl delete ns camel-k
kubectl delete ns integration

After that I did run ..

kubectl create ns camel-k
kubectl config set-context $(kubectl config current-context) --namespace camel-k
kubectl create secret generic kaniko-secret --from-file=/home/cas-dev-gke/kaniko-secret.json -n camel-k
kamel install --global --build-publish-strategy=Kaniko --registry gcr.io --organization cas-dev-gke --registry-secret kaniko-secret -n camel-k

I got a message so far ..

Error: Camel K seems already installed (use the --force option to overwrite existing resources): integrationplatforms.camel.apache.org "camel-k" already exists

It seems that something remains even after the Operator uninstall and namespace deletion.

@squakez
Copy link
Contributor

squakez commented Feb 17, 2022

I've tried the scenario a few times and sometimes it works correctly, but sometimes it fails (for me it failed with a pending service-account resource). In theory, the removal procedure is taking care of all resources:

$ kamel uninstall --global --all
Camel K Integration Platform removed from namespace default
Camel K Config Maps removed from namespace default
Camel K Registry Secret removed from namespace default
Camel K platform Kamelets removed from namespace default
Camel K Operator removed from namespace default
Camel K Role Bindings removed from namespace default
Camel K Roles removed from namespace default
Camel K Service Accounts removed from namespace default
Camel K Custom Resource Definitions removed from cluster
Camel K Cluster Role Bindings removed from cluster
Camel K Cluster Roles removed from cluster

For the time being, you please use the --force option to overcome the problem.

@squakez squakez added kind/bug Something isn't working area/installation Installation and Topology labels Feb 17, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

@squakez
Copy link
Contributor

squakez commented Aug 9, 2022

Tested this again and it seems the problem is a missing removal of the operator. Ideally we should have a kamel uninstall --global --all -n camel-k before deleting the namespace. It seems that certain clusterrole otherwise are kept in the cluster. Always perform the uninstall in the same namespace where it was installed and don't rely on deleting the namespace as a way of removing the operator.

@squakez squakez closed this as completed Aug 9, 2022
@squakez squakez removed kind/bug Something isn't working status/never-stale labels Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/installation Installation and Topology
Projects
None yet
Development

No branches or pull requests

2 participants