I think we have no concrete reason to always override the
"REST_SERVICE_EXPOSED_TYPE" to "ClusterIP".
It was introduced to fix the default value for releases before 1.15. And I
believe we need to respect the user configured values.

Best,
Yang

Vignesh Kumar Kathiresan <vkath...@yahooinc.com> 于2022年9月3日周六 05:07写道:

> Jacob,
> Thanks, I checked it out and didn't work. The config overriding to
> ClusterIP part
> <https://github.com/apache/flink-kubernetes-operator/blob/468460275984bf1737640aa2fad912dc84da66ad/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/FlinkConfigBuilder.java#L186>
>  we
> were talking about.  So looks like its always being set to ClusterIP now.
>
> Yang,
> Having the alb target type as ip works with a ClusterIP type service.
>
> On Fri, Sep 2, 2022 at 8:18 AM Jeesmon Jacob <jees...@gmail.com> wrote:
>
>> I remember testing the operator with the rest service exposed as
>> NodePort. NodePort requires rbac.nodeRoules.create: true (default is false)
>> in values.yaml. Maybe you missed that?
>>
>>
>> https://github.com/apache/flink-kubernetes-operator/blob/release-1.1/helm/flink-kubernetes-operator/values.yaml#L34-L38
>> <https://urldefense.com/v3/__https://github.com/apache/flink-kubernetes-operator/blob/release-1.1/helm/flink-kubernetes-operator/values.yaml*L34-L38__;Iw!!Op6eflyXZCqGR5I!DTn70pqhttQzBpwxuX_IzpnrchfomQ2-Qj8DIHnahai7tLLDx3MX9lmkcnZvRdz4f-LCTpuVvlqTdV-w$>
>>
>> On Thu, Sep 1, 2022 at 11:45 PM Vignesh Kumar Kathiresan via user <
>> user@flink.apache.org> wrote:
>>
>>> Hi Yang,
>>>
>>> Yeah, I gathered that from the operator code soon after posting. I am
>>> using the aws alb ingress class [1]. There under considerations it is
>>> mentioned if the alb target type is "instance" which is the default traffic
>>> mode, the kubernetes service type has to be nodeport or loadbalancer.
>>>
>>> Also alb target if changed to "ip" might work. Let me try that. I
>>> believe there should be a reason to always override the
>>> "REST_SERVICE_EXPOSED_TYPE" to "ClusterIP".
>>>
>>> [1] https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
>>> <https://urldefense.com/v3/__https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html__;!!Op6eflyXZCqGR5I!DTn70pqhttQzBpwxuX_IzpnrchfomQ2-Qj8DIHnahai7tLLDx3MX9lmkcnZvRdz4f-LCTpuVvjbzj4cE$>
>>>
>>> On Thu, Sep 1, 2022 at 7:01 PM Yang Wang <danrtsey...@gmail.com> wrote:
>>>
>>>> I am afraid the current flink-kubernetes-operator always overrides the
>>>> "REST_SERVICE_EXPOSED_TYPE" to "ClusterIP".
>>>> Could you please share why the ingress[1] could not meet your
>>>> requirements? Compared with NodePort, I think it is a more graceful
>>>> implementation.
>>>>
>>>> [1].
>>>> https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-release-1.1/docs/operations/ingress/
>>>> <https://urldefense.com/v3/__https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-release-1.1/docs/operations/ingress/__;!!Op6eflyXZCqGR5I!FZvr8XAEWiEa176d0PfqyLJQoxTGIsDkpV-xqs5JNRCJc3Kv43nm-sa2l275jTPk50K2mjrI3COxrj0op5P5cw$>
>>>>
>>>> Best,
>>>> Yang
>>>>
>>>> Vignesh Kumar Kathiresan via user <user@flink.apache.org> 于2022年9月2日周五
>>>> 04:57写道:
>>>>
>>>>> Hello Flink community,
>>>>>
>>>>> Need some help with "flink kubernetes operator" based cluster setup.
>>>>>
>>>>> My flink cluster is set up using the flink-kubernetes-operator in AWS
>>>>> EKS. The required resources(deployments, pods, services, configmaps etc)
>>>>> are created as expected. But the service "*-rest" is created as a
>>>>> "ClusterIP" type. I would want it created as a NodePort type.
>>>>>
>>>>> I want to expose the UI to external viewing via ingress using the aws
>>>>> alb class. This aws-load balancer-controller requires my service to be of
>>>>> type NodePort.
>>>>>
>>>>> I have tried a few options but the service is always created as
>>>>> ClusterIP.
>>>>> 1) In the FlinkDeployment CRD, under spec.flinkConfiguration
>>>>> added kubernetes.rest-service.exposed.type: "NodePort"
>>>>> 2) In the operator helm values.yaml
>>>>>
>>>>> defaultConfiguration:
>>>>>   create: true
>>>>>   # Set append to false to replace configuration files
>>>>>   append: true
>>>>>   flink-conf.yaml: |+
>>>>>     # Flink Config Overrides
>>>>>     kubernetes.rest-service.exposed.type: NodePort
>>>>>
>>>>> Neither option gives me a NodePort type service for the UI.
>>>>> Any suggestions?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>

Reply via email to