Skip to content

[FLINK-39788][kubernetes] Append .svc suffix to namespaced Kubernetes service hostnames#28493

Open
wilmerdooley wants to merge 1 commit into
apache:masterfrom
wilmerdooley:oss/flink-39788
Open

[FLINK-39788][kubernetes] Append .svc suffix to namespaced Kubernetes service hostnames#28493
wilmerdooley wants to merge 1 commit into
apache:masterfrom
wilmerdooley:oss/flink-39788

Conversation

@wilmerdooley

@wilmerdooley wilmerdooley commented Jun 19, 2026

Copy link
Copy Markdown

What is the purpose of the change

When a Flink Session cluster is deployed on Kubernetes, the TaskManager resolves the JobManager RPC endpoint through Pekko using the value returned by getNamespacedServiceName (and its related helpers). The current implementation produces a hostname of the form <service>.<namespace>, which is not a fully qualified Kubernetes service DNS name and is treated as an opaque host by Pekko. For namespaces whose name begins with a digit (for example 1234-ns), DNS resolution fails and the TaskManager logs Actor not found while trying to connect to the dispatcher (FLINK-39788).

This change appends the .svc segment so the namespaced service name becomes the standard Kubernetes service FQDN <service>.<namespace>.svc, which resolves correctly regardless of how the namespace name begins.

Brief change log

  • Append .svc to the namespaced service name in ExternalServiceDecorator.getNamespacedExternalServiceName, InternalServiceDecorator.getNamespacedInternalServiceName, and KubernetesUtils.getNamespacedServiceName, so the result is the FQDN <service>.<namespace>.svc.
  • Update the expected address in KubernetesClusterDescriptorTest to match the new fully qualified host.

Verifying this change

This change is already covered by existing tests, specifically KubernetesClusterDescriptorTest.testDeployApplicationClusterWithClusterIP, whose expected web interface URL is updated to assert the new <service>.<namespace>.svc hostname.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: yes (changes the Kubernetes service hostname used for JobManager RPC resolution)
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code

…es namespace starts from digit

Signed-off-by: wilmerdooley <wilmerdooley1@gmail.com>
@flinkbot

flinkbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants