1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

OSDOCS-9433: getting cluster id section is added to microshift support

This commit is contained in:
aravipra
2024-03-19 17:19:47 +05:30
committed by openshift-cherrypick-robot
parent 482f5a84c7
commit 33a014ba78
5 changed files with 98 additions and 1 deletions

View File

@@ -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
---

View File

@@ -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]

View File

@@ -76,4 +76,4 @@ Your sosreport has been generated and saved in:
sha256 922e5ff2db25014585b7c6c749d2c44c8492756d619df5e9838ce863f83d4269
Please send this file to your support representative.
----
----

View File

@@ -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
----

View File

@@ -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
----