01-17-2020 2:38 PM - edited 02-03-2024 6:07 PM
Hi Experts,
I have setup the C/4HANA foundation ( Kyma ) Instance to extend C4C, I deleted one of my Namespace in Kyma yesterday.
The pods are already removed as per the status in the namespace tile, but how to remove the namespace from Kyma which is struck in status 'Terminating..' as shown below.
Regards,
Vignesh
Hi Vignesh,
There's probably a resource still existing in the namespace which is preventing the termination. You will need to use the CLI to resolve this. With kubectl and your kubeconfig configured, which can be downloaded under Settings -> General Settings. In the CLI you can run the following command to see all resources. Most shouldn't be a problem.
kubectl get all -n qoute-sentiment-analysis
For example if a servicebinding wasn't removed, they could viewed by running
kubectl get servicebindings -n qoute-sentiment-analysis
Can be deleted by running
kubectl delete servicebindings <binding name> -n qoute-sentiment-analysis
In some cases you may have to remove the values in the finalizers of the spec
kubectl edit servicebindings <binding name> -n qoute-sentiment-analysis
or by patching it
kubectl patch servicebindings <binding name> -n qoute-sentiment-analysis -p '{"metadata":{"finalizers":null}}
There's also an API you could try which is noted at
https://github.com/kubernetes/kubernetes/issues/60807#issuecomment-408599873
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
Thanks a lot.
When I saw in command-line my service-instance was in status 'ReferencesNonexistentServiceClass' and my service binding was in state 'ServiceBindingsDeletion'.
only the 'edit' operation worked, I edited the config file and removed the finalizers, for both service-instance and binding. and now I do not see the deleted namespace in Kyma UI.
But when I use the command "kubectl --kubeconfig kubeconfig get all -n quote-sentiment-analysis" it returns some standard cluster service class and service plan detail.
why is this behavior?
Regards,
Vignesh
Hi Vignesh,
I guess this is a Kubernetes behavior although not so developer-friendly as it gives a false impression that namespace exists.
You will see the same result if you run "kubectl --kubeconfig kubeconfig get all -n does-not-exist".
Here are my brief analysis. The result is a combination of the following two conditions:
1. It shows cluster-wide resources which are not bound to namespace but at the global cluster level. Running "kubectl api-resources" you can see which resource is namespaced and which are not.
2. The "get all" find resources whose definition contains "all" as a category. https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/...
When both these conditions are satisfied, you see the results. Unfortunately, kubectl silently ignores the namespace.
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.