| Modifier and Type | Method and Description |
|---|---|
Service |
build() |
Service.Builder |
clusterIp(String clusterIp)
(experimental) The IP address of the service and is usually assigned randomly by the master.
|
static Service.Builder |
create(software.constructs.Construct scope,
String id) |
Service.Builder |
externalIPs(List<String> externalIPs)
(experimental) A list of IP addresses for which nodes in the cluster will also accept traffic for this service.
|
Service.Builder |
metadata(ApiObjectMetadata metadata)
(experimental) Metadata that all persisted resources must have, which includes all objects users must create.
|
Service.Builder |
ports(List<? extends ServicePort> ports)
(experimental) The port exposed by this service.
|
Service.Builder |
type(ServiceType type)
(experimental) Determines how the Service is exposed.
|
@Stability(value=Experimental) public static Service.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.Service.Builder.@Stability(value=Experimental) public Service.Builder metadata(ApiObjectMetadata metadata)
metadata - Metadata that all persisted resources must have, which includes all objects users must create. This parameter is required.this@Stability(value=Experimental) public Service.Builder clusterIp(String clusterIp)
If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName.
Default: - Automatically assigned.
clusterIp - The IP address of the service and is usually assigned randomly by the master. This parameter is required.thishttps://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies@Stability(value=Experimental) public Service.Builder externalIPs(List<String> externalIPs)
These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
Default: - No external IPs.
externalIPs - A list of IP addresses for which nodes in the cluster will also accept traffic for this service. This parameter is required.this@Stability(value=Experimental) public Service.Builder ports(List<? extends ServicePort> ports)
More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
ports - The port exposed by this service. This parameter is required.this@Stability(value=Experimental) public Service.Builder type(ServiceType type)
More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
Default: ServiceType.ClusterIP
type - Determines how the Service is exposed. This parameter is required.thisCopyright © 2020. All rights reserved.