This message was deleted.
# harvester
a
This message was deleted.
h
I am not sure if I understand your question... But, if you add -o wide; for example:
kubectl get nodes -o wide
that gives IP address. Does that help?
b
I don't really care about the IP addresses. I want to get the Harvester name as it's listed in the virtualization management menu in Rancher.
Looks like I'm not able to get the name from Harvester itself. There are a few APIs on the managing Rancher I need to check.
<http://clusters.management.cattle.io|clusters.management.cattle.io>
looks promising. But it contains all clusters, also the guest clusters and the local Rancher cluster. How to distinguish between them?
r
From the external Rancher, you can query the API server:
Copy code
kubectl get <http://clusters.management.cattle.io|clusters.management.cattle.io> -l <http://provider.cattle.io|provider.cattle.io>=harvester -o jsonpath='{.items[].spec.displayName}'
Both the guest cluster and the local rancher cluster have label
<http://provider.cattle.io|provider.cattle.io>=rke2
. You can distinguish them further by checking the `.spec.internal`’s value: if it’s
true
, then it’s a local cluster.
b
Thank you! I'll try that. Do you also have some oneliners for the software versions like Rancher, Harvester and Longhorn and the node names of Harvester and guest clusters?