Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

747
Vistas
Azure Kubernetes - How to determine DNS name that can be used for INTERNAL Load Balancer?

We have defined our internal Load Balancer.

apiVersion: v1
kind: Service
metadata:
  name: ads-aks-test
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 9000
  selector:
    app: ads-aks-test

It has its IP and External IP. We want to access this service from VM in another Virtual Network. We need to know it's DNS name - fully qualified name in advance because we are deploying multiple applications from deployment platform and we want to know based on its Service Name how we can access it once it is being successfully deployed and not to wait for IP address to be determined (either manually or automatically). So for example that is our APP1, and after that automatically we install application APP2 which needs to reach this service. So for that reason we would like to avoid using the IP information.

How we can determine what is the service "hostname" by which we will access it from the second application?

Only information in docs which I found is: "If your service is using a dynamic or static public IP address, you can use the service annotation service.beta.kubernetes.io/azure-dns-label-name to set a public-facing DNS label." - but this is for public load balancer which we do not want!

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

Set up ExternalDNS in your K8s cluster. Here is a guide for Azure Private DNS. This will allow you to update the DNS record for any hostname you pick for the service, dynamically via Kubernetes resources.

Sample config looks like this (excerpted from Azure Private DNS guide)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: externaldns
spec:
  selector:
    matchLabels:
      app: externaldns
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: externaldns
    spec:
      containers:
      - name: externaldns
        image: k8s.gcr.io/external-dns/external-dns:v0.7.3
        args:
        - --source=service
        - --source=ingress
        - --domain-filter=example.com
        - --provider=azure-private-dns
        - --azure-resource-group=externaldns
        - --azure-subscription-id=<use the id of your subscription>
        volumeMounts:
        - name: azure-config-file
          mountPath: /etc/kubernetes
          readOnly: true
      volumes:
      - name: azure-config-file
        secret:
          secretName: azure-config-file
over 4 years ago · Santiago Trujillo Denunciar

0

An internal load balancer makes a Kubernetes service accessible only to applications running in the same virtual network as the Kubernetes cluster.

https://docs.microsoft.com/en-us/azure/aks/internal-lb

it seems you want this configuration? is there a peering? you also need to allow communication in NSG . enter image description here

over 4 years ago · Santiago Trujillo Denunciar

0

you can do kubectl get svc

and use the External IP of service ads-aks-test as in annotation you have mentioned "true" so it will be internal IP.

if you are looking forward to resolving the services name in the same cluster you can use the service name itself.

https://kubernetes.io/docs/concepts/services-networking/service/

you can do something like : your-svc.your-namespace.svc.cluster.local

note it will only work when services are in the same Kubernetes cluster.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda