class PersistentVolumeClaimExample {
  private static final Logger logger = LoggerFactory.getLogger(PersistentVolumeClaimExample.class);

  public static void main(String[] args) {<FILL_FUNCTION_BODY>}
}

    String namespace = "default";
    String storageClassName = "my-local-storage";
    final ConfigBuilder configBuilder = new ConfigBuilder();
    if (args.length > 0) {
      configBuilder.withMasterUrl(args[0]);
      logger.info("Using master with URL: {}", args[0]);
    }
    try (KubernetesClient client = new KubernetesClientBuilder().withConfig(configBuilder.build()).build()) {
      try {

        StorageClass storageClass = client.storage().v1().storageClasses()
            .load(PersistentVolumeClaimExample.class.getResourceAsStream("/test-storage.yml")).item();
        client.storage().v1().storageClasses().resource(storageClass).create();

        logger.info("Creating PersistentVolume object");
        PersistentVolume pv = new PersistentVolumeBuilder()
            .withNewMetadata().withName("test-local-pv").endMetadata()
            .withNewSpec()
            .addToCapacity(Collections.singletonMap("storage", new Quantity("500Gi")))
            .withAccessModes("ReadWriteOnce")
            .withPersistentVolumeReclaimPolicy("Retain")
            .withStorageClassName(storageClassName)
            .withNewLocal()
            .withPath("/mnt/disks/vol1")
            .endLocal()
            .withNewNodeAffinity()
            .withNewRequired()
            .addNewNodeSelectorTerm()
            .withMatchExpressions(Collections.singletonList(new NodeSelectorRequirementBuilder()
                .withKey("kubernetes.io/hostname")
                .withOperator("In")
                .withValues("my-node")
                .build()))
            .endNodeSelectorTerm()
            .endRequired()
            .endNodeAffinity()
            .endSpec()
            .build();

        client.persistentVolumes().resource(pv).create();

        logger.info("Successfully created PersistentVolume object");

        logger.info("Creating PersistentVolumeClaim object");
        PersistentVolumeClaim persistentVolumeClaim = new PersistentVolumeClaimBuilder()
            .withNewMetadata().withName("test-pv-claim").withNamespace(namespace).endMetadata()
            .withNewSpec()
            .withStorageClassName(storageClassName)
            .withAccessModes("ReadWriteOnce")
            .withNewResources()
            .addToRequests("storage", new Quantity("500Gi"))
            .endResources()
            .endSpec()
            .build();

        client.persistentVolumeClaims().resource(persistentVolumeClaim).create();
        logger.info("Successfully created PersistentVolumeClaim object");

        logger.info("Creating pod");
        Pod pod = client.pods().inNamespace(namespace)
            .load(PersistentVolumeClaimExample.class.getResourceAsStream("/test-pv-pod.yml")).item();
        client.pods().inNamespace(namespace).resource(pod).create();
        logger.info("Successfully created pod");
      } finally {
        client.persistentVolumeClaims().inNamespace(namespace).withName("test-pv-claim").delete();
        client.persistentVolumes().withName("test-local-pv").delete();
        client.pods().inNamespace("default").withName("test-pv-pod").delete();
        client.storage().v1().storageClasses().withName(storageClassName).delete();
      }
    } catch (KubernetesClientException e) {
      logger.error("Could not create resource: {}", e.getMessage(), e);
    }
  
<no_super_class>