From 0c67eeb7e20d9ff4c1efa06b579124b7f70b3a89 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Mon, 27 May 2024 14:31:34 +0300 Subject: [PATCH 01/22] troubleshooting --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5801d779..3dcb96ad 100644 --- a/README.md +++ b/README.md @@ -900,7 +900,7 @@ The deletion of my service instance failed. To fix the failure, I have to create **Solution** -To overcome this issue, use the `force_k8s_binding` query param when you create a service binding and set it to `true` (`force_k8s_binding=true`). You can do & this either with the Service Manager Control CLI (smctl) [bind](https://help.sap.com/docs/SERVICEMANAGEMENT/09cc82baadc542a688176dce601398de/f53ff2634e0a46d6bfc72ec075418dcd.html) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManagment/resource). +To overcome this issue, use the `force_k8s_binding` query param when you create a service binding and set it to `true` (`force_k8s_binding=true`). You can do & this either with the Service Manager Control CLI (smctl) [bind](https://help.sap.com/docs/SERVICEMANAGEMENT/09cc82baadc542a688176dce601398de/f53ff2634e0a46d6bfc72ec075418dcd.html) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManager/resource/Platforms). smctl Example @@ -917,7 +917,30 @@ smctl Example > ``` **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
+#### Cannot delete instances and bindings created by the Operator because the cluster is no longer accessible + +Operator resources should be deleted through the cluster, but this cannot be done if the cluster is no longer accessible. + +**Solution** + +To overcome this issue, You can use dedicated API in Service Manager to delete cluster content: + +#### Request + +`DELETE /v1/platforms/{platformID}/clusters/{clusterID}?cascade=true` + + +#### Parameters +| Parameter | Type | Description | +|:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| +| platformID | `string` | The ID of the platform (same ID as the `service-operator-access` instance ID) | +| clusterID | `string` | The ID of the cluster (can be found in the context of operator resource). | +| cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform. | + + You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. [Back to top](#sap-business-technology-platform-sap-btp-service-operator-for-kubernetes) + + From 918c7914dfad6e98f84f84cc11fd98c6fd117815 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Tue, 28 May 2024 09:01:11 +0300 Subject: [PATCH 02/22] troubleshooting --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 3dcb96ad..5400bd2d 100644 --- a/README.md +++ b/README.md @@ -937,6 +937,14 @@ To overcome this issue, You can use dedicated API in Service Manager to delete c | clusterID | `string` | The ID of the cluster (can be found in the context of operator resource). | | cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform. | +#### Response +##### Status Code + `202 Accepted` - The request has been accepted for processing, but the processing has not been completed. +##### Headers: +| Name | Description | +|:-------------|:---------------------------------| +| Location | A path to the operation status. | + You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. From ac83b9460d8d5ba99b6e6b9c7395381b2231b792 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Tue, 28 May 2024 09:11:30 +0300 Subject: [PATCH 03/22] troubleshooting --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5400bd2d..eedf51f2 100644 --- a/README.md +++ b/README.md @@ -941,9 +941,9 @@ To overcome this issue, You can use dedicated API in Service Manager to delete c ##### Status Code `202 Accepted` - The request has been accepted for processing, but the processing has not been completed. ##### Headers: -| Name | Description | -|:-------------|:---------------------------------| -| Location | A path to the operation status. | +| Name | Description | +|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Location | A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. From fd010ecd700e2223b9287c4fbd46fd440eef5aab Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Tue, 28 May 2024 10:13:50 +0300 Subject: [PATCH 04/22] removing smctl --- README.md | 81 +++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index eedf51f2..9c6d2fad 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ It is implemented using a [CRDs-based](https://kubernetes.io/docs/concepts/exten ## Prerequisites - SAP BTP [Global Account](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/d61c2819034b48e68145c45c36acba6e.html) and [Subaccount](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/55d0b6d8b96846b8ae93b85194df0944.html) -- Service Management Control (SMCTL) command line interface. See [Using the SMCTL](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/0107f3f8c1954a4e96802f556fc807e3.html). +- [Working with SAP Service Manager](https://help.sap.com/docs/service-manager/sap-service-manager/working-with-sap-service-manager). - [Kubernetes cluster](https://kubernetes.io/) running version 1.17 or higher - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.17 or higher - [helm](https://helm.sh/) v3.0 or higher @@ -49,51 +49,44 @@ It is implemented using a [CRDs-based](https://kubernetes.io/docs/concepts/exten - for releases v0.1.17 or lower use cert-manager lower than v1.6.0 2. Obtain the access credentials for the SAP BTP service operator: - - a. Using the SAP BTP cockpit or CLI, create an instance of the SAP Service Manager service (technical name: `service-manager`) with the plan: - `service-operator-access`

*Note*

*If you can't see the needed plan, you need to entitle your subaccount to use SAP Service Manager service.*
- - *For more information about how to entitle a service to a subaccount, see:* - * *[Configure Entitlements and Quotas for Subaccounts](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/5ba357b4fa1e4de4b9fcc4ae771609da.html)* - - -
For more information about creating service instances, see: - * [Creating Service Instances Using the SAP BTP Cockpit](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/bf71f6a7b7754dbd9dfc2569791ccc96.html) - - * [Creating Service Instances using SMCTL](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/b327b66b711746b085ec5d2ea16e608e.html)
+ * Create an instance of the SAP Service Manager service (technical name: `service-manager`) with the plan: + `service-operator-access`
+ *Note:
If you can't see the needed plan, you need to entitle your subaccount to use SAP Service Manager service.For more information about how to entitle a service to a subaccount, see:[Configure Entitlements and Quotas for Subaccounts](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/5ba357b4fa1e4de4b9fcc4ae771609da.html)
+ For more information about creating service instances, see: + * [Creating Service Instances Using the SAP BTP Cockpit](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/bf71f6a7b7754dbd9dfc2569791ccc96.html) + * [Creating Service Instances using BTP CLI](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-create-services-binding) - b. Create a binding to the created service instance. + * Create a binding to the created service instance. - For more information about creating service bindings, see: - * [Creating Service Bindings Using the SAP BTP Cockpit](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/55b31ea23c474f6ba2f64ee4848ab1b3.html) - - * [Creating Service Bindings Using SMCTL](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/f53ff2634e0a46d6bfc72ec075418dcd.html). + For more information about creating service bindings, see: + * [Creating Service Bindings Using the SAP BTP Cockpit](https://help.sap.com/viewer/09cc82baadc542a688176dce601398de/Cloud/en-US/55b31ea23c474f6ba2f64ee4848ab1b3.html) + * [Creating Service Bindings Using BTP CLI](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-create-services-binding). - c. Retrieve the generated access credentials from the created binding: + * Retrieve the generated access credentials from the created binding: - The example of the default binding object used if no credentials type is specified: + The example of the default binding object used if no credentials type is specified: - ```json - { - "clientid": "xxxxxxx", - "clientsecret": "xxxxxxx", - "url": "https://mysubaccount.authentication.eu10.hana.ondemand.com", - "xsappname": "b15166|service-manager!b1234", - "sm_url": "https://service-manager.cfapps.eu10.hana.ondemand.com" - } - ``` - The example of the binding object with the specified X.509 certificate: + ```json + { + "clientid": "xxxxxxx", + "clientsecret": "xxxxxxx", + "url": "https://mysubaccount.authentication.eu10.hana.ondemand.com", + "xsappname": "b15166|service-manager!b1234", + "sm_url": "https://service-manager.cfapps.eu10.hana.ondemand.com" + } + ``` + The example of the binding object with the specified X.509 certificate: - ```json - { - "clientid": "xxxxxxx", - "certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----..-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----\n", - "key": "-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----\n", - "certurl": "https://mysubaccount.authentication.cert.eu10.hana.ondemand.com", - "xsappname": "b15166|service-manager!b1234", - "sm_url": "https://service-manager.cfapps.eu10.hana.ondemand.com" - } - ``` + ```json + { + "clientid": "xxxxxxx", + "certificate": "-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----..-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----\n", + "key": "-----BEGIN RSA PRIVATE KEY-----...-----END RSA PRIVATE KEY-----\n", + "certurl": "https://mysubaccount.authentication.cert.eu10.hana.ondemand.com", + "xsappname": "b15166|service-manager!b1234", + "sm_url": "https://service-manager.cfapps.eu10.hana.ondemand.com" + } + ``` 3. Add SAP BTP service operator chart repository ```bash helm repo add sap-btp-operator https://sap.github.io/sap-btp-service-operator @@ -900,12 +893,12 @@ The deletion of my service instance failed. To fix the failure, I have to create **Solution** -To overcome this issue, use the `force_k8s_binding` query param when you create a service binding and set it to `true` (`force_k8s_binding=true`). You can do & this either with the Service Manager Control CLI (smctl) [bind](https://help.sap.com/docs/SERVICEMANAGEMENT/09cc82baadc542a688176dce601398de/f53ff2634e0a46d6bfc72ec075418dcd.html) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManager/resource/Platforms). +To overcome this issue, use the `force_k8s_binding` query param when you create a service binding and set it to `true` (`force_k8s_binding=true`). You can do & this either with the BTP CLI [bind](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-create-services-binding) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManager/resource/Platforms). -smctl Example +btp cli Example > ```bash - > smctl bind INSTANCE_NAME BINDING_NAME --param force_k8s_binding=true + > btp create binding --service-instance INSTANCE_NAME --binding BINDING_NAME --parameters '{"force_k8s_binding":true}' > ```
@@ -913,7 +906,7 @@ smctl Example > ```bash - > smctl unbind INSTANCE_NAME BINDING_NAME --param force_k8s_binding=true + > btp delete binding --name BINDING_NAME --subaccount SUBACCOUNT_NAME > ``` **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
From a2fd26f42e1d702630be1e232f19a2765cfdb9a8 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Tue, 28 May 2024 12:32:08 +0300 Subject: [PATCH 05/22] removing smctl --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c6d2fad..053e2045 100644 --- a/README.md +++ b/README.md @@ -898,7 +898,7 @@ To overcome this issue, use the `force_k8s_binding` query param when you create btp cli Example > ```bash - > btp create binding --service-instance INSTANCE_NAME --binding BINDING_NAME --parameters '{"force_k8s_binding":true}' + > btp create services/binding --binding BINDING_NAME --instance-name INSTANCE_NAME --parameters '{"force_k8s_binding":true}' > ```
@@ -906,7 +906,7 @@ btp cli Example > ```bash - > btp delete binding --name BINDING_NAME --subaccount SUBACCOUNT_NAME + > btp delete services/binding --name BINDING_NAME > ``` **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
From 5e846895657560384f8a186323dce9dfe2845255 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Tue, 28 May 2024 15:36:54 +0300 Subject: [PATCH 06/22] Update README.md Slight UA tweaks --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 053e2045..7a36b70b 100644 --- a/README.md +++ b/README.md @@ -910,13 +910,13 @@ btp cli Example > ``` **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
-#### Cannot delete instances and bindings created by the Operator because the cluster is no longer accessible +#### Cannot Delete Instances and Bindings Created by the Operator Because Cluster is no Longer Accessible Operator resources should be deleted through the cluster, but this cannot be done if the cluster is no longer accessible. **Solution** -To overcome this issue, You can use dedicated API in Service Manager to delete cluster content: +To overcome this issue, use a dedicated API in Service Manager to delete cluster content: #### Request @@ -926,8 +926,8 @@ To overcome this issue, You can use dedicated API in Service Manager to delete c #### Parameters | Parameter | Type | Description | |:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| -| platformID | `string` | The ID of the platform (same ID as the `service-operator-access` instance ID) | -| clusterID | `string` | The ID of the cluster (can be found in the context of operator resource). | +| platformID | `string` | The ID of the platform (should be the `service-operator-access` instance ID) | +| clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource). | | cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform. | #### Response From 4e4f028c8d62ce17d49f51285d51aa87209ab0c9 Mon Sep 17 00:00:00 2001 From: I501080 Date: Tue, 28 May 2024 21:10:40 +0300 Subject: [PATCH 07/22] README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a36b70b..23fe6ccc 100644 --- a/README.md +++ b/README.md @@ -887,7 +887,7 @@ This project is licensed under Apache 2.0 unless noted otherwise in the [license ## Troubleshooting and Support -#### Cannot Create a Service Binding for Service Instance in `Delete Failed` State +### Cannot Create a Service Binding for Service Instance in `Delete Failed` State The deletion of my service instance failed. To fix the failure, I have to create a service binding, but I can't do this because the instance is in the `Delete Failed` state. @@ -910,7 +910,8 @@ btp cli Example > ``` **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
-#### Cannot Delete Instances and Bindings Created by the Operator Because Cluster is no Longer Accessible + +### Cannot Delete Instances and Bindings Created by the Operator Because Cluster is no Longer Accessible Operator resources should be deleted through the cluster, but this cannot be done if the cluster is no longer accessible. From 109629b89e084b08dbbd8dfadf6e01e888a2d349 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Thu, 30 May 2024 11:16:41 +0300 Subject: [PATCH 08/22] removing smctl --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 70f78a12..fc969701 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ all: manager # Run tests go test and coverage test: generate fmt vet manifests - KUBEBUILDER_ASSETS="$(shell setup-envtest use 1.19.2 --bin-dir /usr/local/bin -p path)" $(GO_TEST) + KUBEBUILDER_ASSETS="$(shell setup-envtest use --use-deprecated-gcs 1.19.2 --bin-dir /usr/local/bin -p path)" $(GO_TEST) # Build manager binary manager: generate fmt vet From 0710b95cddde090a2f90c6ef82c6c5585078fdbb Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Thu, 30 May 2024 12:26:20 +0300 Subject: [PATCH 09/22] removing smctl --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fc969701..5d417b84 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ all: manager # Run tests go test and coverage test: generate fmt vet manifests - KUBEBUILDER_ASSETS="$(shell setup-envtest use --use-deprecated-gcs 1.19.2 --bin-dir /usr/local/bin -p path)" $(GO_TEST) + KUBEBUILDER_ASSETS="$(shell setup-envtest use 1.30.0 -v debug --bin-dir /usr/local/bin)" $(GO_TEST) # Build manager binary manager: generate fmt vet From 7c055f82f268787de48639f7b20b9b8b8d9c463d Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Thu, 30 May 2024 12:29:37 +0300 Subject: [PATCH 10/22] removing smctl --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d417b84..ce5eda31 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ all: manager # Run tests go test and coverage test: generate fmt vet manifests - KUBEBUILDER_ASSETS="$(shell setup-envtest use 1.30.0 -v debug --bin-dir /usr/local/bin)" $(GO_TEST) + KUBEBUILDER_ASSETS="$(shell setup-envtest use 1.30.0 -v debug --bin-dir /usr/local/bin -p path)" $(GO_TEST) # Build manager binary manager: generate fmt vet From 844a445892f5660c4a7c5eb27dc2ce7f916d80ec Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Mon, 3 Jun 2024 18:27:41 +0300 Subject: [PATCH 11/22] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23fe6ccc..9fdaa961 100644 --- a/README.md +++ b/README.md @@ -887,7 +887,7 @@ This project is licensed under Apache 2.0 unless noted otherwise in the [license ## Troubleshooting and Support -### Cannot Create a Service Binding for Service Instance in `Delete Failed` State +### Service Instance in `Delete Failed` State: Unable to Create Binding The deletion of my service instance failed. To fix the failure, I have to create a service binding, but I can't do this because the instance is in the `Delete Failed` state. @@ -911,27 +911,27 @@ btp cli Example **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
-### Cannot Delete Instances and Bindings Created by the Operator Because Cluster is no Longer Accessible +### Cluster Unavailable: Unable to Clean Up Instances and Bindings -Operator resources should be deleted through the cluster, but this cannot be done if the cluster is no longer accessible. +I am trying to delete service instances and bindings but I can't do this as the cluster in which they were created is no longer available. **Solution** -To overcome this issue, use a dedicated API in Service Manager to delete cluster content: +Use a dedicated Service Manager API to delete cluster content: -#### Request +#### API Request `DELETE /v1/platforms/{platformID}/clusters/{clusterID}?cascade=true` -#### Parameters +#### API Parameters | Parameter | Type | Description | |:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| | platformID | `string` | The ID of the platform (should be the `service-operator-access` instance ID) | | clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource). | | cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform. | -#### Response +#### API Response ##### Status Code `202 Accepted` - The request has been accepted for processing, but the processing has not been completed. ##### Headers: From d457268a2cfaa1193ec017e42446e63a250a35c7 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Wed, 5 Jun 2024 17:58:45 +0300 Subject: [PATCH 12/22] Update README.md UA changes --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9fdaa961..023686be 100644 --- a/README.md +++ b/README.md @@ -887,13 +887,13 @@ This project is licensed under Apache 2.0 unless noted otherwise in the [license ## Troubleshooting and Support -### Service Instance in `Delete Failed` State: Unable to Create Binding +### Cannot create a binding because service instance is in `Delete Failed` state -The deletion of my service instance failed. To fix the failure, I have to create a service binding, but I can't do this because the instance is in the `Delete Failed` state. +The deletion of my service instance failed. To fix the failure, I have to create a service binding, but I can't do that because the instance is in the `Delete Failed` state. **Solution** -To overcome this issue, use the `force_k8s_binding` query param when you create a service binding and set it to `true` (`force_k8s_binding=true`). You can do & this either with the BTP CLI [bind](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-create-services-binding) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManager/resource/Platforms). +Use the `force_k8s_binding` query param when creating the service binding and set it to `true` (`force_k8s_binding=true`). Use either the BTP CLI [bind](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-create-services-binding) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManager/resource/Platforms). btp cli Example @@ -911,7 +911,7 @@ btp cli Example **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
-### Cluster Unavailable: Unable to Clean Up Instances and Bindings +### Cluster is unavailable and I cannot perform cleanup of instances and bindings I am trying to delete service instances and bindings but I can't do this as the cluster in which they were created is no longer available. @@ -919,19 +919,19 @@ I am trying to delete service instances and bindings but I can't do this as the Use a dedicated Service Manager API to delete cluster content: -#### API Request +#### Request `DELETE /v1/platforms/{platformID}/clusters/{clusterID}?cascade=true` -#### API Parameters +#### Parameters | Parameter | Type | Description | |:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| | platformID | `string` | The ID of the platform (should be the `service-operator-access` instance ID) | | clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource). | -| cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform. | +| cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform.
**Note
Use this option only when performing cleanup. Using it in an active and available cluster may create unintended resource leftovers.** -#### API Response +#### Response ##### Status Code `202 Accepted` - The request has been accepted for processing, but the processing has not been completed. ##### Headers: From 8659cf4ab7db48b94db960a16bd7460bc241a9c6 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:38:38 +0300 Subject: [PATCH 13/22] troubleshooting --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 46d1a368..21b7e05a 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,7 @@ all: manager # Run tests go test and coverage test: generate fmt vet manifests - -KUBEBUILDER_ASSETS="$(shell setup-envtest use --bin-dir /usr/local/bin -p path)" $(GO_TEST) + KUBEBUILDER_ASSETS="$(shell setup-envtest use --bin-dir /usr/local/bin -p path)" $(GO_TEST) # Build manager binary From 4184ffeea3d0866f5d25bae4cc409672480e8842 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:47:24 +0300 Subject: [PATCH 14/22] troubleshooting --- Makefile | 1 - README.md | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 21b7e05a..77bef172 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,6 @@ all: manager test: generate fmt vet manifests KUBEBUILDER_ASSETS="$(shell setup-envtest use --bin-dir /usr/local/bin -p path)" $(GO_TEST) - # Build manager binary manager: generate fmt vet go build -o bin/manager main.go diff --git a/README.md b/README.md index 023686be..f1c92b71 100644 --- a/README.md +++ b/README.md @@ -921,7 +921,7 @@ Use a dedicated Service Manager API to delete cluster content: #### Request -`DELETE /v1/platforms/{platformID}/clusters/{clusterID}?cascade=true` +`DELETE /v1/platforms/{platformID}/clusters/{clusterID}` #### Parameters @@ -932,13 +932,14 @@ Use a dedicated Service Manager API to delete cluster content: | cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform.
**Note
Use this option only when performing cleanup. Using it in an active and available cluster may create unintended resource leftovers.** #### Response -##### Status Code - `202 Accepted` - The request has been accepted for processing, but the processing has not been completed. -##### Headers: -| Name | Description | -|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Location | A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | - +##### +| Status Code | Description | +|:-----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| 202 Accepted | The request has been accepted for processing, but the processing has not been completed.

**Headers:**
'Location'- A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | +| 404 Resource Not Found | Platform or Cluster not found | +| 429 Too Many Requests | When the rate limit is exceeded, the client receives the HTTP 429 "Too Many Requests" response status code.

**Headers:**
'Retry-After'- indicates the time in seconds after which the client can retry the request. | + +Attention: This is a cascade action. All resources in the cluster will be deleted in BTP and brokers. You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. From 21381bc6d1572fa1b637287a4d574581c6bb25e2 Mon Sep 17 00:00:00 2001 From: Naama Solomon <52195888+I065450@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:53:01 +0300 Subject: [PATCH 15/22] troubleshooting --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index f1c92b71..06029af5 100644 --- a/README.md +++ b/README.md @@ -929,7 +929,6 @@ Use a dedicated Service Manager API to delete cluster content: |:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| | platformID | `string` | The ID of the platform (should be the `service-operator-access` instance ID) | | clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource). | -| cascade | `boolean` | Whether to cascade-delete all the services and bindings that are related to the platform.
**Note
Use this option only when performing cleanup. Using it in an active and available cluster may create unintended resource leftovers.** #### Response ##### @@ -939,7 +938,7 @@ Use a dedicated Service Manager API to delete cluster content: | 404 Resource Not Found | Platform or Cluster not found | | 429 Too Many Requests | When the rate limit is exceeded, the client receives the HTTP 429 "Too Many Requests" response status code.

**Headers:**
'Retry-After'- indicates the time in seconds after which the client can retry the request. | -Attention: This is a cascade action. All resources in the cluster will be deleted in BTP and brokers. +Attention: This is a cascade action. All resources in the cluster will be deleted in BTP and brokers. Use this option only for cleanup purposes for no longer available cluster. Applying it to an active and available cluster may result in unintended resource leftovers. You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. From b5c117c7099256a376a18c9a2774923204e04639 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:24:16 +0300 Subject: [PATCH 16/22] Update README.md UA changes --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 06029af5..1dfda129 100644 --- a/README.md +++ b/README.md @@ -911,9 +911,9 @@ btp cli Example **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
-### Cluster is unavailable and I cannot perform cleanup of instances and bindings +### Cluster is unavailable and I cannot perform a cleanup of instances and bindings -I am trying to delete service instances and bindings but I can't do this as the cluster in which they were created is no longer available. +I am trying to delete service instances and bindings, but I can't because the cluster in which they were created is no longer available. **Solution** @@ -934,11 +934,11 @@ Use a dedicated Service Manager API to delete cluster content: ##### | Status Code | Description | |:-----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 202 Accepted | The request has been accepted for processing, but the processing has not been completed.

**Headers:**
'Location'- A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | -| 404 Resource Not Found | Platform or Cluster not found | -| 429 Too Many Requests | When the rate limit is exceeded, the client receives the HTTP 429 "Too Many Requests" response status code.

**Headers:**
'Retry-After'- indicates the time in seconds after which the client can retry the request. | +| 202 Accepted | The request has been accepted for processing but has not been completed.

**Headers:**
'Location'- A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | +| 404 Resource Not Found | Platform or cluster not found | +| 429 Too Many Requests | When the rate limit is exceeded, the client receives the HTTP 429 "Too Many Requests" response status code.

**Headers:**
'Retry-After'- indicates the time in seconds after which the client can re-try the request. | -Attention: This is a cascade action. All resources in the cluster will be deleted in BTP and brokers. Use this option only for cleanup purposes for no longer available cluster. Applying it to an active and available cluster may result in unintended resource leftovers. +Attention: This is a cascade action. All cluster resources will be deleted in SAP BTP and service brokers. Use this option only for cleanup purposes for a cluster that's no longer available. Applying it to an active and available cluster may result in unintended resource leftovers. You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. From e86b142ec357432e05d134ad6e2f9467e12b2bef Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:59:58 +0300 Subject: [PATCH 17/22] Update README.md --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1dfda129..ae92f062 100644 --- a/README.md +++ b/README.md @@ -911,13 +911,13 @@ btp cli Example **Note:** `force_k8s_binding` is supported only for the Kubernetes instances that are in the `Delete Failed` state.
-### Cluster is unavailable and I cannot perform a cleanup of instances and bindings +### Cluster is unavailable and I still have service instances and bindings -I am trying to delete service instances and bindings, but I can't because the cluster in which they were created is no longer available. +I cannot delete service instances and bindings because the cluster in which they were created is no longer available. **Solution** -Use a dedicated Service Manager API to delete cluster content: +Use a dedicated Service Manager API to clean up cluster content: #### Request @@ -928,21 +928,26 @@ Use a dedicated Service Manager API to delete cluster content: | Parameter | Type | Description | |:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| | platformID | `string` | The ID of the platform (should be the `service-operator-access` instance ID) | -| clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource). | +| clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource, such as service instance or binding. Use GET serrvice instance or binding API or btp CLI and look at the response. Before that, explain they should use the ID from step 4 of the setup.). | #### Response ##### | Status Code | Description | |:-----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 202 Accepted | The request has been accepted for processing but has not been completed.

**Headers:**
'Location'- A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | +| 202 Accepted | The request has been accepted for processing.

**Headers:**
'Location'- A path to the operation status, For more information about operations, see: [Service Manager operation API](https://api.sap.com/api/APIServiceManager/path/getSingleOperation). | | 404 Resource Not Found | Platform or cluster not found | -| 429 Too Many Requests | When the rate limit is exceeded, the client receives the HTTP 429 "Too Many Requests" response status code.

**Headers:**
'Retry-After'- indicates the time in seconds after which the client can re-try the request. | +| 429 Too Many Requests | When the rate limit is exceeded, the client receives the HTTP 429 "Too Many Requests" response status code.

**Headers:**
'Retry-After'- indicates the time in seconds after which the client can retry the request. | -Attention: This is a cascade action. All cluster resources will be deleted in SAP BTP and service brokers. Use this option only for cleanup purposes for a cluster that's no longer available. Applying it to an active and available cluster may result in unintended resource leftovers. +Attention: **Use this option only for cleanup purposes for a cluster that's no longer available.** Applying it to an active and available cluster may result in unintended resource leftovers in your cluster. + You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. +- *CR doesnt exist, ("instance" in Kuberbernetes) but it does exist on BTP. Once we create CR, it connects to the existing instance.* +- *same name, namespace, Instance exists in BTP, not in Kubernetes cluster. How can we recover it?* +- Create CR with the same name, namespace, and cluster ID (GET instance details, context in the response)* - separate PR + [Back to top](#sap-business-technology-platform-sap-btp-service-operator-for-kubernetes) From 68250e16d3a0c1ba1887705e651c7fd9466cbe40 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Wed, 10 Jul 2024 02:04:37 +0300 Subject: [PATCH 18/22] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae92f062..59e576ad 100644 --- a/README.md +++ b/README.md @@ -928,7 +928,7 @@ Use a dedicated Service Manager API to clean up cluster content: | Parameter | Type | Description | |:--------------------------------------------|:-----------|:------------------------------------------------------------------------------------------| | platformID | `string` | The ID of the platform (should be the `service-operator-access` instance ID) | -| clusterID | `string` | The ID of the cluster (can be found in the context of the operator resource, such as service instance or binding. Use GET serrvice instance or binding API or btp CLI and look at the response. Before that, explain they should use the ID from step 4 of the setup.). | +| clusterID | `string` | The ID of the cluster. You should specify the ID from the step 4 of the [Setup](#setup) section. If you are unable to retrieve it, use the GET serrvice instance or binding API or equivalent btp CLI command and extract it from the response. | #### Response ##### From 05927415b076824ccd2e6d717bd5ddc204203976 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:21:19 +0300 Subject: [PATCH 19/22] Update README.md --- README.md | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 59e576ad..b55bb72a 100644 --- a/README.md +++ b/README.md @@ -940,13 +940,45 @@ Use a dedicated Service Manager API to clean up cluster content: Attention: **Use this option only for cleanup purposes for a cluster that's no longer available.** Applying it to an active and available cluster may result in unintended resource leftovers in your cluster. +### I've lost a custom resource. How can I recover it? + +Let's break down how to recover your Kubernetes custom resource (CR) that exists in SAP BTP but not in your Kubernetes cluster: + +#### Core Concept + +The service instance in SAP BTP acts as the source of truth for your CR's configuration and state. By recreating the CR in Kubernetes with the exact same name, namespace, and cluster ID, you essentially re-establish the link between the Kubernetes representation and its counterpart in SAP BTP. + +#### Steps + +1. Retrieve CR Details: + +- SAP BTP Service Instance: Access the service instance representing your CR in SAP BTP. +- Extract Key Information: Gather the following crucial details from the service instance: +- CR Name: The exact name of the custom resource. +- Namespace: The Kubernetes namespace where the CR should reside. +- Cluster ID (Context): If applicable, retrieve the cluster ID or context associated with the CR in SAP BTP. This ensures the CR is recreated in the correct environment. + +2. Recreate the CR: + +- YAML/Manifest: If you have a YAML definition or manifest for your CR, ensure it includes the exact name, namespace, and (if applicable) cluster ID you retrieved from the SAP BTP service instance. +- Apply: Use kubectl apply -f to create the CR in your Kubernetes cluster. + +3. Verification: + +- Kubernetes: Use kubectl get -n to verify that the CR is successfully created in Kubernetes. +- SAP BTP: Check the service instance in SAP BTP to confirm that it now recognizes the re-established connection with the CR in Kubernetes. + +#### Additional Considerations: + +- Custom Resource Definition (CRD): Ensure that the CRD defining your custom resource type is still present in your Kubernetes cluster. If it's missing, you'll need to recreate the CRD first. +- Backup and Restore: Consider implementing backup and restore procedures for your Kubernetes custom resources in the future to prevent data loss. You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. -- *CR doesnt exist, ("instance" in Kuberbernetes) but it does exist on BTP. Once we create CR, it connects to the existing instance.* -- *same name, namespace, Instance exists in BTP, not in Kubernetes cluster. How can we recover it?* -- Create CR with the same name, namespace, and cluster ID (GET instance details, context in the response)* - separate PR +#-CR doesnt exist, ("instance" in Kuberbernetes) but it does exist on BTP. Once we create CR, it connects to the existing instance.* +#- *same name, namespace, Instance exists in BTP, not in Kubernetes cluster. How can we recover it?* +#- Create CR with the same name, namespace, and cluster ID (GET instance details, context in the response)* - separate PR [Back to top](#sap-business-technology-platform-sap-btp-service-operator-for-kubernetes) From 2f2e3da527f7690162168fac7c3e520413fcb028 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Wed, 31 Jul 2024 22:57:22 +0300 Subject: [PATCH 20/22] Update README.md --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b55bb72a..0fcd1cc8 100644 --- a/README.md +++ b/README.md @@ -952,26 +952,28 @@ The service instance in SAP BTP acts as the source of truth for your CR's config 1. Retrieve CR Details: -- SAP BTP Service Instance: Access the service instance representing your CR in SAP BTP. -- Extract Key Information: Gather the following crucial details from the service instance: -- CR Name: The exact name of the custom resource. -- Namespace: The Kubernetes namespace where the CR should reside. -- Cluster ID (Context): If applicable, retrieve the cluster ID or context associated with the CR in SAP BTP. This ensures the CR is recreated in the correct environment. + a) Access the service instance representing your CR in SAP BTP. + b) Obtain the following details from the service instance: + - The name of the custom resource. + - The Kubernetes namespace where the CR should reside. + - If applicable, retrieve the cluster ID or context associated with the CR in SAP BTP. This ensures the CR is recreated in the correct environment. 2. Recreate the CR: -- YAML/Manifest: If you have a YAML definition or manifest for your CR, ensure it includes the exact name, namespace, and (if applicable) cluster ID you retrieved from the SAP BTP service instance. -- Apply: Use kubectl apply -f to create the CR in your Kubernetes cluster. + a) If you have a YAML definition or manifest for your CR, ensure it includes the exact name, namespace, and (if applicable) cluster ID you retrieved from the SAP BTP service instance. + b) Use `kubectl apply -f ` to create the CR in your Kubernetes cluster. 3. Verification: -- Kubernetes: Use kubectl get -n to verify that the CR is successfully created in Kubernetes. -- SAP BTP: Check the service instance in SAP BTP to confirm that it now recognizes the re-established connection with the CR in Kubernetes. + a) Use `kubectl get -n ` to verify that the CR is successfully created in Kubernetes. + b) Check the service instance in SAP BTP to confirm that it now recognizes the re-established connection with the CR in Kubernetes. #### Additional Considerations: -- Custom Resource Definition (CRD): Ensure that the CRD defining your custom resource type is still present in your Kubernetes cluster. If it's missing, you'll need to recreate the CRD first. -- Backup and Restore: Consider implementing backup and restore procedures for your Kubernetes custom resources in the future to prevent data loss. +- Ensure that the CRD defining your custom resource type is still present in your Kubernetes cluster. If it's missing, you'll need to recreate the CRD first. +- Consider implementing backup and restore procedures for your Kubernetes custom resources in the future to prevent data loss. + + You're welcome to raise issues related to feature requests, or bugs, or give us general feedback on this project's GitHub Issues page. The SAP BTP service operator project maintainers will respond to the best of their abilities. From 6c3aeae5eb91bce2b1dd1f21622d4b4d89b9e1a6 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Wed, 31 Jul 2024 23:01:45 +0300 Subject: [PATCH 21/22] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0fcd1cc8..99b0d381 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + [![Coverage Status](https://coveralls.io/repos/github/SAP/sap-btp-service-operator/badge.svg?branch=main)](https://coveralls.io/github/SAP/sap-btp-service-operator?branch=main) [![Build Status](https://github.com/SAP/sap-btp-service-operator/workflows/Go/badge.svg)](https://github.com/SAP/sap-btp-service-operator/actions) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/SAP/sap-btp-service-operator/blob/master/LICENSE) @@ -952,20 +953,24 @@ The service instance in SAP BTP acts as the source of truth for your CR's config 1. Retrieve CR Details: - a) Access the service instance representing your CR in SAP BTP. - b) Obtain the following details from the service instance: - - The name of the custom resource. - - The Kubernetes namespace where the CR should reside. - - If applicable, retrieve the cluster ID or context associated with the CR in SAP BTP. This ensures the CR is recreated in the correct environment. + a) Access the service instance representing your CR in SAP BTP. + + b) Obtain the following details from the service instance: + + * The name of the custom resource. + * The Kubernetes namespace where the CR should reside. + * If applicable, retrieve the cluster ID or context associated with the CR in SAP BTP. This ensures the CR is recreated in the correct environment. 2. Recreate the CR: a) If you have a YAML definition or manifest for your CR, ensure it includes the exact name, namespace, and (if applicable) cluster ID you retrieved from the SAP BTP service instance. + b) Use `kubectl apply -f ` to create the CR in your Kubernetes cluster. -3. Verification: +4. Verification: a) Use `kubectl get -n ` to verify that the CR is successfully created in Kubernetes. + b) Check the service instance in SAP BTP to confirm that it now recognizes the re-established connection with the CR in Kubernetes. #### Additional Considerations: From 3ea6aa6db2b82db2769048a8b065b6e0a22cb8c7 Mon Sep 17 00:00:00 2001 From: Daniel Korac <99260961+danielforsap@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:43:34 +0300 Subject: [PATCH 22/22] Update README.md --- README.md | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 99b0d381..233565d7 100644 --- a/README.md +++ b/README.md @@ -896,6 +896,9 @@ The deletion of my service instance failed. To fix the failure, I have to create Use the `force_k8s_binding` query param when creating the service binding and set it to `true` (`force_k8s_binding=true`). Use either the BTP CLI [bind](https://help.sap.com/docs/btp/btp-cli-command-reference/btp-create-services-binding) command or 'Create a Service Binding' [Service Manager API](https://api.sap.com/api/APIServiceManager/resource/Platforms). +**Note:**
+Do not use the service-operator-access plan credentials to run this command. + btp cli Example > ```bash @@ -918,7 +921,13 @@ I cannot delete service instances and bindings because the cluster in which they **Solution** -Use a dedicated Service Manager API to clean up cluster content: +Use a dedicated Service Manager API to clean up cluster content. +Access the API with the subaccount-admin plan.
For more information, see [Technical Access](https://help.sap.com/docs/service-manager/sap-service-manager/sap-service-manager-broker-plans). + +**Note:**
+Do not call this API with the service-operator-access plan credentials. + +### #### Request @@ -941,42 +950,6 @@ Use a dedicated Service Manager API to clean up cluster content: Attention: **Use this option only for cleanup purposes for a cluster that's no longer available.** Applying it to an active and available cluster may result in unintended resource leftovers in your cluster. -### I've lost a custom resource. How can I recover it? - -Let's break down how to recover your Kubernetes custom resource (CR) that exists in SAP BTP but not in your Kubernetes cluster: - -#### Core Concept - -The service instance in SAP BTP acts as the source of truth for your CR's configuration and state. By recreating the CR in Kubernetes with the exact same name, namespace, and cluster ID, you essentially re-establish the link between the Kubernetes representation and its counterpart in SAP BTP. - -#### Steps - -1. Retrieve CR Details: - - a) Access the service instance representing your CR in SAP BTP. - - b) Obtain the following details from the service instance: - - * The name of the custom resource. - * The Kubernetes namespace where the CR should reside. - * If applicable, retrieve the cluster ID or context associated with the CR in SAP BTP. This ensures the CR is recreated in the correct environment. - -2. Recreate the CR: - - a) If you have a YAML definition or manifest for your CR, ensure it includes the exact name, namespace, and (if applicable) cluster ID you retrieved from the SAP BTP service instance. - - b) Use `kubectl apply -f ` to create the CR in your Kubernetes cluster. - -4. Verification: - - a) Use `kubectl get -n ` to verify that the CR is successfully created in Kubernetes. - - b) Check the service instance in SAP BTP to confirm that it now recognizes the re-established connection with the CR in Kubernetes. - -#### Additional Considerations: - -- Ensure that the CRD defining your custom resource type is still present in your Kubernetes cluster. If it's missing, you'll need to recreate the CRD first. -- Consider implementing backup and restore procedures for your Kubernetes custom resources in the future to prevent data loss.