使用com.google.apis:google-api-services-container:v1-rev54-1.25.0
,
我可以这样创建集群:
import com.google.api.services.container.Container;
import com.google.api.services.container.model.Cluster;
import com.google.api.services.container.model.CreateClusterRequest;
Container containerService = new
Container.Builder(GoogleNetHttpTransport.newTrustedTransport(),
JacksonFactory.getDefaultInstance(),
getInit()).setApplicationName(APP_NAME).build();
CreateClusterRequest request = new CreateClusterRequest();
Cluster cluster = new Cluster();
cluster.setName(name);
cluster.setInitialNodeCount(1);
request.setCluster(cluster);
containerService.projects().locations().clusters().create(projectPath,
request).execute();
,但我不知道如何将工作负载部署到此集群(使用Java)。有人可以帮忙吗?