Reputation: 13474
I'm looking for a way to uniquely identify a cluster:
What would that something be?
Upvotes: 2
Views: 2468
Reputation: 4485
With OpenShift 4.x, you can find the unique Cluster ID for each cluster in the clusterversion
CRD:
$ oc get clusterversion -o jsonpath='{.items[].spec.clusterID}{"\n"}'
The clusterversion
object looks like this:
$ oc get clusterversion version -o yaml
apiVersion: config.openshift.io/v1
kind: ClusterVersion
metadata:
name: version
[..]
spec:
channel: stable-4.4
clusterID: 990f7ab8-109b-4c95-8480-2bd1deec55ff
[..]
Upvotes: 2