public static List < String > getServices ( ) throws ApiException { V1ServiceList listNamespacedService = COREV1_API . listNamespacedService ( DEFAULT_NAME_SPACE , null , null , null , null , null , Integer . MAX_VALUE , null , TIME_OUT_VALUE , Boolean . FALSE ) ; return listNamespacedService . getItems ( ) . stream ( ) . map ( v1service -> v1service . getMetadata ( ) . getName ( ) ) . collect ( Collectors . toList ( ) ) ; }
List all Services in default namespace