serving-operator
serving-operator copied to clipboard
Support uninstall?
See https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/knative-users/zTFgqHFuztg/-Az7xBfZAQAJ
Is there a recommended way to completely uninstall Knative?
So far I'm going with this:
kubectl -n knative-build delete po,svc,daemonsets,replicasets,deployments,rc,secrets --all kubectl -n knative-serving delete po,svc,daemonsets,replicasets,deployments,rc,secrets --all kubectl -n istio-system delete po,svc,daemonsets,replicasets,deployments,rc,secrets --all kubectl delete ns knative-serving kubectl delete ns knative-build kubectl api-resources -o name | grep knative | xargs kubectl delete crd kubectl api-resources -o name | grep istio | xargs kubectl delete crd
/kind feature-request
I believe deleting the KnativeServing
CR will delete the resources in the serving.yaml, however it will not delete knative-build or istio work. I'll double check on deleting the CR.
Yes, @trshafer is correct. All of the namespace-scoped resources in the upstream manifest have their owner reference set to the KnativeServing
CR, so deleting that should trigger garbage collection to delete all of the k-s resources. As long as the operator is running at the time the CR is deleted, all of the cluster-scoped resources will be deleted as well. k8s doesn't allow cluster-scoped resources to be owned by ns-scoped ones, so we must explicitly delete them in response to the CR's delete event. This deletes the CRD's that @evankanderson explicitly deletes above, but also various cluster roles, bindings, and other cluster-scoped resources.
We don't touch istio or build, and that's by design: we'd expect their operators to clean up their own resources.
Thanks @jcrossley3