@Override
    public List<Pod> getPods(String namespace, String appName, String serviceName, K8sAuthorisation k8sAuthorisation) throws Exception {
        List<Pod> podList = new ArrayList<>();
        List<V1Pod> v1PodList = null;
        try {
            ApiClient apiClient = clientProvider.get(k8sAuthorisation);
            V1PodHandler v1PodHandler = (V1PodHandler) ResourceHandlers.getHandlerOf(ResourceKind.POD.getKind());

            String selector = ResourceSelectorUtil.getServiceSelector(appName, serviceName);

            v1PodList = v1PodHandler.getBySelector(apiClient, selector, true, namespace);
            if (v1PodList == null || v1PodList.isEmpty()) {
                return Collections.emptyList();
            }

            for (V1Pod v1Pod : v1PodList) {
                PodBuilder builder = new PodBuilder();
                List<V1Volume> v1VolumeList = v1Pod.getSpec().getVolumes();
                List<Volume> podVolumeList = new ArrayList<>();
                Set<String> volumeNames = new HashSet<>();
                if (v1VolumeList != null) {
                    for (V1Volume v1Volume : v1VolumeList) {
                        Volume volume = getVolume(apiClient, v1Volume, namespace);
                        if (volume != null) {
                            volumeNames.add(volume.getName());
                            podVolumeList.add(volume);
                        }
                    }
                }
                builder.withName(v1Pod.getMetadata().getName())
                        .withStatus(K8sPodUtil.getAggregatedStatusOfContainersForPod(v1Pod))
                        .withContainers(getContainers(v1Pod, volumeNames))
                        .withVolumes(podVolumeList)
                        .withReady(K8sPodUtil.checkForPodCondition(v1Pod, PodCondition.READY));
                podList.add(builder.get());
            }
            return podList;
        } catch (HyscaleException e) {
            logger.error("Error while getting Pods, error {}", e.getMessage());
            throw e;
        }
    }
Wait for Pod scheduled, creation and Readiness state
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/deployer/impl/KubernetesDeployer.java