@@ -714,6 +714,70 @@ policy through the :opsmgr:`API </reference/api/controlled-features/update-contr
714
714
|k8s-op-short| retains any changes you made in the |onprem|
715
715
application while features were available.
716
716
717
+ .. _k8s-delete-om:
718
+
719
+ Remove Resources when the |k8s-op-short| Fails
720
+ ----------------------------------------------
721
+
722
+ When you delete a MongoDB custom resource through the |k8s-op-short|, the
723
+ |k8s-op-short| handles the removal of the deployment in |cloud-short| or |onprem|.
724
+ To learn more, see :ref:`remove-k8s-resource`.
725
+
726
+ However, the removal of resources might :ref:`fail <remove-rsrcs-before-removing-k8s>`
727
+ in |k8s|. For example, if the |k8s-op-short| fails before you delete the MongoDB
728
+ resource, you must manually remove the deployments and delete their projects in
729
+ |cloud-short| or |onprem|.
730
+
731
+ To remove |onprem| or |cloud-short| resources manually:
732
+
733
+ 1. :ref:`Disable Ops Manager feature controls <k8s-disable-feature-controls>`.
734
+
735
+ #. Remove a deployment from |onprem| or |cloud-short| in the project by using the UI
736
+ or the API.
737
+
738
+ Remove a deployment in the |onprem| or |cloud-short| UI.
739
+ In |onprem|, :opsmgr:`remove a deployment from Automation </tutorial/unmanage-deployment/>`
740
+ and :opsmgr:`remove a deployment from Monitoring </tutorial/remove-process-from-monitoring/>`.
741
+
742
+ In |cloud-short|, :cloudmgr:`remove a deployment from Automation </tutorial/unmanage-deployment/>`
743
+ and :cloudmgr:`remove a deployment from Monitoring </tutorial/remove-process-from-monitoring/>`.
744
+
745
+ Alternatively, remove a deployment by using the API for updating the Automation
746
+ configuration in |onprem| or |cloud-short| with an empty configuration using
747
+ the :opsmgr:`Ops Manager API </reference/api/automation-config/update-automation-config/>` request,
748
+ or the :cloudmgr:`Cloud Manager API </reference/api/automation-config/update-automation-config/>` request.
749
+
750
+ Run the command similar to the following |onprem| example:
751
+
752
+ .. code-block:: sh
753
+
754
+ curl --user "{USERNAME}:{APIKEY}" --digest \
755
+ --header "Content-Type: application/json" \
756
+ --include \
757
+ --request PUT "https://{OPSMANAGER-HOST}/api/public/v1.0/groups/{PROJECT-ID}/automationConfig" \
758
+ --data '{}'
759
+
760
+ .. note::
761
+
762
+ Deleting a MongoDB resource for which you enabled backup doesn't
763
+ delete the resource's snapshots. You must :opsmgr:`delete snapshots
764
+ in Ops Manager </tutorial/delete-backup-snapshots/>`, or :cloudmgr:`delete snapshots
765
+ in Cloud Manager </tutorial/delete-backup-snapshots/>`.
766
+
767
+ #. Delete a project from |onprem| or |cloud-short| by using the UI or the API.
768
+ :opsmgr:`Delete a project in Ops Manager </tutorial/manage-project-settings/>`, or
769
+ :cloudmgr:`delete a project in the Cloud Manager </tutorial/manage-project-settings/>`.
770
+
771
+ Alternatively, delete a project by using the :opsmgr:`Ops Manager API </reference/api/groups/delete-one-group>` request,
772
+ or the :cloudmgr:`Cloud Manager API </reference/api/groups/delete-one-group>` request.
773
+
774
+ Run the command similar to the following |onprem| example:
775
+
776
+ .. code-block:: sh
777
+
778
+ curl --user "{USERNAME}:{APIKEY}" --digest \
779
+ --request DELETE "{OPSMANAGER-HOST}/api/public/v1.0/groups/${PROJECT-ID}"
780
+
717
781
.. _k8s-debug-failed container:
718
782
719
783
Debug a Failing Container
0 commit comments