Interacting with flink-jobmanager via CLI in separate pod

Posted by Robert Cullen on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Interacting-with-flink-jobmanager-via-CLI-in-separate-pod-tp43456.html

I have a flink cluster running in kubernetes, just the basic installation with one JobManager and two TaskManagers. I want to interact with it via command line from a separate container ie:

root@flink-client:/opt/flink# ./bin/flink list --target kubernetes-application -Dkubernetes.cluster-id=job-manager

How do you interact in the same kubernetes instance via CLI (Not from the desktop)?  This is the exception:

------------------------------------------------------------
 The program finished with the following exception:

java.lang.RuntimeException: org.apache.flink.client.deployment.ClusterRetrieveException: Could not get the rest endpoint of job-manager
        at org.apache.flink.kubernetes.KubernetesClusterDescriptor.lambda$createClusterClientProvider$0(KubernetesClusterDescriptor.java:103)
        at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:145)
        at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:67)
        at org.apache.flink.client.cli.CliFrontend.runClusterAction(CliFrontend.java:1001)
        at org.apache.flink.client.cli.CliFrontend.list(CliFrontend.java:427)
        at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1060)
        at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132)
        at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
        at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132)
Caused by: org.apache.flink.client.deployment.ClusterRetrieveException: Could not get the rest endpoint of job-manager
        ... 9 more
root@flink-client:/opt/flink#
--
Robert Cullen
240-475-4490