I'd like to connect to a flyte-binary deployment i...
# flyte-deployment
c
I'd like to connect to a flyte-binary deployment in EKS. I am able to connect from my machine with the config endpoint
<dns://my-flyte-url.com>
just fine, and connect with a
FlyteRemote
instance as well. I am having an issue when trying to connect from inside the EKS cluster, however, since using that endpoint would try to leave the cluster before returning (and the origin IP address is not on the load balancer allowlist).
My question is - can I connect to the flyte-binary from inside the EKS cluster, using one of the services? i.e.,
Copy code
NAME                                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/flyte-flyte-binary-grpc      ClusterIP   10.100.25.184    <none>        8089/TCP   28d
service/flyte-flyte-binary-http      ClusterIP   10.100.25.40     <none>        8088/TCP   28d
service/flyte-flyte-binary-webhook   ClusterIP   10.100.141.137   <none>        443/TCP    28d
If so, what would the FlyteRemote config look like, would it be an insecure connection?
Copy code
flyte_remote = FlyteRemote(
    default_domain='development',
    default_project='project1',
    config=Config.for_endpoint(
        endpoint='dns:///flyte-flyte-binary-webhook.flyte.svc.cluster.local',
        insecure=True,
    )
)
It's funny, I can get the http API with a curl request, using
Copy code
<http://flyte-flyte-binary-http.flyte.svc.cluster.local:8088/api/v1/>...
but the flytekit Remote does not seem to work, or I am not configuring properly.
y
confirm it works with flytectl?
t
I'm just guessing but, when accessing from outside through your k8s ingress controller I think it always uses port 80 for insecure or 443 for secure and the ingress will route it to the correct internal k8s service. When accessing from inside the cluster you might need to explicitly reference the correct k8s service and port? I would guess
endpoint="flyte-flyte-binary-grpc:8089"
with
insecure=True
(normally the k8s ingress does the SSL stuff).
d
@Cody Scandore I see you want to use Service Discovery. I also haven't tried it but I guess that
dns:///flyte-flyte-binary-grpc.flyte.svc.cluster.local
should at least lead you to the right ClusterIP Service