Skip to content

Commit 91e2239

Browse files
committed
another round of feedback
1 parent e52c782 commit 91e2239

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

articles/aks/image-cleaner.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ It's common to use pipelines to build and deploy images on Azure Kubernetes Serv
1818

1919
* An Azure subscription. If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free).
2020
* [Azure CLI][azure-cli-install] or [Azure PowerShell][azure-powershell-install] and the `aks-preview` CLI extension installed.
21-
* The `ImageCleanerPreview` feature flag registered on your subscription:
21+
* The `EnableImageCleanerPreview` feature flag registered on your subscription:
2222

2323
### [Azure CLI](#tab/azure-cli)
2424

25-
Register the `ImageCleanerPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
25+
Register the `EnableImageCleanerPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
2626

2727
```azurecli-interactive
28-
az feature register --namespace "Microsoft.ContainerService" --name "ImageCleanerPreview"
28+
az feature register --namespace "Microsoft.ContainerService" --name "EnableImageCleanerPreview"
2929
```
3030

3131
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature list][az-feature-list] command:
3232

3333
```azurecli-interactive
34-
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/ImageCleanerPreview')].{Name:name,State:properties.state}"
34+
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/EnableImageCleanerPreview')].{Name:name,State:properties.state}"
3535
```
3636

3737
When ready, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
@@ -42,16 +42,16 @@ az provider register --namespace Microsoft.ContainerService
4242

4343
### [Azure PowerShell](#tab/azure-powershell)
4444

45-
Register the `ImageCleanerPreview` feature flag by using the [Register-AzProviderPreviewFeature][register-azproviderpreviewfeature] cmdlet, as shown in the following example:
45+
Register the `EnableImageCleanerPreview` feature flag by using the [Register-AzProviderPreviewFeature][register-azproviderpreviewfeature] cmdlet, as shown in the following example:
4646

4747
```azurepowershell-interactive
48-
Register-AzProviderPreviewFeature -ProviderNamespace Microsoft.ContainerService -Name ImageCleanerPreview
48+
Register-AzProviderPreviewFeature -ProviderNamespace Microsoft.ContainerService -Name EnableImageCleanerPreview
4949
```
5050

5151
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [Get-AzProviderPreviewFeature][get-azproviderpreviewfeature] cmdlet:
5252

5353
```azurepowershell-interactive
54-
Get-AzProviderPreviewFeature -ProviderNamespace Microsoft.ContainerService -Name ImageCleanerPreview |
54+
Get-AzProviderPreviewFeature -ProviderNamespace Microsoft.ContainerService -Name EnableImageCleanerPreview |
5555
Format-Table -Property Name, @{name='State'; expression={$_.Properties.State}}
5656
```
5757

@@ -72,11 +72,9 @@ ImageCleaner does not support the following:
7272

7373
## How ImageCleaner works
7474

75-
When enabled, an `eraser-controller-manager` pod is deployed on each agent node, which will use an `ImageList` CRD to determine unreferenced and vulnerable images. An `ImageList` can either be defined manually or automatically generated by ImageCleaner.
75+
When enabled, an `eraser-controller-manager` pod is deployed on each agent node, which will use an `ImageList` CRD to determine unreferenced and vulnerable images. Vulnerability is determined based on a [trivy][trivy] scan, after which images with a `LOW`, `MEDIUM`, `HIGH`, or `CRITICAL` classification are flagged. An updated `ImageList` will be automatically generated by ImageCleaner based on a set time interval, and can also be supplied manually.
7676

77-
In manual mode, the `ImageList` is created based off of a provided list of image names. In automatic mode, a time interval is set. ImageCleaner will repeatedly run in this interval to generate an updated `ImageList`.
78-
79-
Once an `ImageList` is generated, ImageCleaner will continuously delete all the images in the list from node VMs.
77+
Once an `ImageList` is generated, ImageCleaner will remove all the images in the list from node VMs.
8078

8179
## Configuration options
8280

@@ -111,7 +109,21 @@ az aks update -g MyResourceGroup -n MyManagedCluster \
111109
--image-cleaner-interval-hours 48
112110
```
113111

114-
Based on your configuration, ImageCleaner will generate an `ImageList` containing unreferenced/vulnerable images at the desired interval. ImageCleaner will automatically remove these images from cluster nodes.
112+
Based on your configuration, ImageCleaner will generate an `ImageList` containing non-running and vulnerable images at the desired interval. ImageCleaner will automatically remove these images from cluster nodes.
113+
114+
## Manually remove images
115+
116+
To manually remove images from your cluster using ImageCleaner, first create an `ImageList`. For example:
117+
118+
```yml
119+
apiVersion: eraser.sh/v1alpha1
120+
kind: ImageList
121+
metadata:
122+
name: imagelist
123+
spec:
124+
images:
125+
- docker.io/library/alpine:3.7.3 # You can also use "*" to specify all non-running images
126+
```
115127
116128
## Disable ImageCleaner
117129
@@ -140,4 +152,5 @@ The deletion logs are stored in the `image-cleaner-kind-worker` pods. You can ch
140152
[az-provider-register]: /cli/azure/provider#az_provider_register
141153
[register-azresourceprovider]: /powershell/module/az.resources/register-azresourceprovider
142154

143-
[arm-vms]: https://azure.microsoft.com/blog/azure-virtual-machines-with-ampere-altra-arm-based-processors-generally-available/
155+
[arm-vms]: https://azure.microsoft.com/blog/azure-virtual-machines-with-ampere-altra-arm-based-processors-generally-available/
156+
[trivy]: https://github.com/aquasecurity/trivy

0 commit comments

Comments
 (0)