use of com.marcnuri.yakc.api.apiextensions.v1.ApiextensionsV1Api in project yakc by manusa.
the class CrdQuickstart method main.
public static void main(String[] args) {
System.out.println("Complete Custom Resource Definition (CRD) example:\n" + " - Creates a namespace\n" + " - Deletes CRD if exists\n" + " - Creates CRD\n" + " - Creates custom resource - TV Show\n" + " - List entries for custom resource - TV Show\n" + " - Patch entry for custom resource - TV Show\n" + " - List patched entries for custom resource - TV Show\n" + "Starting...\n");
try (KubernetesClient kc = new KubernetesClient()) {
final CoreV1Api core = kc.create(CoreV1Api.class);
final ApiextensionsV1Api extensions = kc.create(ApiextensionsV1Api.class);
final ShowsV1Api shows = kc.create(ShowsV1Api.class);
createNamespace(core);
deleteCrdIfExists(extensions);
createCrd(extensions);
createShows(shows);
listShows(shows);
patchShow(shows);
listShows(shows);
deleteCrd(extensions);
} catch (IOException ex) {
ex.printStackTrace();
}
}
Aggregations