From 75bc815cffca3c3ffcb8ea4520a3e23372f41b82 Mon Sep 17 00:00:00 2001 From: aravipra Date: Fri, 7 Jun 2024 18:16:33 +0530 Subject: [PATCH] OSDOCS-8806: cleaning and recreating custom certificates --- .../microshift-custom-ca.adoc | 2 ++ .../microshift-custom-ca-cert-cleaning.adoc | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 modules/microshift-custom-ca-cert-cleaning.adoc diff --git a/microshift_configuring/microshift-custom-ca.adoc b/microshift_configuring/microshift-custom-ca.adoc index 0de387f98b..b154aa081f 100644 --- a/microshift_configuring/microshift-custom-ca.adoc +++ b/microshift_configuring/microshift-custom-ca.adoc @@ -16,6 +16,8 @@ include::modules/microshift-custom-ca-reserved-names.adoc[leveloffset=+1] include::modules/microshift-custom-ca-troubleshooting.adoc[leveloffset=+1] +include::modules/microshift-custom-ca-cert-cleaning.adoc[leveloffset=+1] + [id="Additional-resources_microshift-custom-ca_{context}"] == Additional resources * link:https://docs.openshift.com/container-platform/{ocp-version}/security/certificates/api-server.html#customize-certificates-api-add-named_api-server-certificates[OpenShift: Add an API server named certificate] diff --git a/modules/microshift-custom-ca-cert-cleaning.adoc b/modules/microshift-custom-ca-cert-cleaning.adoc new file mode 100644 index 0000000000..62bca27050 --- /dev/null +++ b/modules/microshift-custom-ca-cert-cleaning.adoc @@ -0,0 +1,34 @@ +// Module included in the following assemblies: +// +// * microshift_security_compliance/microshift-custom-ca.adoc + +:_mod-docs-content-type: PROCEDURE +[id="microshift-custom-ca-certificates-cleaning_{context}"] += Cleaning up and recreating the custom certificates + +To stop the {microshift-short} services, clean up the custom certificates and recreate the custom certificates, use the following steps. + +.Procedure + +. Stop the {microshift-short} services and clean up the custom certificates by running the following command: ++ +[source,terminal] +---- +$ sudo microshift-cleanup-data --cert +---- ++ +.Example output +[source,terminal] +---- +Stopping MicroShift services +Removing MicroShift certificates +MicroShift service was stopped +Cleanup succeeded +---- + +. Restart the {microshift-short} services to recreate the custom certificates by running the following command: ++ +[source,terminal] +---- +$ sudo systemctl start microshift +----