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: scenarios/azure-docs/articles/confidential-computing/confidential-enclave-nodes-aks-get-started.md
+20-53Lines changed: 20 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,8 @@ Use the following instructions to create an AKS cluster with the Intel SGX add-o
45
45
46
46
Intel SGX AKS Addon "confcom" exposes the Intel SGX device drivers to your containers to avoid added changes to your pod YAML.
47
47
48
+
## Create Resource Group
49
+
48
50
First, create a resource group for the cluster by using the `az group create` command.
49
51
50
52
```bash
@@ -72,33 +74,32 @@ Results:
72
74
}
73
75
```
74
76
75
-
Now create an AKS cluster with the confidential computing add-on enabled.
77
+
## Create Cluster with Confidential Computing Add-on
78
+
Now create an AKS cluster with the confidential computing add-on enabled. This command deploys a new AKS cluster with a system node pool of non-confidential computing nodes. Confidential computing Intel SGX nodes are not recommended for system node pools.
76
79
77
80
```bash
78
81
export AKS_CLUSTER="myAKSCluster$RANDOM_SUFFIX"
79
82
az aks create -g $RESOURCE_GROUP --name $AKS_CLUSTER --generate-ssh-keys --enable-addons confcom
80
83
```
81
84
82
-
This command deploys a new AKS cluster with a system node pool of non-confidential computing nodes. Confidential computing Intel SGX nodes are not recommended for system node pools.
83
-
84
-
### Add a user node pool with confidential computing capabilities to the AKS cluster
85
+
## Add a user node pool with confidential computing capabilities to the AKS cluster
85
86
86
-
Run the following command to add a user node pool of `Standard_DC4s_v3` size with two nodes to the AKS cluster.
87
+
Run the following command to add a user node pool of `Standard_DC4s_v3` size with two nodes to the AKS cluster. After you run the command, a new node pool with DCsv3 should be visible with confidential computing add-on DaemonSets.
87
88
88
89
```bash
89
90
az aks nodepool add --cluster-name $AKS_CLUSTER --name confcompool1 --resource-group $RESOURCE_GROUP --node-vm-size Standard_DC4s_v3 --node-count 2
90
91
```
91
92
92
-
After you run the command, a new node pool with DCsv3 should be visible with confidential computing add-on DaemonSets.
93
-
94
-
### Verify the node pool and add-on
93
+
## Get Credentials
95
94
96
95
Get the credentials for your AKS cluster.
97
96
98
97
```bash
99
98
az aks get-credentials --resource-group $RESOURCE_GROUP --name $AKS_CLUSTER
100
99
```
101
100
101
+
## Verify the node pool and add-on
102
+
102
103
Use the `kubectl get pods` command to verify that the nodes are created properly and the SGX-related DaemonSets are running on DCsv3 node pools:
103
104
104
105
```bash
@@ -114,30 +115,16 @@ NAMESPACE NAME READY STATUS RESTARTS
If the output matches the preceding code, your AKS cluster is now ready to run confidential applications.
118
-
119
-
You can go to the Deploy Hello World from an isolated enclave application section in this quickstart to test an app in an enclave.
120
-
121
-
## Add a confidential computing node pool to an existing AKS cluster
122
-
123
-
This section assumes you're already running an AKS cluster that meets the prerequisite criteria listed earlier in this quickstart.
124
-
125
-
### Enable the confidential computing AKS add-on on the existing cluster
118
+
## Enable the confidential computing AKS add-on on the existing cluster
126
119
127
120
To enable the confidential computing add-on, use the `az aks enable-addons` command with the `confcom` add-on, specifying your existing AKS cluster name and resource group.
128
121
129
-
### Add a DCsv3 user node pool to the cluster
130
-
> [!NOTE]
131
-
> To use the confidential computing capability, your existing AKS cluster needs to have a minimum of one node pool that's based on a DCsv2/DCsv3 VM SKU. To learn more about DCsv2/DCsv3 VM SKUs for confidential computing, see the available SKUs and supported regions.
132
-
133
-
To create a node pool, add a new node pool to your existing AKS cluster with the name *confcompool1*. Ensure that this node pool has two nodes and uses the `Standard_DC4s_v3` VM size.
134
-
135
-
Verify that the new node pool with the name *confcompool1* has been created by listing the node pools in your AKS cluster.
122
+
```bash
123
+
az aks enable-addons --addons confcom --name $AKS_CLUSTER --resource-group $RESOURCE_GROUP
124
+
```
136
125
137
126
### Verify that DaemonSets are running on confidential node pools
138
127
139
-
Sign in to your existing AKS cluster to perform the following verification:
140
-
141
128
```bash
142
129
kubectl get nodes
143
130
```
@@ -151,28 +138,9 @@ NAME STATUS ROLES AGE VERSION
If the output matches the preceding code, your AKS cluster is now ready to run confidential applications.
170
-
171
141
## Deploy Hello World from an isolated enclave application
172
142
173
-
You're now ready to deploy a test application.
174
-
175
-
Create a file named `hello-world-enclave.yaml` and paste in the following YAML manifest. This deployment assumes that you've deployed the *confcom* add-on.
143
+
Deploy a file named `hello-world-enclave.yaml`. This deployment assumes that you've deployed the *confcom* add-on.
176
144
177
145
```bash
178
146
cat <<EOF > hello-world-enclave.yaml
@@ -205,11 +173,6 @@ spec:
205
173
path: /var/run/aesmd
206
174
backoffLimit: 0
207
175
EOF
208
-
```
209
-
210
-
Now use the `kubectl apply` command to create a sample job that will run in a secure enclave.
211
-
212
-
```bash
213
176
kubectl apply -f hello-world-enclave.yaml
214
177
```
215
178
@@ -221,6 +184,8 @@ Results:
221
184
job.batch/oe-helloworld created
222
185
```
223
186
187
+
## Check Jobs
188
+
224
189
You can confirm that the workload successfully created a Trusted Execution Environment (enclave) by running the following commands:
225
190
226
191
```bash
@@ -236,6 +201,8 @@ NAME COMPLETIONS DURATION AGE
236
201
oe-helloworld 1/1 1s 23s
237
202
```
238
203
204
+
## Check Pods
205
+
239
206
```bash
240
207
kubectl get pods -l app=oe-helloworld
241
208
```
@@ -249,6 +216,8 @@ NAME READY STATUS RESTARTS AGE
249
216
oe-helloworld-xxxxx 0/1 Completed 0 25s
250
217
```
251
218
219
+
## Wait for Pod to finish deploying.
220
+
252
221
```bash
253
222
while [[ $(kubectl get pods -l app=oe-helloworld -o 'jsonpath={..status.phase}')!="Succeeded" ]];do
254
223
sleep 2
@@ -266,8 +235,6 @@ Hello world from the enclave
266
235
Enclave called into host to print: Hello World!
267
236
```
268
237
269
-
If the output matches the preceding code, your application is running successfully in a confidential computing environment.
270
-
271
238
## Next steps
272
239
273
240
- Run Python, Node, or other applications through confidential containers using ISV/OSS SGX wrapper software. Review [confidential container samples in GitHub](https://github.com/Azure-Samples/confidential-container-samples).
0 commit comments