diff --git a/Kexa/services/addOn/kubernetesGathering.service.ts b/Kexa/services/addOn/kubernetesGathering.service.ts index bfe14c7f..ce484a86 100644 --- a/Kexa/services/addOn/kubernetesGathering.service.ts +++ b/Kexa/services/addOn/kubernetesGathering.service.ts @@ -67,10 +67,10 @@ export async function kubernetesListing(isPathKubeFile: boolean): Promise { collectPods(k8sApiCore, item.metadata.name), ]; const [helmData, pods] = await Promise.all(promises); - helmData.forEach((helmItem: any) => { + helmData?.forEach((helmItem: any) => { kubResources["helm"].push(helmItem); }); - pods.body.items.forEach((pod: any) => { + pods?.body?.items?.forEach((pod: any) => { pod.metadata.namespace = item.metadata.name; kubResources["pods"].push(pod); });