async def _get_pods(self):
        """Get information about build and user pods"""
        namespace = self.settings["example_builder"].namespace
        k8s = self.settings["example_builder"].api
        pool = self.settings["executor"]

        app_log.info(f"Getting pod statistics for {namespace}")

        label_selectors = [
            "app=jupyterhub,component=singleuser-server",
            "component=binderhub-build",
        ]
        requests = [
            asyncio.wrap_future(
                pool.submit(
                    k8s.list_namespaced_pod,
                    namespace,
                    label_selector=label_selector,
                    _preload_content=False,
                    _request_timeout=KUBE_REQUEST_TIMEOUT,
                )
            )
            for label_selector in label_selectors
        ]
        responses = await asyncio.gather(*requests)
        return [json.loads(resp.read())["items"] for resp in responses]
Get information about build and user pods
binderhub/health.py