1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 00:48:01 +01:00
Files
openshift-docs/modules/microshift-get-cluster-id-kubesystem.adoc
2024-04-11 20:15:51 +00:00

37 lines
857 B
Plaintext

// 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
Use either the of the following steps to get the ID of a running cluster.
.Procedure
* Get the ID of a running cluster using `oc get` 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
----
* Get the ID of a running cluster by retrieving it from the `cluster-id` file by entering the following command:
+
[source,terminal]
----
$ sudo cat /var/lib/microshift/cluster-id
----
.Example output
+
[source,terminal]
----
7cf13853-68f4-454e-8f5c-1af748cbfb1a
----