kubeblocks icon indicating copy to clipboard operation
kubeblocks copied to clipboard

[BUG] KB_POD_FQDN Environment Variable Does Not Comply with FQDN Definition

Open iziang opened this issue 10 months ago • 1 comments

Description:

The KB_POD_FQDN environment variable, as described in the documentation, is supposed to represent the Fully Qualified Domain Name (FQDN) of the running Pod. However, the current value of KB_POD_FQDN does not fully comply with the FQDN definition.

For example:

  • Namespace: kubeblocks-cloud-ns
  • Pod Name: maize-69948d986f-mysql-1
  • Headless Service Name: maize-69948d986f-mysql-headless
  • Current KB_POD_FQDN value: maize-69948d986f-mysql-1.maize-69948d986f-mysql-headless.kubeblocks-cloud-ns.svc

The current value is missing the cluster domain suffix (e.g., .cluster.local), which is required for a fully qualified domain name.

Expected Behavior: The KB_POD_FQDN environment variable should include the full FQDN, including the cluster domain suffix. For example:

maize-69948d986f-mysql-1.maize-69948d986f-mysql-headless.kubeblocks-cloud-ns.svc.cluster.local

Actual Behavior: The KB_POD_FQDN environment variable does not include the cluster domain suffix, resulting in an incomplete FQDN.

Steps to Reproduce:

  1. Deploy a KubeBlocks cluster in a namespace (e.g., kubeblocks-cloud-ns).
  2. Access a running Pod (e.g., maize-69948d986f-mysql-1).
  3. Check the value of the KB_POD_FQDN environment variable.
  4. Observe that the value does not include the cluster domain suffix (e.g., .cluster.local).

Environment: Kubernetes: v1.27.11 KubeBlocks: 0.9.3-beta.24 kbcli: 0.9.2 WARNING: version difference between kbcli (0.9.2) and kubeblocks (0.9.3-beta.24)

Additional Context: This issue may affect applications or services that rely on the KB_POD_FQDN environment variable to resolve the full FQDN of the Pod.

Proposed Solution: Update the logic that sets the KB_POD_FQDN environment variable to include the cluster domain suffix, ensuring it complies with the FQDN definition.

iziang avatar Feb 25 '25 09:02 iziang

This issue has been marked as stale because it has been open for 30 days with no activity

github-actions[bot] avatar Mar 31 '25 00:03 github-actions[bot]