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/concepts-network.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ This article introduces the core concepts that provide networking to your applic
25
25
26
26
To allow access to your applications, or for application components to communicate with each other, Kubernetes provides an abstraction layer to virtual networking. Kubernetes nodes are connected to a virtual network, and can provide inbound and outbound connectivity for pods. The *kube-proxy* component runs on each node to provide these network features.
27
27
28
-
In Kubernetes, *Services* logically group pods to allow for direct access via an IP address or DNS name and on a specific port. You can also distribute traffic using a *load balancer*. More complex routing of application traffic can also be achieved with *Ingress Controllers*. Security and filtering of the network traffic for pods is possible with Kubernetes *network policies* (in preview in AKS).
28
+
In Kubernetes, *Services* logically group pods to allow for direct access via an IP address or DNS name and on a specific port. You can also distribute traffic using a *load balancer*. More complex routing of application traffic can also be achieved with *Ingress Controllers*. Security and filtering of the network traffic for pods is possible with Kubernetes *network policies*.
29
29
30
30
The Azure platform also helps to simplify virtual networking for AKS clusters. When you create a Kubernetes load balancer, the underlying Azure load balancer resource is created and configured. As you open network ports to pods, the corresponding Azure network security group rules are configured. For HTTP application routing, Azure can also configure *external DNS* as new ingress routes are configured.
Copy file name to clipboardExpand all lines: articles/aks/configure-kubenet.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@ With *kubenet*, only the nodes receive an IP address in the virtual network subn
34
34
35
35

