class DeploymentExamples {

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

  private static final String NAMESPACE = "this-is-a-test";

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

    try (KubernetesClient client = new KubernetesClientBuilder().build()) {
      // Create a namespace for all our stuff
      Namespace ns = new NamespaceBuilder().withNewMetadata().withName(NAMESPACE).addToLabels("this", "rocks").endMetadata()
          .build();
      logger.info("Created namespace: {}", client.namespaces().resource(ns).createOrReplace());

      ServiceAccount fabric8 = new ServiceAccountBuilder().withNewMetadata().withName("fabric8").endMetadata().build();

      client.serviceAccounts().inNamespace(NAMESPACE).resource(fabric8).createOrReplace();
      try {
        Deployment deployment = new DeploymentBuilder()
            .withNewMetadata()
            .withName("nginx")
            .endMetadata()
            .withNewSpec()
            .withReplicas(1)
            .withNewTemplate()
            .withNewMetadata()
            .addToLabels("app", "nginx")
            .endMetadata()
            .withNewSpec()
            .addNewContainer()
            .withName("nginx")
            .withImage("nginx")
            .addNewPort()
            .withContainerPort(80)
            .endPort()
            .endContainer()
            .endSpec()
            .endTemplate()
            .withNewSelector()
            .addToMatchLabels("app", "nginx")
            .endSelector()
            .endSpec()
            .build();

        deployment = client.apps().deployments().inNamespace(NAMESPACE).resource(deployment).create();
        logger.info("Created deployment: {}", deployment);

        logger.info("Scaling up: {}", deployment.getMetadata().getName());
        client.apps().deployments().inNamespace(NAMESPACE).withName("nginx").scale(2, true);
        logger.info("Created replica sets: {}", client.apps().replicaSets().inNamespace(NAMESPACE).list().getItems());
        logger.info("Deleting: {}", deployment.getMetadata().getName());
        client.resource(deployment).delete();
      } finally {
        client.namespaces().withName(NAMESPACE).delete();
      }
      logger.info("Done.");
    }
  
<no_super_class>