Skip to content

Create a ClusterIP Service for VMs without public IP to enable FQDN-based access within a tenant #1731

Closed

Description

@mattia-eleuteri

Description

Currently, when creating a VM with external: true, the platform automatically creates a LoadBalancer Service and assigns a public IP. This behavior works well and allows accessing the VM via its FQDN (for example vm-instance-example).

However, when a VM does not have a public IP, no Service is created. As a consequence, accessing this VM from another VM within the same tenant requires using its internal IP address, which introduces several drawbacks:

  • Internal IPs are not user-friendly
  • They may change over time
  • They break name-based communication consistency inside the tenant

Problem

From a VM inside a tenant:

  • VMs with a public IP can be accessed via their FQDN
  • VMs without a public IP can only be accessed via their internal IP

This creates an inconsistency in how VMs are addressed within the same tenant.

Expected Behavior

For VMs without a public IP, the behavior should be similar to VMs with external: true, but using an internal-only Service.

Specifically, a headless ClusterIP Service should be created automatically at VM creation time, allowing:

  • DNS-based access using the VM FQDN
  • Stable, name-based communication between VMs within the same tenant
  • No external exposure

Proposed Solution

When a VM is created without a public IP, automatically create the following Service:

apiVersion: v1
kind: Service
metadata:
  name: vm-instance-example
  namespace: tenant-example
spec:
  selector:
    app.kubernetes.io/instance: vm-instance-example
  clusterIP: None

This would:

  • Enable DNS resolution (vm-instance-example.<namespace>.svc)
  • Allow consistent FQDN usage for all VMs, regardless of public exposure
  • Improve usability and tenant-internal networking consistency

Benefits

  • Consistent VM access model (FQDN everywhere)
  • No need to rely on internal IP addresses
  • Better alignment with Kubernetes-native service discovery
  • No impact on security (no external exposure)

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    on Dec 17, 2025
  2. added a commit that references this issue on Dec 19, 2025
    c8dc801
  3. added 2 commits that reference this issue on Dec 19, 2025
    ba50d01
    09e0b5f
  4. added a commit that references this issue on Dec 24, 2025
    1ffa1ef
  5. added a commit that references this issue on Jan 2, 2026
    fd62c77
  6. added 2 commits that reference this issue on Jan 8, 2026
    940f007
    c297375
  7. added a commit that references this issue on Jan 9, 2026
    676bbfd
  8. added a commit that references this issue on Jan 9, 2026
    b3179d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

kind/featureCategorizes issue or PR as related to a new feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions