Skip to content

Commit dbd77ce

Browse files
authored
Merge pull request #271326 from chasewilson/chase/concept/services
[AKS] Split Services Newtorking Conceptual Docs
2 parents 9041d95 + 2a5025f commit dbd77ce

10 files changed

+95
-80
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@
136136
href: concepts-network.md
137137
- name: CNI networking
138138
href: azure-cni-overview.md
139+
- name: Services
140+
href: concepts-network-services.md
139141
- name: Storage
140142
href: concepts-storage.md
141143
- name: Scaling
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Concepts - Services in Azure Kubernetes Services (AKS)
3+
description: Learn about networking Services in Azure Kubernetes Service (AKS), including what services are in Kubernetes and what types of Services are available in AKS.
4+
ms.topic: conceptual
5+
ms.date: 04/08/2024
6+
ms.custom: fasttrack-edit
7+
---
8+
9+
# Kubernetes Services in AKS
10+
11+
Kubernetes Services are used to logically group pods and provide network connectivity by allowing direct access to them through a specific IP address or DNS name on a designated port. This allows you to expose your application workloads to other services within the cluster or to external clients without having to manually manage the network configuration for each pod hosting a workload.
12+
13+
You can specify a Kubernetes _ServiceType_ to define the type of Service you want, e.g., if you want to expose a Service on an external IP address outside of your cluster. For more information, see the Kubernetes documentation on [Publishing Services (ServiceTypes)][service-types].
14+
15+
The following ServiceTypes are available in AKS:
16+
17+
## ClusterIP
18+
19+
ClusterIP creates an internal IP address for use within the AKS cluster. The ClusterIP Service is good for _internal-only applications_ that support other workloads within the cluster. ClusterIP is used by default if you don't explicitly specify a type for a Service.
20+
21+
![Diagram showing ClusterIP traffic flow in an AKS cluster.][aks-clusterip]
22+
23+
## NodePort
24+
25+
NodePort creates a port mapping on the underlying node that allows the application to be accessed directly with the node IP address and port.
26+
27+
![Diagram showing NodePort traffic flow in an AKS cluster.][aks-nodeport]
28+
29+
## LoadBalancer
30+
31+
LoadBalancer creates an Azure load balancer resource, configures an external IP address, and connects the requested pods to the load balancer backend pool. To allow customers' traffic to reach the application, load balancing rules are created on the desired ports.
32+
33+
![Diagram showing Load Balancer traffic flow in an AKS cluster.][aks-loadbalancer]
34+
35+
For HTTP load balancing of inbound traffic, another option is to use an [Ingress controller][ingress-controllers].
36+
37+
## ExternalName
38+
39+
Creates a specific DNS entry for easier application access.
40+
41+
Either the load balancers and services IP address can be dynamically assigned, or you can specify an existing static IP address. You can assign both internal and external static IP addresses. Existing static IP addresses are often tied to a DNS entry.
42+
43+
You can create both _internal_ and _external_ load balancers. Internal load balancers are only assigned a private IP address, so they can't be accessed from the Internet.
44+
45+
Learn more about Services in the [Kubernetes docs][k8s-service].
46+
47+
<!-- IMAGES -->
48+
[aks-clusterip]: media/concepts-network/aks-clusterip.png
49+
[aks-nodeport]: media/concepts-network/aks-nodeport.png
50+
[aks-loadbalancer]: media/concepts-network/aks-loadbalancer.png
51+
52+
<!-- LINKS - External -->
53+
[k8s-service]: https://kubernetes.io/docs/concepts/services-networking/service/
54+
[service-types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
55+
56+
<!-- LINKS - Internal -->
57+
[ingress-controllers]:concepts-network.md#ingress-controllers

articles/aks/concepts-network.md

Lines changed: 29 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,23 @@ ms.topic: conceptual
55
ms.date: 03/26/2024
66
author: schaffererin
77
ms.author: schaffererin
8-
98
ms.custom: fasttrack-edit
109
---
1110

1211
# Networking concepts for applications in Azure Kubernetes Service (AKS)
1312

1413
In a container-based, microservices approach to application development, application components work together to process their tasks. Kubernetes provides various resources enabling this cooperation:
1514

16-
* You can connect to and expose applications internally or externally.
17-
* You can build highly available applications by load balancing your applications.
18-
* You can restrict the flow of network traffic into or between pods and nodes to improve security.
19-
* You can configure Ingress traffic for SSL/TLS termination or routing of multiple components for your more complex applications.
15+
- You can connect to and expose applications internally or externally.
16+
- You can build highly available applications by load balancing your applications.
17+
- You can restrict the flow of network traffic into or between pods and nodes to improve security.
18+
- You can configure Ingress traffic for SSL/TLS termination or routing of multiple components for your more complex applications.
2019

2120
This article introduces the core concepts that provide networking to your applications in AKS:
2221

23-
* [Services and ServiceTypes](#services)
24-
* [Azure virtual networks](#azure-virtual-networks)
25-
* [Ingress controllers](#ingress-controllers)
26-
* [Network policies](#network-policies)
22+
- [Azure virtual networks](#azure-virtual-networks)
23+
- [Ingress controllers](#ingress-controllers)
24+
- [Network policies](#network-policies)
2725

2826
## Kubernetes networking basics
2927

@@ -35,8 +33,6 @@ Kubernetes employs a virtual networking layer to manage access within and betwee
3533

3634
Regarding specific Kubernetes functionalities:
3735

38-
- **Services**: Services is used to logically group pods, allowing direct access to them through a specific IP address or DNS name on a designated port.
39-
- **Service types**: Specifies the kind of Service you wish to create.
4036
- **Load balancer**: You can use a load balancer to distribute network traffic evenly across various resources.
4137
- **Ingress controllers**: These facilitate Layer 7 routing, which is essential for directing application traffic.
4238
- **Egress traffic control**: Kubernetes allows you to manage and control outbound traffic from cluster nodes.
@@ -49,51 +45,15 @@ In the context of the Azure platform:
4945
- As you open network ports to pods, Azure automatically configures the necessary network security group rules.
5046
- Azure can also manage external DNS configurations for HTTP application routing as new Ingress routes are established.
5147

52-
## Services
53-
54-
To simplify the network configuration for application workloads, Kubernetes uses *Services* to logically group a set of pods together and provide network connectivity. You can specify a Kubernetes *ServiceType* to define the type of Service you want. For example, if you want to expose a Service on an external IP address outside of your cluster. For more information, see the Kubernetes documentation on [Publishing Services (ServiceTypes)][service-types].
55-
56-
The following ServiceTypes are available:
57-
58-
* **ClusterIP**
59-
60-
ClusterIP creates an internal IP address for use within the AKS cluster. The ClusterIP Service is good for *internal-only applications* that support other workloads within the cluster. ClusterIP is the default used if you don't explicitly specify a type for a Service.
61-
62-
![Diagram showing ClusterIP traffic flow in an AKS cluster][aks-clusterip]
63-
64-
* **NodePort**
65-
66-
NodePort creates a port mapping on the underlying node that allows the application to be accessed directly with the node IP address and port.
67-
68-
![Diagram showing NodePort traffic flow in an AKS cluster][aks-nodeport]
69-
70-
* **LoadBalancer**
71-
72-
LoadBalancer creates an Azure load balancer resource, configures an external IP address, and connects the requested pods to the load balancer backend pool. To allow customers' traffic to reach the application, load balancing rules are created on the desired ports.
73-
74-
![Diagram showing Load Balancer traffic flow in an AKS cluster][aks-loadbalancer]
75-
76-
For HTTP load balancing of inbound traffic, another option is to use an [Ingress controller](#ingress-controllers).
77-
78-
* **ExternalName**
79-
80-
Creates a specific DNS entry for easier application access.
81-
82-
Either the load balancers and services IP address can be dynamically assigned, or you can specify an existing static IP address. You can assign both internal and external static IP addresses. Existing static IP addresses are often tied to a DNS entry.
83-
84-
You can create both *internal* and *external* load balancers. Internal load balancers are only assigned a private IP address, so they can't be accessed from the Internet.
85-
86-
Learn more about Services in the [Kubernetes docs][k8s-service].
87-
8848
## Azure virtual networks
8949

9050
In AKS, you can deploy a cluster that uses one of the following network models:
9151

92-
* ***Kubenet* networking**
52+
- ***Kubenet* networking**
9353

9454
The network resources are typically created and configured as the AKS cluster is deployed.
9555

96-
* ***Azure Container Networking Interface (CNI)* networking**
56+
- ***Azure Container Networking Interface (CNI)* networking**
9757

9858
The AKS cluster is connected to existing virtual network resources and configurations.
9959

@@ -150,14 +110,14 @@ It's possible to install in AKS a non-Microsoft CNI using the [Bring your own CN
150110

151111
Both kubenet and Azure CNI provide network connectivity for your AKS clusters. However, there are advantages and disadvantages to each. At a high level, the following considerations apply:
152112

153-
* **kubenet**
113+
- **kubenet**
154114

155-
* Conserves IP address space.
156-
* Uses Kubernetes internal or external load balancers to reach pods from outside of the cluster.
157-
* You manually manage and maintain user-defined routes (UDRs).
158-
* Maximum of 400 nodes per cluster.
115+
- Conserves IP address space.
116+
- Uses Kubernetes internal or external load balancers to reach pods from outside of the cluster.
117+
- You manually manage and maintain user-defined routes (UDRs).
118+
- Maximum of 400 nodes per cluster.
159119

160-
* **Azure CNI**
120+
- **Azure CNI**
161121

162122
* Pods get full virtual network connectivity and can be directly reached via their private IP address from connected networks.
163123
* Requires more IP address space.
@@ -188,13 +148,13 @@ For more information on Azure CNI and kubenet and to help determine which option
188148

189149
Whatever network model you use, both kubenet and Azure CNI can be deployed in one of the following ways:
190150

191-
* The Azure platform can automatically create and configure the virtual network resources when you create an AKS cluster.
192-
* You can manually create and configure the virtual network resources and attach to those resources when you create your AKS cluster.
151+
- The Azure platform can automatically create and configure the virtual network resources when you create an AKS cluster.
152+
- You can manually create and configure the virtual network resources and attach to those resources when you create your AKS cluster.
193153

194154
Although capabilities like service endpoints or UDRs are supported with both kubenet and Azure CNI, the [support policies for AKS][support-policies] define what changes you can make. For example:
195155

196-
* If you manually create the virtual network resources for an AKS cluster, you're supported when configuring your own UDRs or service endpoints.
197-
* If the Azure platform automatically creates the virtual network resources for your AKS cluster, you can't manually change those AKS-managed resources to configure your own UDRs or service endpoints.
156+
- If you manually create the virtual network resources for an AKS cluster, you're supported when configuring your own UDRs or service endpoints.
157+
- If the Azure platform automatically creates the virtual network resources for your AKS cluster, you can't manually change those AKS-managed resources to configure your own UDRs or service endpoints.
198158

199159
## Ingress controllers
200160

@@ -235,11 +195,11 @@ The following table lists the different scenarios where you might use each ingre
235195

236196
The application routing addon is the recommended way to configure an Ingress controller in AKS. The application routing addon is a fully managed ingress controller for Azure Kubernetes Service (AKS) that provides the following features:
237197

238-
* Easy configuration of managed NGINX Ingress controllers based on Kubernetes NGINX Ingress controller.
198+
- Easy configuration of managed NGINX Ingress controllers based on Kubernetes NGINX Ingress controller.
239199

240-
* Integration with Azure DNS for public and private zone management.
200+
- Integration with Azure DNS for public and private zone management.
241201

242-
* SSL termination with certificates stored in Azure Key Vault.
202+
- SSL termination with certificates stored in Azure Key Vault.
243203

244204
For more information about the application routing addon, see [Managed NGINX ingress with the application routing add-on](app-routing.md).
245205

@@ -271,8 +231,8 @@ For more information, see [How network security groups filter network traffic][n
271231

272232
By default, all pods in an AKS cluster can send and receive traffic without limitations. For improved security, define rules that control the flow of traffic, like:
273233

274-
* Back-end applications are only exposed to required frontend services.
275-
* Database components are only accessible to the application tiers that connect to them.
234+
- Back-end applications are only exposed to required frontend services.
235+
- Database components are only accessible to the application tiers that connect to them.
276236

277237
Network policy is a Kubernetes feature available in AKS that lets you control the traffic flow between pods. You can allow or deny traffic to the pod based on settings such as assigned labels, namespace, or traffic port. While network security groups are better for AKS nodes, network policies are a more suited, cloud-native way to control the flow of traffic for pods. As pods are dynamically created in an AKS cluster, required network policies can be automatically applied.
278238

@@ -286,23 +246,19 @@ For associated best practices, see [Best practices for network connectivity and
286246

287247
For more information on core Kubernetes and AKS concepts, see the following articles:
288248

289-
* [Kubernetes / AKS clusters and workloads][aks-concepts-clusters-workloads]
290-
* [Kubernetes / AKS access and identity][aks-concepts-identity]
291-
* [Kubernetes / AKS security][aks-concepts-security]
292-
* [Kubernetes / AKS storage][aks-concepts-storage]
293-
* [Kubernetes / AKS scale][aks-concepts-scale]
249+
- [Kubernetes / AKS clusters and workloads][aks-concepts-clusters-workloads]
250+
- [Kubernetes / AKS access and identity][aks-concepts-identity]
251+
- [Kubernetes / AKS security][aks-concepts-security]
252+
- [Kubernetes / AKS storage][aks-concepts-storage]
253+
- [Kubernetes / AKS scale][aks-concepts-scale]
294254

295255
<!-- IMAGES -->
296-
[aks-clusterip]: ./media/concepts-network/aks-clusterip.png
297-
[aks-nodeport]: ./media/concepts-network/aks-nodeport.png
298256
[aks-loadbalancer]: ./media/concepts-network/aks-loadbalancer.png
299257
[advanced-networking-diagram]: ./media/concepts-network/advanced-networking-diagram.png
300258
[aks-ingress]: ./media/concepts-network/aks-ingress.png
301259

302260
<!-- LINKS - External -->
303261
[cni-networking]: https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md
304-
[k8s-service]: https://kubernetes.io/docs/concepts/services-networking/service/
305-
[service-types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
306262

307263
<!-- LINKS - Internal -->
308264
[aks-configure-kubenet-networking]: configure-kubenet.md

articles/aks/learn/quick-windows-container-deploy-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ To learn more about AKS, and to walk through a complete code-to-deployment examp
337337
[az-group-create]: /cli/azure/group#az_group_create
338338
[aks-solution-guidance]: /azure/architecture/reference-architectures/containers/aks-start-here?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json
339339
[kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests
340-
[kubernetes-service]: ../concepts-network.md#services
340+
[kubernetes-service]: ../concepts-network-services.md
341341
[windows-server-password]: /windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements#reference
342342
[win-faq-change-admin-creds]: ../windows-faq.md#how-do-i-change-the-administrator-password-for-windows-server-nodes-on-my-cluster
343343
[baseline-reference-architecture]: /azure/architecture/reference-architectures/containers/aks/baseline-aks?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json

articles/aks/learn/quick-windows-container-deploy-portal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ To learn more about AKS, and to walk through a complete code-to-deployment examp
260260
[az-aks-get-credentials]: /cli/azure/aks#az_aks_get_credentials
261261
[azure-portal]: https://portal.azure.com
262262
[kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests
263-
[kubernetes-service]: ../concepts-network.md#services
263+
[kubernetes-service]: ../concepts-network-services.md
264264
[preset-config]: ../quotas-skus-regions.md#cluster-configuration-presets-in-the-azure-portal
265265
[import-azakscredential]: /powershell/module/az.aks/import-azakscredential
266266
[baseline-reference-architecture]: /azure/architecture/reference-architectures/containers/aks/baseline-aks?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json

articles/aks/learn/quick-windows-container-deploy-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ To learn more about AKS, and to walk through a complete code-to-deployment examp
318318
[new-azakscluster]: /powershell/module/az.aks/new-azakscluster
319319
[import-azakscredential]: /powershell/module/az.aks/import-azakscredential
320320
[kubernetes-deployment]: ../concepts-clusters-workloads.md#deployments-and-yaml-manifests
321-
[kubernetes-service]: ../concepts-network.md#services
321+
[kubernetes-service]: ../concepts-network-services.md
322322
[aks-tutorial]: ../tutorial-kubernetes-prepare-app.md
323323
[aks-solution-guidance]: /azure/architecture/reference-architectures/containers/aks-start-here?toc=/azure/aks/toc.json&bc=/azure/aks/breadcrumb/toc.json
324324
[windows-server-password]: /windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements#reference

articles/api-management/how-to-deploy-self-hosted-gateway-azure-kubernetes-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This article provides the steps for deploying self-hosted gateway component of A
3535
5. Make sure **Kubernetes** is selected under **Deployment scripts**.
3636
6. Select **\<gateway-name\>.yml** file link next to **Deployment** to download the file.
3737
7. Adjust the `config.service.endpoint`, port mappings, and container name in the .yml file as needed.
38-
8. Depending on your scenario, you might need to change the [service type](../aks/concepts-network.md#services).
38+
8. Depending on your scenario, you might need to change the [service type](../aks/concepts-network-services.md).
3939
* The default value is `LoadBalancer`, which is the external load balancer.
4040
* You can use the [internal load balancer](../aks/internal-lb.md) to restrict the access to the self-hosted gateway to only internal users.
4141
* The sample below uses `NodePort`.

articles/azure-linux/quickstart-azure-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ In this quickstart, you will use a manifest to create all objects needed to run
9191
* The sample Azure Vote Python applications.
9292
* A Redis instance.
9393

94-
Two [Kubernetes Services](../../articles/aks/concepts-network.md#services) are also created:
94+
Two [Kubernetes Services](../../articles/aks/concepts-network-services.md) are also created:
9595

9696
* An internal service for the Redis instance.
9797
* An external service to access the Azure Vote application from the internet.

articles/azure-linux/quickstart-azure-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ In this quickstart, you use a manifest to create all objects needed to run the [
8989
- The sample Azure Vote Python applications.
9090
- A Redis instance.
9191
92-
This manifest also creates two [Kubernetes Services](../../articles/aks/concepts-network.md#services):
92+
This manifest also creates two [Kubernetes Services](../../articles/aks/concepts-network-services.md):
9393
9494
- An internal service for the Redis instance.
9595
- An external service to access the Azure Vote application from the internet.

articles/azure-linux/quickstart-azure-resource-manager-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ In this quickstart, you use a manifest to create all objects needed to run the [
250250
* The sample Azure Vote Python applications.
251251
* A Redis instance.
252252
253-
Two [Kubernetes Services](../../articles/aks/concepts-network.md#services) are also created:
253+
Two [Kubernetes Services](../../articles/aks/concepts-network-services.md) are also created:
254254
255255
* An internal service for the Redis instance.
256256
* An external service to access the Azure Vote application from the internet.

0 commit comments

Comments
 (0)