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-security.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,34 +2,50 @@
2
2
title: Concepts - Security in Azure Kubernetes Services (AKS)
3
3
description: Learn about security in Azure Kubernetes Service (AKS), including master and node communication, network policies, and Kubernetes secrets.
4
4
services: container-service
5
-
author: georgewallace
5
+
author: miwithro
6
6
ms.topic: conceptual
7
-
ms.date: 03/11/2021
8
-
ms.author: gwallace
7
+
ms.date: 11/11/2021
8
+
ms.author: miwithro
9
9
---
10
10
11
11
# Security concepts for applications and clusters in Azure Kubernetes Service (AKS)
12
12
13
-
Cluster security protects your customer data as you run application workloads in Azure Kubernetes Service (AKS).
13
+
Container security protects the entire end-to-end pipeline from build to the application workloads running in Azure Kubernetes Service (AKS).
14
14
15
-
Kubernetes includes security components, such as *network policies* and *Secrets*. Meanwhile, Azure includes components like network security groups and orchestrated cluster upgrades. AKS combines these security components to:
15
+
The Secure Supply Chain includes the build environment and registry.
16
+
17
+
Kubernetes includes security components, such as *pod security standards* and *Secrets*. Meanwhile, Azure includes components like Active Directory, Microsoft Defender for Cloud, Azure Policy, Azure Key Vault, network security groups and orchestrated cluster upgrades. AKS combines these security components to:
18
+
* Provide a complete Authentication and Authorization story.
19
+
* Leverage AKS Built-in Azure Policy to secure your applications.
20
+
* End-to-End insight from build through your application with Microsoft Defender for Containers.
16
21
* Keep your AKS cluster running the latest OS security updates and Kubernetes releases.
17
22
* Provide secure pod traffic and access to sensitive credentials.
18
23
19
24
This article introduces the core concepts that secure your applications in AKS:
20
25
21
26
-[Security concepts for applications and clusters in Azure Kubernetes Service (AKS)](#security-concepts-for-applications-and-clusters-in-azure-kubernetes-service-aks)
As the entry point for the Supply Chain it is important to conduct static analysis of image builds before they are promoted down the pipeline. This includes vulnerability and compliance assessment. It is not about failing off a build because it has a high vulnerability, as that will break development, it is about looking at the "Vendor Status" to segment based on vulnerabilities that are actionable by the development teams. Also leverage "Grace Periods" to allow developers time to remediate identified issues.
43
+
44
+
## Registry Security
45
+
46
+
Assessing the vulnerability state of the image in the Registry will detect drift and will also catch images that didn't come from your build environment. Use [Notary V2](https://github.com/notaryproject/notaryproject) to attach signatures to your images to ensure deployments are coming from a trusted location.
47
+
48
+
## Cluster security
33
49
34
50
In AKS, the Kubernetes master components are part of the managed service provided, managed, and maintained by Microsoft. Each AKS cluster has its own single-tenanted, dedicated Kubernetes master to provide the API Server, Scheduler, etc.
35
51
@@ -112,6 +128,11 @@ If you provide your own subnet for your AKS cluster (whether using Azure CNI or
112
128
113
129
To limit network traffic between pods in your cluster, AKS offers support for [Kubernetes network policies][network-policy]. With network policies, you can allow or deny specific network paths within the cluster based on namespaces and label selectors.
114
130
131
+
## Application Security
132
+
133
+
To protect pods running on AKS leverage [Azure Defender for Kubernetes][azure-defender-for-kubernetes] to detect and restrict cyber attacks against your applications running in your pods. Run continual scanning to detect drift in the vulnerability state of your application and implement a "blue/green/canary" process to patch and replace the vulnerable images.
134
+
135
+
115
136
## Kubernetes Secrets
116
137
117
138
With a Kubernetes *Secret*, you inject sensitive data into pods, such as access credentials or keys.
@@ -150,6 +171,7 @@ For more information on core Kubernetes and AKS concepts, see:
> The Arc data services extension install can take a couple of minutes to finish.
108
+
> The Arc data services extension install can take a few minutes to complete.
102
109
103
110
### Verify the Arc data services extension is created
104
111
105
-
You can verify if the Azure Arc-enabled data services extension is created either from the portal or by connecting directly to the Azure Arc-enabled Kubernetes cluster.
112
+
You can verify the status of the deployment of Azure Arc-enabled data services extension either from the portal or by connecting directly to the Azure Arc-enabled Kubernetes cluster.
106
113
107
-
#### Azure portal
114
+
#### Check status from Azure portal
108
115
1. Log in to the Azure portal and browse to the resource group where the Kubernetes connected cluster resource is located.
109
116
1. Select the Azure Arc-enabled kubernetes cluster (Type = "Kubernetes - Azure Arc") where the extension was deployed.
110
117
1. In the navigation on the left side, under **Settings**, select **Extensions**.
111
118
1. You should see the extension that was created earlier in an installed state.
1. Connect to your Kubernetes cluster via a Terminal window.
118
125
1. Run the below command and ensure the (1) namespace mentioned above is created and (2) the `bootstrapper` pod is in 'running' state before proceeding to the next step.
119
126
120
127
```console
121
-
kubectl get pods -n <name of namespace used in the json template file above>
128
+
kubectl get pods --name <name of namespace used in the json template file above>
122
129
```
123
130
124
131
For example, the following example gets the pods from `arc` namespace.
125
132
126
133
```console
127
134
#Example:
128
-
kubectl get pods -n arc
135
+
kubectl get pods --name arc
129
136
```
130
137
131
138
## Retrieve the managed identity and grant roles
@@ -150,7 +157,7 @@ az role assignment create --assignee $Env:MSI_OBJECT_ID --role "Monitoring Metri
150
157
151
158
```
152
159
153
-
## Create a custom location using custom location CLI extension
160
+
## Step 2: Create a custom location using ```customlocation``` CLI extension
154
161
155
162
A custom location is an Azure resource that is equivalent to a namespace in a Kubernetes cluster. Custom locations are used as a target to deploy resources to or from Azure. Learn more about custom locations in the [Custom locations on top of Azure Arc-enabled Kubernetes documentation](../kubernetes/conceptual-custom-locations.md).
156
163
@@ -160,24 +167,22 @@ A custom location is an Azure resource that is equivalent to a namespace in a Ku
160
167
161
168
```bash
162
169
export clName=mycustomlocation
163
-
export clNamespace=arc
164
-
export hostClusterId=$(az connectedk8s show -g ${resourceGroup} -n ${resourceName} --query id -o tsv)
165
-
export extensionId=$(az k8s-extension show -g ${resourceGroup} -c ${resourceName} --cluster-type connectedClusters --name ${ADSExtensionName} --query id -o tsv)
166
170
167
-
az customlocation create -g ${resourceGroup} -n ${clName} --namespace ${clNamespace} \
@@ -188,31 +193,30 @@ From the terminal, run the below command to list the custom locations, and valid
188
193
az customlocation list -o table
189
194
```
190
195
191
-
## Create the Azure Arc data controller
196
+
## Step 3: Create the Azure Arc data controller
192
197
193
198
After the extension and custom location are created, proceed to deploy the Azure Arc data controller as follows.
194
199
195
200
```
196
-
az arcdata dc create --name <name> --resource-group <resourcegroup> --location <location> --connectivity-mode direct --profile-name <profile name> --auto-upload-logs true --custom-location <name of custom location>
201
+
az arcdata dc create --name <name> --resource-group <resourcegroup> --location <location> --connectivity-mode direct --profile-name <profile name> --auto-upload-logs true --auto-upload-metrics true --custom-location <name of custom location>
197
202
# Example
198
-
az arcdata dc create -n arc-dc1 --resource-group my-resource-group --location eastasia --connectivity-mode direct --profile-name azure-arc-aks-premium-storage --auto-upload-logs true --custom-location mycustomlocation
203
+
az arcdata dc create --name arc-dc1 --resource-group my-resource-group --location eastasia --connectivity-mode direct --profile-name azure-arc-aks-premium-storage --auto-upload-logs true --auto-upload-metrics true --custom-location mycustomlocation
199
204
```
200
205
201
206
If you want to create the Azure Arc data controller using a custom configuration template, follow the steps described in [Create custom configuration profile](create-custom-configuration-template.md) and provide the path to the file as follows:
202
207
203
208
```
204
-
az arcdata dc create --name <name> --resource-group <resourcegroup> --location <location> --connectivity-mode direct --path ./azure-arc-custom --auto-upload-logs true --custom-location <name of custom location>
209
+
az arcdata dc create --name <name> --resource-group <resourcegroup> --location <location> --connectivity-mode direct --path ./azure-arc-custom --auto-upload-logs true --auto-upload-metrics true --custom-location <name of custom location>
205
210
# Example
206
-
az arcdata dc create --name arc-dc1 --resource-group my-resource-group --location eastasia --connectivity-mode direct --path ./azure-arc-custom --auto-upload-logs true --custom-location mycustomlocation
211
+
az arcdata dc create --name arc-dc1 --resource-group my-resource-group --location eastasia --connectivity-mode direct --path ./azure-arc-custom --auto-upload-logs true --auto-upload-metrics true --custom-location mycustomlocation
207
212
```
208
213
214
+
## Monitor the status of Azure Arc data controller deployment
209
215
210
-
## Monitor the creation
211
-
212
-
When the Azure portal deployment status shows the deployment was successful, you can check the status of the Arc data controller deployment on the cluster as follows:
216
+
The deployment status of the Arc data controller on the cluster can be monitored as follows:
0 commit comments