Skip to main content

Function: useCluster()

function useCluster(): null | string

Get the currently selected cluster name.

If more than one cluster is selected it will return:

  • On details pages: the cluster of the currently viewed resource
  • On any other page: one of the selected clusters

To get all currently selected clusters please use useSelectedClusters

Returns

null | string

currently selected cluster

Defined in

src/lib/k8s/index.ts:135