Skip to content

Commit eb64cdf

Browse files
authored
AKS question addition
1 parent 8c5cef9 commit eb64cdf

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

articles/security/fundamentals/trusted-hardware-identity-management.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,89 @@ curl GET "http://169.254.169.254/metadata/THIM/amd/certification" -H "Metadata:
8686
| tcbm | Trusted Computing Base |
8787
| certificateChain | Includes the AMD SEV Key (ASK) and AMD Root Key (ARK) certificates |
8888
89+
### How do I request AMD collateral in an Azure Kuberenetes Service (AKS) Container on a Confidential Virtual Machine (CVM) node?
90+
91+
Follow the steps below for requesting AMD collateral in a confidential container.
92+
1. Start by creating an AKS cluster on CVM mode or adding a CVM node pool to the existing cluster
93+
1. Create an AKS Cluster on CVM node.
94+
1. Create a resource group in one of the CVM supported regions
95+
```bash
96+
az group create --resource-group <RG_NAME> --location <LOCATION>
97+
```
98+
2. Create an AKS cluster with one CVM node in the resource group.
99+
```bash
100+
az aks create --name <CLUSTER_NAME> \
101+
--resource-group <RG_NAME> \
102+
-l <LOCATION> \
103+
--node-vm-size Standard_DC4as_v5 \
104+
--nodepool-name <POOL_NAME> \
105+
--node-count 1
106+
```
107+
3. Configure kubectl to connect to the cluster.
108+
```bash
109+
az aks get-credentials --resource-group <RG_NAME> --name <CLUSTER_NAME>
110+
```
111+
2. Add a CVM node pool to the existing AKS cluster.
112+
```bash
113+
az aks nodepool add --cluster-name <CLUSTER_NAME> \
114+
--resource-group <RG_NAME> \
115+
--name <POOL_NAME > \
116+
--node-vm-size Standard_DC4as_v5 \
117+
--node-count 1
118+
```
119+
3. Verify the connection to your cluster using the kubectl get command. This command returns a list of the cluster nodes.
120+
```bash
121+
kubectl get nodes
122+
```
123+
The following output example shows the single node created in the previous steps. Make sure the node status is Ready:
124+
| NAME | STATUS | ROLES | AGE | VERSION |
125+
|--|--|--|--|--|
126+
| aks-nodepool1-31718369-0 | Ready | agent | 6m44s | v1.12.8 |
127+
128+
2. Once the AKS cluster is created, create a curl.yaml file with the following content. It defines a job that runs a curl container to fetch AMD collateral from the THIM endpoint. For more information about Kubernetes Jobs, please visit HERE.
129+
130+
curl.yaml
131+
```bash
132+
apiVersion: batch/v1
133+
kind: Job
134+
metadata:
135+
name: curl
136+
spec:
137+
template:
138+
metadata:
139+
labels:
140+
app: curl
141+
spec:
142+
nodeSelector:
143+
kubernetes.azure.com/security-type: ConfidentialVM
144+
containers:
145+
- name: curlcontainer
146+
image: alpine/curl:3.14
147+
imagePullPolicy: IfNotPresent
148+
args: ["-H", "Metadata:true", "http://169.254.169.254/metadata/THIM/amd/certification"]
149+
restartPolicy: "Never"
150+
```
151+
152+
Arguments
153+
| Name | Type | Description |
154+
|--|--|--|
155+
| Metadata | Boolean | Setting to True to allow for collateral to be returned |
156+
3. Run the job by applying the curl.yaml
157+
```bash
158+
kubectl apply -f curl.yaml
159+
```
160+
4. Check and wait for the pod to complete its job.
161+
```bash
162+
kubectl get pods
163+
```
164+
| Name | Ready | Status | Restarts | Age |
165+
|--|--|--|--|--|
166+
| Curl-w7nt8 | 0/1 | Completed | 0 | 72s |
167+
5. Run the following command to get the job logs and validate if it is working. A successful output should include vcekCert, tcbm and certificateChain.
168+
```bash
169+
kubectl logs job/curl
170+
```
171+
89172
## Next steps
90173
91174
- Learn more about [Azure Attestation documentation](../../attestation/overview.md)

0 commit comments

Comments
 (0)