使用Java API在Google kubernetes云中部署工作负载

时间:2018-09-06 11:49:47

标签: java kubernetes google-cloud-platform

使用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)。有人可以帮忙吗?

0 个答案:

没有答案