36
36
37
-
Azure supports a maximum of 400 routes in a UDR, so you can't have an AKS cluster larger than 400 nodes. AKS features such as [Virtual Nodes][virtual-nodes]or network policies aren't supported with *kubenet*.
37
+
Azure supports a maximum of 400 routes in a UDR, so you can't have an AKS cluster larger than 400 nodes. AKS [Virtual Nodes][virtual-nodes]and Azure Network Policies aren't supported with *kubenet*. You can use [Calico Network Policies][calico-network-policies], as they are supported with kubenet.
38
38
39
-
With *Azure CNI*, each pod receives an IP address in the IP subnet, and can directly communicate with other pods and services. Your clusters can be as large as the IP address range you specify. However, the IP address range must be planned in advance, and all of the IP addresses are consumed by the AKS nodes based on the maximum number of pods that they can support. Advanced network features and scenarios such as [Virtual Nodes][virtual-nodes] or network policies are supported with *Azure CNI*.
39
+
With *Azure CNI*, each pod receives an IP address in the IP subnet, and can directly communicate with other pods and services. Your clusters can be as large as the IP address range you specify. However, the IP address range must be planned in advance, and all of the IP addresses are consumed by the AKS nodes based on the maximum number of pods that they can support. Advanced network features and scenarios such as [Virtual Nodes][virtual-nodes] or Network Policies (either Azure or Calico) are supported with *Azure CNI*.
40
40
41
41
### IP address availability and exhaustion
42
42
@@ -68,20 +68,17 @@ Use *kubenet* when:
68
68
69
69
- You have limited IP address space.
70
70
- Most of the pod communication is within the cluster.
71
-
- You don't need advanced features such as virtual nodes or network policy.
71
+
- You don't need advanced AKS features such as virtual nodes or Azure Network Policy. Use [Calico network policies][calico-network-policies].
72
72
73
73
Use *Azure CNI* when:
74
74
75
75
- You have available IP address space.
76
76
- Most of the pod communication is to resources outside of the cluster.
77
77
- You don’t want to manage the UDRs.
78
-
- You need advanced features such as virtual nodes or network policy.
78
+
- You need AKS advanced features such as virtual nodes or Azure Network Policy. Use [Calico network policies][calico-network-policies].
79
79
80
80
For more information to help you decide which network model to use, see [Compare network models and their support scope][network-comparisons].
81
81
82
-
> [!NOTE]
83
-
> Kuberouter makes it possible to enable network policy when using kubenet and can be installed as a daemonset in an AKS cluster. Please be aware kube-router is still in beta and no support is offered by Microsoft for the project.
84
-
85
82
## Create a virtual network and subnet
86
83
87
84
To get started with using *kubenet* and your own virtual network subnet, first create a resource group using the [az group create][az-group-create] command. The following example creates a resource group named *myResourceGroup* in the *eastus* location:
@@ -168,6 +165,24 @@ az aks create \
168
165
--client-secret <password>
169
166
```
170
167
168
+
> [!Note]
169
+
> If you wish to enable an AKS cluster to include a [Calico network policy][calico-network-policies] you can use the following command.
When you create an AKS cluster, a network security group and route table are created. These network resources are managed by the AKS control plane. The network security group is automatically associated with the virtual NICs on your nodes. The route table is automatically associated with the virtual network subnet. Network security group rules and route tables and are automatically updated as you create and expose services.
172
187
173
188
## Next steps
@@ -178,6 +193,7 @@ With an AKS cluster deployed into your existing virtual network subnet, you can
Copy file name to clipboardExpand all lines: articles/aks/use-network-policies.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Azure provides two ways to implement network policy. You choose a network policy
46
46
47
47
Both implementations use Linux *IPTables* to enforce the specified policies. Policies are translated into sets of allowed and disallowed IP pairs. These pairs are then programmed as IPTable filter rules.
48
48
49
-
Network policy only works with the Azure CNI (advanced) option. Implementation is different for the two options:
49
+
Implementation is different for the two options:
50
50
51
51
**Azure Network Policies* - the Azure CNI sets up a bridge in the VM host for intra-node networking. The filtering rules are applied when the packets pass through the bridge.
52
52
**Calico Network Policies* - the Azure CNI sets up local kernel routes for the intra-node traffic. The policies are applied on the pod’s network interface.
@@ -56,7 +56,7 @@ Network policy only works with the Azure CNI (advanced) option. Implementation i
| Compliance with Kubernetes specification | All policy types supported | All policy types supported |
61
61
| Additional features | None | Extended policy model consisting of Global Network Policy, Global Network Set, and Host Endpoint. For more information on using the `calicoctl` CLI to manage these extended features, see [calicoctl user reference][calicoctl]. |
62
62
| Support | Supported by Azure support and Engineering team | Calico community support. For more information on additional paid support, see [Project Calico support options][calico-support]. |
@@ -72,15 +72,15 @@ To see network policies in action, let's create and then expand on a policy that
72
72
73
73
First, let's create an AKS cluster that supports network policy. The network policy feature can only be enabled when the cluster is created. You can't enable network policy on an existing AKS cluster.
74
74
75
-
To use network policy with an AKS cluster, you must use the [Azure CNI plug-in][azure-cni] and define your own virtual network and subnets. For more detailed information on how to plan out the required subnet ranges, see [configure advanced networking][use-advanced-networking].
75
+
To use Azure Network Policy, you must use the [Azure CNI plug-in][azure-cni] and define your own virtual network and subnets. For more detailed information on how to plan out the required subnet ranges, see [configure advanced networking][use-advanced-networking]. Calico Network Policy could be used with either this same Azure CNI plug-in or with the Kubenet CNI plug-in.
76
76
77
77
The following example script:
78
78
79
79
* Creates a virtual network and subnet.
80
80
* Creates an Azure Active Directory (Azure AD) service principal for use with the AKS cluster.
81
81
* Assigns *Contributor* permissions for the AKS cluster service principal on the virtual network.
82
82
* Creates an AKS cluster in the defined virtual network and enables network policy.
83
-
* The *azure* network policy option is used. To use Calico as the network policy option instead, use the `--network-policy calico` parameter.
83
+
* The *azure* network policy option is used. To use Calico as the network policy option instead, use the `--network-policy calico` parameter. Note: Calico could be used with either `--network-plugin azure` or `--network-plugin kubenet`.
84
84
85
85
Provide your own secure *SP_PASSWORD*. You can replace the *RESOURCE_GROUP_NAME* and *CLUSTER_NAME* variables:
86
86
@@ -464,9 +464,9 @@ To learn more about policies, see [Kubernetes network policies][kubernetes-netwo
0 commit comments