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

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

    final ConfigBuilder configBuilder = new ConfigBuilder();
    if (args.length > 0) {
      configBuilder.withMasterUrl(args[0]);
    }
    try (KubernetesClient client = new KubernetesClientBuilder().withConfig(configBuilder.build()).build()) {
      HorizontalPodAutoscaler horizontalPodAutoscaler = new HorizontalPodAutoscalerBuilder()
          .withNewMetadata().withName("the-hpa").withNamespace("default").endMetadata()
          .withNewSpec()
          .withNewScaleTargetRef()
          .withApiVersion("apps/v1")
          .withKind("Deployment")
          .withName("the-deployment")
          .endScaleTargetRef()
          .withMinReplicas(1)
          .withMaxReplicas(10)
          .withTargetCPUUtilizationPercentage(50)
          .endSpec()
          .build();

      client.autoscaling().v1().horizontalPodAutoscalers().inNamespace("default").resource(horizontalPodAutoscaler)
          .createOrReplace();
    } catch (KubernetesClientException e) {
      logger.error(e.getMessage(), e);
    }
  
<no_super_class>