2

I am new to azure. I created an azure acs with kubenetes by using the following config(part of the whole file).

  - apiVersion: v1
    kind: Service
    metadata:
      name: my-web
    spec:
      type: LoadBalancer
      ports:
      - port: 80
        targetPort: 3000
      selector:
        app: my-web

The service can be visited, but only via IP address. There is no secondary dns(like: xxx.azurewebsite.com) generated. Currently, I use A record points to the ip address. It works, but I am afraid the ip address will be changed, and I have to manually change the dns A record. Just asking if there is a way to generate some stable dns for acs services?

CHEEKATLAPRADEEP
  • 12,191
  • 1
  • 19
  • 42
Ron
  • 6,037
  • 4
  • 33
  • 52

1 Answers1

2

Just asking if there is a way to generate some stable dns for acs services?

We can via Azure portal to change the public IP address to static, in this way, restart the service will not change the IP.

But in Azure, if we delete the k8s service, the Public IP address will collected by Azure platform, and we will lose this IP address. For now, Azure does not support to keep the public IP address for k8s service.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
  • Can generate some dns for acs load balance services? – Ron Nov 10 '17 at 19:54
  • 1
    @Ron For now, Azure does not support to set DNS for load balancer. we can via Azure portal to setup DNS for that public IP address. – Jason Ye Nov 13 '17 at 03:02
  • in portal, do you mean custom DNS or azure public sencondary ones? – Ron Nov 13 '17 at 03:30
  • @Ron I mean we can set DNS in public IP address--> configuration--> DNS name label. – Jason Ye Nov 13 '17 at 04:04
  • Got it, I tried it works. But the DNS is still bound to IP address, instead of k8s service. If pods gone, IP address re-assigned, the dns name label will disappear as well. – Ron Nov 13 '17 at 06:10
  • 1
    @Ron For now, Azure does not support other way to setup DNS for Azure K8S, and if we delete the pods, IP address will re-assigned, that is a by design behavior(ACS). [AKS](https://azure.microsoft.com/en-us/blog/introducing-azure-container-service-aks-managed-kubernetes-and-azure-container-registry-geo-replication/) still in preview, after that completed, we can use that to create k8s cluster and that cluster support kube-dns. By the way, if my answer is helps, please don't forget to accept it as an answer so that other community members will be benefited, thanks:) – Jason Ye Nov 13 '17 at 06:23