public interface IService extends IResource
| Modifier and Type | Method and Description |
|---|---|
IServicePort |
addPort(int port,
int targetPort) |
IServicePort |
addPort(int port,
int targetPort,
String name) |
String |
getClusterIP()
Returns the IP of the service.
|
List<IPod> |
getPods()
Retrieves the pods for this service
|
int |
getPort()
Returns the first exposed port that is mapped to a running image
|
String |
getPortalIP()
Deprecated.
|
List<IServicePort> |
getPorts()
Get the collection of ports for the service
|
Map<String,String> |
getSelector()
Returns the selector used to find the Pod to which this service is routing
|
String |
getTargetPort()
The port this service targets on the pod
|
String |
getType()
Returns the type of the service.
|
void |
setPort(int port)
Sets the exposed port that is mapped to a running image
|
void |
setPorts(List<IServicePort> ports)
Set the collection of ports for the service
|
void |
setSelector(Map<String,String> selector)
Sets the container name that the service routes traffic to.
|
void |
setSelector(String key,
String value)
Convenience method for setting a selector that has a singular key/value pair.
|
void |
setTargetPort(int port)
Sets the container port exposed by the image
|
void |
setType(String type)
Sets the type of the service.
|
addLabel, getAnnotation, getAnnotations, getCapabilities, getCreationTimeStamp, getLabels, getMetadata, getName, getNamespace, getNamespaceName, getProject, getResourceVersion, isAnnotatedWith, removeAnnotation, setAnnotationaccept, getCapability, supportsgetApiVersiontoJson, toJsonvoid setTargetPort(int port)
void setPort(int port)
int getPort()
IServicePort addPort(int port, int targetPort)
IServicePort addPort(int port, int targetPort, String name)
void setSelector(Map<String,String> selector)
void setSelector(String key, String value)
Map<String,String> getSelector()
String getTargetPort()
@Deprecated String getPortalIP()
String getClusterIP()
List<IServicePort> getPorts()
void setPorts(List<IServicePort> ports)
String getType()
void setType(String type)
Copyright © 2019 Red Hat, Inc. All Rights Reserved.