You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/static-ip.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Use a static IP address with the Azure Kubernetes Service (AKS) load balancer
2
+
title: Use a static IP address and DNS label with the Azure Kubernetes Service (AKS) load balancer
3
3
description: Learn how to create and use a static IP address with the Azure Kubernetes Service (AKS) load balancer.
4
4
services: container-service
5
5
author: mlearned
@@ -12,7 +12,7 @@ ms.author: mlearned
12
12
#Customer intent: As a cluster operator or developer, I want to create and manage static IP address resources in Azure that I can use beyond the lifecycle of an individual Kubernetes service deployed in an AKS cluster.
13
13
---
14
14
15
-
# Use a static public IP address with the Azure Kubernetes Service (AKS) load balancer
15
+
# Use a static public IP address and DNS label with the Azure Kubernetes Service (AKS) load balancer
16
16
17
17
By default, the public IP address assigned to a load balancer resource created by an AKS cluster is only valid for the lifespan of that resource. If you delete the Kubernetes service, the associated load balancer and IP address are also deleted. If you want to assign a specific IP address or retain an IP address for redeployed Kubernetes services, you can create and use a static public IP address.
18
18
@@ -96,6 +96,30 @@ Create the service and deployment with the `kubectl apply` command.
96
96
kubectl apply -f load-balancer-service.yaml
97
97
```
98
98
99
+
## Apply a DNS label to the service
100
+
101
+
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. This publishes a fully qualified domain name for your service using Azure's public DNS servers and top-level domain. The annotation value must be unique within the Azure location, so its recommended to use a sufficiently qualified label.
102
+
103
+
Azure will then automatically append a default subnet, such as `<location>.cloudapp.azure.com` (where location is the region you selected), to the name you provide, to create the fully qualified DNS name. For example:
> To publish the service on your own domain, see [Azure DNS][azure-dns-zone] and the [external-dns][external-dns] project.
122
+
99
123
## Troubleshoot
100
124
101
125
If the static IP address defined in the *loadBalancerIP* property of the Kubernetes service manifest does not exist, or has not been created in the node resource group and no additional delegations configured, the load balancer service creation fails. To troubleshoot, review the service creation events with the [kubectl describe][kubectl-describe] command. Provide the name of the service as specified in the YAML manifest, as shown in the following example:
@@ -134,6 +158,8 @@ For additional control over the network traffic to your applications, you may wa
0 commit comments