public ResponseEntity getPod()

in log4j-spring-cloud-config-sample-application/src/main/java/org/apache/logging/log4j/spring/cloud/config/sample/controller/K8SController.java [48:62]


    public ResponseEntity<Pod> getPod() {
        try {
            KubernetesClient client = new KubernetesClientBuilder().createClient();
            if (client != null) {
                Pod pod = getCurrentPod(client);
                if (pod != null) {
                    LOGGER.info("Pod: {}", objectMapper.writeValueAsString(pod));
                    return new ResponseEntity<>(pod, HttpStatus.OK);
                }
            }
        } catch (Exception ex) {
            LOGGER.error("Unable to obtain or print Pod information", ex);
        }
        return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
    }