@Override
  public void init(String name, Map<String, String> containerProperties) {
    super.init(name, containerProperties);
    // start k8s job using k8s client
    Optional<String> kubeConfigPath =
        Optional.ofNullable(containerProperties.get(KUBE_CONFIG_PATH));
    Config config =
        kubeConfigPath
            .map(path -> Config.fromKubeconfig(getKubeConfigContent(path)))
            .orElseGet(() -> new ConfigBuilder().build());
    this.client = new KubernetesClientBuilder().withConfig(config).build();
  }
Kubernetes Optimizer Container with Standalone Optimizer
amoro-ams/src/main/java/org/apache/amoro/server/manager/KubernetesOptimizerContainer.java