Interface ExposeDeploymentViaServiceOptions

    • Method Detail

      • getName

        @Stability(Stable)
        @Nullable
        default String getName()
        The name of the service to expose.

        This will be set on the Service.metadata and must be a DNS_LABEL

        Default: undefined Uses the system generated name.

      • getPort

        @Stability(Stable)
        @Nullable
        default Number getPort()
        The port that the service should serve on.

        Default: - Copied from the container of the deployment. If a port could not be determined, throws an error.

      • getProtocol

        @Stability(Stable)
        @Nullable
        default Protocol getProtocol()
        The IP protocol for this port.

        Supports "TCP", "UDP", and "SCTP". Default is TCP.

        Default: Protocol.TCP

      • getServiceType

        @Stability(Stable)
        @Nullable
        default ServiceType getServiceType()
        The type of the exposed service.

        Default: - ClusterIP.

      • getTargetPort

        @Stability(Stable)
        @Nullable
        default Number getTargetPort()
        The port number the service will redirect to.

        Default: - The port of the first container in the deployment (ie. containers[0].port)