| Modifier and Type | Method and Description |
|---|---|
Service |
build() |
Service.Builder |
clusterIp(String clusterIp)
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)
A list of IP addresses for which nodes in the cluster will also accept traffic for this service.
|
Service.Builder |
externalName(String externalName)
The externalName to be used when ServiceType.EXTERNAL_NAME is set.
|
Service.Builder |
loadBalancerSourceRanges(List<String> loadBalancerSourceRanges)
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs.
|
Service.Builder |
metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.
|
Service.Builder |
ports(List<? extends ServicePort> ports)
The port exposed by this service.
|
Service.Builder |
type(ServiceType type)
Determines how the Service is exposed.
|
@Stability(value=Stable) 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=Stable) public Service.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
metadata - Metadata that all persisted resources must have, which includes all objects users must create. This parameter is required.this@Stability(value=Stable) 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=Stable) 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=Stable) public Service.Builder externalName(String externalName)
Default: - No external name.
externalName - The externalName to be used when ServiceType.EXTERNAL_NAME is set. This parameter is required.this@Stability(value=Stable) public Service.Builder loadBalancerSourceRanges(List<String> loadBalancerSourceRanges)
More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
loadBalancerSourceRanges - A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. This parameter is required.this@Stability(value=Stable) 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=Stable) 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 © 2021. All rights reserved.