Search in sources :

Example 1 with V1PrometheusList

use of com.coreos.monitoring.models.V1PrometheusList in project java by kubernetes-client.

the class PromOpExample method main.

public static void main(String[] args) throws IOException, ApiException {
    GenericKubernetesApi<V1Prometheus, V1PrometheusList> prometheusApi = new GenericKubernetesApi<>(V1Prometheus.class, V1PrometheusList.class, "monitoring.coreos.com", "v1", "prometheuses", ClientBuilder.defaultClient());
    prometheusApi.create(new V1Prometheus().metadata(new V1ObjectMeta().namespace("default").name("my-prometheus")).kind("Prometheus").apiVersion("monitoring.coreos.com/v1").spec(new V1PrometheusSpec())).throwsApiException();
}
Also used : V1Prometheus(com.coreos.monitoring.models.V1Prometheus) V1ObjectMeta(io.kubernetes.client.openapi.models.V1ObjectMeta) V1PrometheusList(com.coreos.monitoring.models.V1PrometheusList) GenericKubernetesApi(io.kubernetes.client.util.generic.GenericKubernetesApi) V1PrometheusSpec(com.coreos.monitoring.models.V1PrometheusSpec)

Aggregations

V1Prometheus (com.coreos.monitoring.models.V1Prometheus)1 V1PrometheusList (com.coreos.monitoring.models.V1PrometheusList)1 V1PrometheusSpec (com.coreos.monitoring.models.V1PrometheusSpec)1 V1ObjectMeta (io.kubernetes.client.openapi.models.V1ObjectMeta)1 GenericKubernetesApi (io.kubernetes.client.util.generic.GenericKubernetesApi)1