Package org.cdk8s.plus23
Enum ServiceType
- java.lang.Object
-
- java.lang.Enum<ServiceType>
-
- org.cdk8s.plus23.ServiceType
-
- All Implemented Interfaces:
Serializable,Comparable<ServiceType>
@Generated(value="jsii-pacmak/1.61.0 (build abf4039)", date="2022-07-06T20:17:23.708Z") @Stability(Stable) public enum ServiceType extends Enum<ServiceType>
For some parts of your application (for example, frontends) you may want to expose a Service onto an external IP address, that's outside of your cluster.Kubernetes ServiceTypes allow you to specify what kind of Service you want. The default is ClusterIP.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLUSTER_IPExposes the Service on a cluster-internal IP.EXTERNAL_NAMEMaps the Service to the contents of the externalName field (e.g.LOAD_BALANCERExposes the Service externally using a cloud provider's load balancer.NODE_PORTExposes the Service on each Node's IP at a static port (the NodePort).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServiceTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ServiceType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLUSTER_IP
@Stability(Stable) public static final ServiceType CLUSTER_IP
Exposes the Service on a cluster-internal IP.Choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType
-
NODE_PORT
@Stability(Stable) public static final ServiceType NODE_PORT
Exposes the Service on each Node's IP at a static port (the NodePort).A ClusterIP Service, to which the NodePort Service routes, is automatically created. You'll be able to contact the NodePort Service, from outside the cluster, by requesting
: .
-
LOAD_BALANCER
@Stability(Stable) public static final ServiceType LOAD_BALANCER
Exposes the Service externally using a cloud provider's load balancer.NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created.
-
EXTERNAL_NAME
@Stability(Stable) public static final ServiceType EXTERNAL_NAME
Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up.Note: You need either kube-dns version 1.7 or CoreDNS version 0.0.8 or higher to use the ExternalName type.
-
-
Method Detail
-
values
public static ServiceType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ServiceType c : ServiceType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ServiceType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-