public class KubernetesClient extends Object implements Kubernetes, KubernetesExtensions
KubernetesFactory and the differences between
the core Kubernetes API and the KubernetesExtensionsNAMESPACE_ALL, NAMESPACE_DEFAULT| Constructor and Description |
|---|
KubernetesClient() |
KubernetesClient(KubernetesFactory factory) |
KubernetesClient(KubernetesFactory factoryReadOnly,
KubernetesFactory factoryWriteable) |
KubernetesClient(String url) |
public KubernetesClient()
public KubernetesClient(String url)
public KubernetesClient(KubernetesFactory factory)
public KubernetesClient(KubernetesFactory factoryReadOnly, KubernetesFactory factoryWriteable)
public String getNamespace()
public void setNamespace(String namespace)
public Kubernetes getKubernetes()
public Kubernetes getKubernetes(boolean writeable)
public KubernetesExtensions getKubernetesExtensions()
public KubernetesFactory getFactory(boolean writeable)
public void setFactory(KubernetesFactory factory)
public void setWriteableFactory(KubernetesFactory factory)
public String getAddress()
public String getWriteableAddress()
@GET @Path(value="pods") public PodList getPods()
public PodList getPods(@QueryParam(value="namespace") String namespace)
KubernetesgetPods in interface Kubernetes@DELETE
@Path(value="pods/{podId}")
public String deletePod(@NotNull
String podId)
throws Exception
Exception@DELETE
@Path(value="pods/{podId}")
@Consumes(value="text/plain")
public String deletePod(@NotNull
String podId,
String namespace)
throws Exception
deletePod in interface KubernetesException@GET
@Path(value="replicationControllers/{controllerId}")
@Produces(value="application/json")
public ReplicationController getReplicationController(@NotNull
String controllerId)
public ReplicationController getReplicationController(@PathParam(value="controllerId")@NotNull String controllerId, @QueryParam(value="namespace") String namespace)
KubernetesgetReplicationController in interface Kubernetes@DELETE
@Path(value="replicationControllers/{controllerId}")
@Produces(value="application/json")
public String deleteReplicationController(@NotNull
String controllerId)
throws Exception
Exception@DELETE
@Path(value="replicationControllers/{controllerId}")
@Produces(value="application/json")
@Consumes(value="text/plain")
public String deleteReplicationController(@NotNull
String controllerId,
String namespace)
throws Exception
KubernetesdeleteReplicationController in interface KubernetesException@DELETE
@Path(value="services/{serviceId}")
@Produces(value="application/json")
@Consumes(value="text/plain")
public String deleteService(@NotNull
String serviceId,
String namespace)
throws Exception
deleteService in interface KubernetesException@Path(value="replicationControllers") @GET @Produces(value="application/json") public ReplicationControllerList getReplicationControllers()
public ReplicationControllerList getReplicationControllers(@QueryParam(value="namespace") String namespace)
KubernetesgetReplicationControllers in interface Kubernetes@PUT
@Path(value="replicationControllers/{controllerId}")
@Consumes(value="application/json")
public String updateReplicationController(@NotNull
String controllerId,
ReplicationController entity)
throws Exception
Exception@PUT
@Path(value="replicationControllers/{controllerId}")
@Consumes(value="application/json")
public String updateReplicationController(@NotNull
String controllerId,
ReplicationController entity,
String namespace)
throws Exception
updateReplicationController in interface KubernetesException@PUT
@Path(value="services/{serviceId}")
@Consumes(value="application/json")
public String updateService(@NotNull
String serviceId,
Service entity)
throws Exception
Exceptionpublic String updateService(@PathParam(value="serviceId")@NotNull String serviceId, Service entity, @QueryParam(value="namespace") String namespace) throws Exception
KubernetesupdateService in interface KubernetesException@GET
@Path(value="services/{serviceId}")
@Produces(value="application/json")
public Service getService(@NotNull
String serviceId)
public Service getService(@PathParam(value="serviceId")@NotNull String serviceId, @QueryParam(value="namespace") String namespace)
KubernetesgetService in interface Kubernetes@DELETE
@Path(value="services/{serviceId}")
@Produces(value="application/json")
public String deleteService(@NotNull
String serviceId)
throws Exception
Exceptionpublic Pod getPod(@PathParam(value="podId")@NotNull String podId, @QueryParam(value="namespace") String namespace)
KubernetesgetPod in interface Kubernetes@PUT
@Path(value="pods/{podId}")
@Consumes(value="application/json")
public String updatePod(@NotNull
String podId,
Pod entity)
throws Exception
Exceptionpublic String updatePod(@PathParam(value="podId")@NotNull String podId, Pod entity, @QueryParam(value="namespace") String namespace) throws Exception
KubernetesupdatePod in interface KubernetesException@Path(value="services") @GET @Produces(value="application/json") public ServiceList getServices()
public ServiceList getServices(@QueryParam(value="namespace") String namespace)
KubernetesgetServices in interface Kubernetes@POST @Path(value="pods") @Consumes(value="application/json") public String createPod(Pod entity) throws Exception
Exception@POST @Path(value="pods") @Consumes(value="application/json") public String createPod(Pod entity, String namespace) throws Exception
createPod in interface KubernetesException@Path(value="services") @POST @Consumes(value="application/json") public String createService(Service entity) throws Exception
Exception@Path(value="services") @POST @Consumes(value="application/json") public String createService(Service entity, String namespace) throws Exception
createService in interface KubernetesException@Path(value="replicationControllers") @POST @Consumes(value="application/json") public String createReplicationController(ReplicationController entity) throws Exception
Exception@Path(value="replicationControllers") @POST @Consumes(value="application/json") public String createReplicationController(ReplicationController entity, String namespace) throws Exception
createReplicationController in interface KubernetesException@GET @Path(value="endpoints") public EndpointsList getEndpoints()
@GET @Path(value="endpoints") public EndpointsList getEndpoints(String namespace)
KubernetesgetEndpoints in interface Kubernetes@GET
@Path(value="endpoints/{serviceId}")
public Endpoints endpointsForService(@NotNull
String serviceId,
String namespace)
KubernetesendpointsForService in interface Kubernetes@GET @Path(value="minions") public MinionList getMinions()
KubernetesgetMinions in interface Kubernetes@GET
@Path(value="minions/{minionId}")
public Minion minion(@NotNull
String minionId)
Kubernetesminion in interface Kubernetes@POST @Path(value="configs") @Consumes(value="application/json") public String createConfig(Object entity) throws Exception
createConfig in interface KubernetesExtensionsException@POST @Path(value="deploymentConfigs") public String createDeploymentConfig(DeploymentConfig entity) throws Exception
createDeploymentConfig in interface KubernetesExtensionsException@POST @Path(value="template") @Consumes(value="application/json") public String createTemplate(Object entity) throws Exception
createTemplate in interface KubernetesExtensionsException@POST @Path(value="templateConfigs") @Consumes(value="application/json") public String createTemplateConfig(Object entity) throws Exception
createTemplateConfig in interface KubernetesExtensionsException@DELETE
@Path(value="buildConfigs/{name}")
public String deleteBuildConfig(@NotNull
String name,
String namespace)
deleteBuildConfig in interface KubernetesExtensions@DELETE
@Path(value="deploymentConfigs/{name}")
public String deleteDeploymentConfig(@NotNull
String name,
String namespace)
deleteDeploymentConfig in interface KubernetesExtensionspublic RouteList getRoutes(@QueryParam(value="namespace") String namespace)
getRoutes in interface KubernetesExtensionspublic Route getRoute(@PathParam(value="name")@NotNull String name, @QueryParam(value="namespace") String namespace)
getRoute in interface KubernetesExtensions@POST @Path(value="builds") public String createBuild(Build entity) throws Exception
createBuild in interface KubernetesExtensionsException@DELETE
@Path(value="builds/{name}")
public String deleteBuild(@NotNull
String name,
String namespace)
deleteBuild in interface KubernetesExtensions@GET
@Path(value="builds/{name}")
public Build getBuild(@NotNull
String name,
String namespace)
getBuild in interface KubernetesExtensions@GET @Path(value="builds") public BuildList getBuilds(String namespace)
getBuilds in interface KubernetesExtensions@PUT
@Path(value="builds/{name}")
@Consumes(value="application/json")
public String updateBuild(@NotNull
String name,
Build entity,
String namespace)
throws Exception
updateBuild in interface KubernetesExtensionsException@GET
@Path(value="buildConfigs/{name}")
public BuildConfig getBuildConfig(@NotNull
String name,
String namespace)
getBuildConfig in interface KubernetesExtensions@GET @Path(value="buildConfigs") public BuildConfigList getBuildConfigs(String namespace)
getBuildConfigs in interface KubernetesExtensions@GET
@Path(value="deploymentConfigs/{name}")
public DeploymentConfig getDeploymentConfig(@NotNull
String name,
String namespace)
getDeploymentConfig in interface KubernetesExtensions@GET @Path(value="deploymentConfigs") public DeploymentConfigList getDeploymentConfigs(String namespace)
getDeploymentConfigs in interface KubernetesExtensions@PUT
@Path(value="buildConfigs/{name}")
@Consumes(value="application/json")
public String updateBuildConfig(@NotNull
String name,
BuildConfig entity,
String namespace)
throws Exception
updateBuildConfig in interface KubernetesExtensionsException@PUT
@Path(value="deploymentConfigs/{name}")
@Consumes(value="application/json")
public String updateDeploymentConfig(@NotNull
String name,
DeploymentConfig entity,
String namespace)
throws Exception
updateDeploymentConfig in interface KubernetesExtensionsException@POST @Path(value="buildConfigs") public String createBuildConfig(BuildConfig entity) throws Exception
createBuildConfig in interface KubernetesExtensionsException@GET
@Path(value="imageRepositories/{name}")
public ImageRepository getImageRepository(@NotNull
String name,
String namespace)
getImageRepository in interface KubernetesExtensions@GET @Path(value="imageRepositories") public ImageRepositoryList getImageRepositories(String namespace)
getImageRepositories in interface KubernetesExtensions@PUT
@Path(value="imageRepositories/{name}")
@Consumes(value="application/json")
public String updateImageRepository(@NotNull
String name,
ImageRepository entity,
String namespace)
throws Exception
updateImageRepository in interface KubernetesExtensionsException@DELETE
@Path(value="imageRepositories/{name}")
public String deleteImageRepository(@NotNull
String name,
String namespace)
deleteImageRepository in interface KubernetesExtensions@POST @Path(value="imageRepositories") public String createImageRepository(ImageRepository entity) throws Exception
createImageRepository in interface KubernetesExtensionsException@POST
@Path(value="buildConfigHooks/{name}/{secret}/{type}")
public String triggerBuild(@NotNull
String name,
String namespace,
@NotNull
String secret,
@NotNull
String type,
Object body)
triggerBuild in interface KubernetesExtensionspublic void deleteReplicationController(ReplicationController entity) throws Exception
Exceptionpublic ReplicationController getReplicationControllerForPod(String podId)
public ReplicationController getReplicationControllerForPod(Pod pod)
public List<Pod> getPodsForReplicationController(ReplicationController service)
public List<Pod> getPodsForReplicationController(String replicationControllerId)
protected Kubernetes getWriteableKubernetes()
protected Collection<Pod> getPodList()
Copyright © 2011–2015 Red Hat. All rights reserved.