diff --git a/packages/shared/src/components/Modals/KubeCtl/index.tsx b/packages/shared/src/components/Modals/KubeCtl/index.tsx index 31396d9ba78..fa4572f9080 100644 --- a/packages/shared/src/components/Modals/KubeCtl/index.tsx +++ b/packages/shared/src/components/Modals/KubeCtl/index.tsx @@ -50,7 +50,8 @@ export function KubectlModal({ visible, title, params, onCancel }: KubectlModalP } = fetchGrantedList( { limit: -1 }, { - onSuccess: (arr: FormattedCluster[]) => { + onSuccess: (list: FormattedCluster[]) => { + const arr = list.filter(({ isReady }) => isReady); if (!selectedCluster || arr.findIndex(({ name }) => name === selectedCluster) === -1) { setSelectedCluster(arr[0]?.name); }