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/private-clusters.md
+51-44Lines changed: 51 additions & 44 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: Private Azure Kubernetes Service cluster
2
+
title: Create a private Azure Kubernetes Service cluster
3
3
description: Learn how to create a private Azure Kubernetes Service (AKS) cluster
4
4
services: container-service
5
5
author: mlearned
@@ -10,23 +10,23 @@ ms.date: 12/10/2019
10
10
ms.author: mlearned
11
11
---
12
12
13
-
# Public Preview - Private Azure Kubernetes Service cluster
13
+
# Create a private Azure Kubernetes Service cluster (preview)
14
14
15
-
In a private cluster, the Control Plane/API server will have internal IP addresses defined in [RFC1918](https://tools.ietf.org/html/rfc1918). By using a private cluster, you can ensure network traffic between your API server and your node pools remains on the private network only.
15
+
In a private cluster, the control plane or API server has internal IP addresses that are defined in the [RFC1918 - Address Allocation for Private Internets](https://tools.ietf.org/html/rfc1918) document. By using a private cluster, you can ensure that network traffic between your API server and your node pools remains on the private network only.
16
16
17
-
The communication between the control plane/API server, which is in an AKS-managed Azure subscription, and the customers cluster/node pool, which is in a customer subscription, can communicate with each other through the [private link service][private-link-service] in the API server VNET and a private endpoint exposed in the subnet of the customer AKS cluster.
17
+
The control plane or API serveris in an Azure Kubernetes Service (AKS)-managed Azure subscription. A customer's cluster or node poolis in the customer's subscription. The server and the cluster or node pool can communicate with each other through the [Azure Private Link service][private-link-service] in the API server virtual network and a private endpoint that's exposed in the subnet of the customer's AKS cluster.
18
18
19
19
> [!IMPORTANT]
20
-
> AKS preview features are self-service opt-in. Previews are provided "as-is" and "as available" and are excluded from the servicelevel agreements and limited warranty. AKS Previews are partially covered by customer support on best effort basis. As such, these features are not meant for production use. For additional infromation, please see the following support articles:
20
+
> AKS preview features are self-service and are offered on an opt-in basis. Previews are provided *as is* and *as available* and are excluded from the service-level agreement (SLA) and limited warranty. AKS previews are partially covered by customer support on a *best effort* basis. Therefore, the features aren't meant for production use. For more information, see the following support articles:
21
21
>
22
22
> *[AKS Support Policies](support-policies.md)
23
23
> *[Azure Support FAQ](faq.md)
24
24
25
-
## Before you begin
25
+
## Prerequisites
26
26
27
-
*You need the Azure CLI version 2.0.77 or later and the aks-preview 0.4.18 extension
27
+
*The Azure CLI version 2.0.77 or later, and the Azure CLI AKS Preview extension version 0.4.18
28
28
29
-
## Current supported regions
29
+
## Currently supported regions
30
30
* West US
31
31
* West US 2
32
32
* East US 2
@@ -35,9 +35,9 @@ The communication between the control plane/API server, which is in an AKS-manag
35
35
* West Europe
36
36
* Australia East
37
37
38
-
## Install latest AKS CLI preview extension
38
+
## Install the latest Azure CLI AKS Preview extension
39
39
40
-
To use private clusters, you need the *aks-preview* CLI extension version 0.4.18 or higher. Install the *aks-preview*Azure CLI extension using the [az extension add][az-extension-add] command, then check for any available updates using the [az extension update][az-extension-update] command::
40
+
To use private clusters, you need the Azure CLI AKS Preview extension version 0.4.18 or later. Install the Azure CLI AKS Preview extension by using the [az extension add][az-extension-add] command, and then check for any available updates by using the following [az extension update][az-extension-update] command:
41
41
42
42
```azurecli-interactive
43
43
# Install the aks-preview extension
@@ -47,34 +47,34 @@ az extension add --name aks-preview
47
47
az extension update --name aks-preview
48
48
```
49
49
> [!CAUTION]
50
-
> When you register a feature on a subscription, you can't currently un-register that feature. After you enable some preview features, defaults may be used for all AKS clusters then created in the subscription. Don't enable preview features on production subscriptions. Use a separate subscription to test preview features and gather feedback.
50
+
> When you register a feature on a subscription, you can't currently un-register that feature. After you enable some preview features, you can use default settings for all AKS clusters that were created in the subscription. Don't enable preview features on production subscriptions. Use a separate subscription to test preview features and gather feedback.
51
51
52
52
```azurecli-interactive
53
53
az feature register --name AKSPrivateLinkPreview --namespace Microsoft.ContainerService
54
54
```
55
55
56
-
It may take several minutes for the status to show *Registered*. You can check on the registration status by using the [az feature list][az-feature-list] command:
56
+
It might take several minutes for the registration status to show as *Registered*. You can check on the status by using the following[az feature list][az-feature-list] command:
57
57
58
58
```azurecli-interactive
59
59
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/AKSPrivateLinkPreview')].{Name:name,State:properties.state}"
60
60
```
61
61
62
-
When the state is registered, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
62
+
When the state is registered, refresh the registration of the *Microsoft.ContainerService* resource provider by using the following [az provider register][az-provider-register] command:
63
63
64
64
```azurecli-interactive
65
65
az provider register --namespace Microsoft.ContainerService
66
66
az provider register --namespace Microsoft.Network
67
67
```
68
68
## Create a private AKS cluster
69
69
70
-
####Default Basic Networking
70
+
### Default basic networking
71
71
72
72
```azurecli-interactive
73
73
az aks create -n <private-cluster-name> -g <private-cluster-resource-group> --load-balancer-sku standard --enable-private-cluster
74
74
```
75
-
Where --enable-private-cluster is a mandatory flag for a private cluster
75
+
Where *--enable-private-cluster* is a mandatory flag for a private cluster.
76
76
77
-
####Advanced Networking
77
+
### Advanced networking
78
78
79
79
```azurecli-interactive
80
80
az aks create \
@@ -88,46 +88,53 @@ az aks create \
88
88
--dns-service-ip 10.2.0.10 \
89
89
--service-cidr 10.2.0.0/24
90
90
```
91
-
Where --enable-private-cluster is a mandatory flag for a private cluster
91
+
Where *--enable-private-cluster* is a mandatory flag for a private cluster.
92
92
93
93
> [!NOTE]
94
-
> If docker bridge address CIDR(172.17.0.1/16) clashes with the subnet CIDR, change the docker bridge address appropriately.
94
+
> If the Docker bridge address CIDR(172.17.0.1/16) clashes with the subnet CIDR, change the Docker bridge address appropriately.
95
95
96
-
## Steps to connect to the private cluster
97
-
The API server end point has no public IP address. Consequently, users will need to create an Azure virtual machine in a virtual network and connect to the API server. The steps in
96
+
## Connect to the private cluster
97
+
The API server endpoint has no public IP address. Consequently, you must create an Azure virtual machine (VM) in a virtual network and connect to the API server. To do so, do the following:
98
98
99
-
* Get credentials to connect to the cluster
99
+
1. Get credentials to connect to the cluster.
100
100
101
101
```azurecli-interactive
102
102
az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup
103
103
```
104
-
* Create a VM in the same VNET as the AKS cluster or create a VM in a different VNET and peer this VNET with the AKS cluster VNET
105
-
* If you create a VM in a different VNET, you'll need to set up a link between this VNET and the Private DNS Zone
106
-
* go to the MC_* resource group in the portal
107
-
* click on the Private DNS Zone
108
-
* select Virtual network link in the left pane
109
-
* create a new link to add the VNET of the VM to the Private DNS Zone *(It takes a few minutes for the DNS zone link to become available)*
110
-
* go back to the MC_* resource group in the portal
111
-
* select the virtual network on the right pane. Virtual network name will be in the form aks-vnet-*.
112
-
* select Peerings on the left pane
113
-
* click on Add and add the Virtual network of the VM and create the peering.
114
-
* Go to the Vnet where you have the VM and then click on peerings and select the AKS Virtual network and create the peering. If the address ranges on the AKS Virtual network and the VM's virtual network clashes, Then peering will fail. Refer to this [document][virtual-network-peering] for more information about virtual network peering.
115
-
* SSH into the VM
116
-
* Install Kubectl tool and run kubectl commands
104
+
105
+
1. Do either of the following:
106
+
* Create a VM in the same virtual network as the AKS cluster.
107
+
* Create a VM in a different virtual network, and peer this virtual network with the AKS cluster virtual network.
108
+
109
+
If you create a VM in a different virtual network, set up a link between this virtual network and the private DNS zone. To do so:
110
+
111
+
a. Go to the MC_* resource group in the Azure portal.
112
+
b. Select the private DNS zone.
113
+
c. In the left pane, select the **Virtual network** link.
114
+
d. Create a new link to add the virtual network of the VM to the private DNS zone. It takes a few minutes for the DNS zone link to become available.
115
+
e. Go back to the MC_* resource group in the Azure portal.
116
+
f. In the right pane, select the virtual network. The virtual network name is in the form *aks-vnet-\**.
117
+
g. In the left pane, select **Peerings**.
118
+
h. Select **Add**, add the virtual network of the VM, and then create the peering.
119
+
i. Go to the virtual network where you have the VM, select **Peerings**, select the AKS virtual network, and then create the peering. If the address ranges on the AKS virtual network and the VM's virtual network clash, peering fails. For more information, see [Virtual network peering][virtual-network-peering].
120
+
121
+
1. Access the VM via Secure Shell (SSH).
122
+
1. Install the Kubectl tool, and run the Kubectl commands.
123
+
117
124
118
125
## Dependencies
119
-
* Standard LB Only - no support for basic load balancer
126
+
*The Private Link service is supported on Standard Azure Load Balancer only. Basic Azure Load Balancer isn't supported.
120
127
121
128
## Limitations
122
-
*The same [Azure Private Link service limitations][private-link-service] apply to private clusters, Azure Private Endpoints and Virtual Network service endpoints are not currently supported in the same VNET
123
-
* No support for virtual nodes in a private cluster to spin private ACI instances in a private Azure VNET
124
-
* No support for Azure DevOps integration out of the box with private clusters
125
-
*If customers need to enable ACR to work with private AKS, then the ACR's VNET will need to be peered with the agent cluster VNET
126
-
* No current support for Azure Dev Spaces
127
-
* No support to convert existing AKS clusters to private clusters
128
-
* Deleting or modifying the private endpoint in the customer subnet will cause the cluster to stop functioning
129
-
* Azure Monitor for containers Live Data isn't currently supported
130
-
* Bring your own DNS isn't currently supported
129
+
*[Azure Private Link service limitations][private-link-service] apply to private clusters, Azure private endpoints, and virtual network service endpoints, which aren't currently supported in the same virtual network.
130
+
* No support for virtual nodes in a private cluster to spin private Cisco Application Centric Infrastructure (ACI) instances in a private Azure virtual network.
131
+
* No support for Azure DevOps integration out of the box with private clusters.
132
+
*For customers that need to enable Azure Container Registry to work with private AKS, the Container Registry virtual network must be peered with the agent cluster virtual network.
133
+
* No current support for Azure Dev Spaces.
134
+
* No support for converting existing AKS clusters into private clusters.
135
+
* Deleting or modifying the private endpoint in the customer subnet will cause the cluster to stop functioning.
136
+
* Azure Monitor for containers Live Data isn't currently supported.
0 commit comments