A spring-boot application that lists deployments running in k8s cluster using Kubernetes Java Client
- JDK 11
kubectl
- Access to a Kubernetes cluster
- A namespace with some running deployments (
devby default) - The
teamandapplabels assigned to all deployments that you want returned
./gradlew bootRun
If you want to run the asynchronous version of the app, use the async spring profile:
SPRING_PROFILES_ACTIVE=async ./gradlew bootRun
If you want to target a Kubernetes namespace other than dev, use the NAMESPACE environment variable:
NAMESPACE=other-ns ./gradlew bootRun