diff --git a/_topic_maps/_topic_map_ms.yml b/_topic_maps/_topic_map_ms.yml index 9d7fc00a9c..2890a6b3fb 100644 --- a/_topic_maps/_topic_map_ms.yml +++ b/_topic_maps/_topic_map_ms.yml @@ -85,6 +85,8 @@ Topics: File: microshift-etcd - Name: The sos report tool File: microshift-sos-report +- Name: Getting your cluster ID + File: microshift-getting-cluster-id - Name: Getting support File: microshift-getting-support --- diff --git a/microshift_support/microshift-getting-cluster-id.adoc b/microshift_support/microshift-getting-cluster-id.adoc new file mode 100644 index 0000000000..9dbf95bc27 --- /dev/null +++ b/microshift_support/microshift-getting-cluster-id.adoc @@ -0,0 +1,17 @@ +:_mod-docs-content-type: ASSEMBLY +[id="microshift-getting-cluster-id"] += Getting your cluster ID +include::_attributes/attributes-microshift.adoc[] +:context: microshift-getting-cluster-id + +toc::[] + +When opening a support case, you can give information about your cluster to Red Hat Support by providing the unique identifier (UID) of your cluster. To uniquely identify a {microshift-short} cluster, use the `kube-system` namespace metadata UID. + +[NOTE] +==== +The cluster ID for a cluster gets created only after the {microshift-short} service runs for the first time after its installation. +==== + +include::modules/microshift-get-cluster-id-kubesystem.adoc[leveloffset=+1] +include::modules/microshift-get-nonrunning-cluster-id-kubesystem.adoc[leveloffset=+1] \ No newline at end of file diff --git a/modules/microshift-gathering-sos-report.adoc b/modules/microshift-gathering-sos-report.adoc index 1e60142bb1..921804069a 100644 --- a/modules/microshift-gathering-sos-report.adoc +++ b/modules/microshift-gathering-sos-report.adoc @@ -76,4 +76,4 @@ Your sosreport has been generated and saved in: sha256 922e5ff2db25014585b7c6c749d2c44c8492756d619df5e9838ce863f83d4269 Please send this file to your support representative. ----- +---- \ No newline at end of file diff --git a/modules/microshift-get-cluster-id-kubesystem.adoc b/modules/microshift-get-cluster-id-kubesystem.adoc new file mode 100644 index 0000000000..77e292dafe --- /dev/null +++ b/modules/microshift-get-cluster-id-kubesystem.adoc @@ -0,0 +1,36 @@ +// Module included in the following assemblies: +// +// microshift_support/microshift-getting-cluster-id.adoc + +:_mod-docs-content-type: PROCEDURE +[id="microshift-get-cluster-id-kubesystem_{context}"] += Getting the cluster ID of a running cluster + +For a cluster that is running, you can use either step1 or step2 to get the cluster ID. + +.Procedure + +. Get the cluster ID of the cluster that is running by entering the following command: ++ +[source,terminal] +---- +$ oc get namespaces kube-system -o jsonpath={.metadata.uid} +---- +.Example output ++ +[source,terminal] +---- +7cf13853-68f4-454e-8f5c-1af748cbfb1a +---- +. Optional. Get the cluster ID of the cluster that is running by entering the following command: ++ +[source,terminal] +---- +$ sudo cat /var/lib/microshift/cluster-id +---- +.Example output ++ +[source,terminal] +---- +7cf13853-68f4-454e-8f5c-1af748cbfb1a +---- \ No newline at end of file diff --git a/modules/microshift-get-nonrunning-cluster-id-kubesystem.adoc b/modules/microshift-get-nonrunning-cluster-id-kubesystem.adoc new file mode 100644 index 0000000000..386c1be0c0 --- /dev/null +++ b/modules/microshift-get-nonrunning-cluster-id-kubesystem.adoc @@ -0,0 +1,42 @@ +// Module included in the following assemblies: +// +// microshift_support/microshift-getting-cluster-id.adoc + +:_mod-docs-content-type: PROCEDURE +[id="microshift-get-nonrunning-cluster-id-kubesystem_{context}"] += Getting the cluster ID of a nonrunning cluster + +For a cluster that is not running, you can get the cluster ID from the `cluster-id` file found in `/var/lib/microshift` directory. + +.Procedure + +. Get the cluster ID of the cluster that is not running by entering the following command: ++ +[source,terminal] +---- +$ sudo cat /var/lib/microshift/cluster-id +---- +.Example output ++ +[source,terminal] +---- +7cf13853-68f4-454e-8f5c-1af748cbfb1a +---- ++ +[NOTE] +==== +The {microshift-short} service copies the `kube-system` namespace metadata UID to the `cluster-id` file so that the UID is accessible when the cluster is not running. You can find the `cluster-id` file in the `/var/lib/microshift` directory. +==== + +. You can view the {microshift-short} database files in the `/var/lib/microshift` directory by entering the following command: ++ +[source,terminal] +---- +$ sudo ls -l /var/lib/microshift +---- +.Example output ++ +[source,terminal] +---- +-r-------- 1 root root 36 Mar 7 11:49 /var/lib/microshift/cluster-id +---- \ No newline at end of file