1
1
---
2
2
title : Verify Signed Container Images
3
-
4
- reviewers :
5
- - TBD
6
-
7
- content_type : task
3
+ content_type : task
8
4
min-kubernetes-server-version : v1.24
9
5
---
10
6
11
7
<!-- overview -->
12
8
13
9
{{< feature-state state="alpha" for_k8s_version="v1.24" >}}
14
- ## Pre-requisites
15
- - [ cosign] ( https://docs.sigstore.dev/cosign/installation/ )
10
+
11
+ ## {{% heading "prerequisites" %}}
12
+
13
+ These instructions are for Kubernetes {{< skew currentVersion >}}. If you want to check the
14
+ integrity of components for a different version of Kubernetes, check the documentation for
15
+ that Kubernetes release.
16
+
17
+ You will need to have the following tools installed:
18
+ - ` cosign ` ([ install guide] ( https://docs.sigstore.dev/cosign/installation/ ) )
19
+ - Go compiler ([ install guide] ( https://go.dev/doc/install )
20
+ - ` curl ` (often provided by your operating system)
16
21
17
22
## Verifying image signatures
18
- For a complete list of images that are signed please refer to [ releases ] ( /releases/download/ ) page .
23
+ For a complete list of images that are signed please refer to [ Releases ] ( /releases/download/ ) .
19
24
20
- Let's pick one image from this list and verify its signature using ` cosign verify ` command.
25
+ Let's pick one image from this list and verify its signature
26
+ using ` cosign verify ` command:
21
27
22
28
``` shell
23
29
COSIGN_EXPERIMENTAL=1 cosign verify k8s.gcr.io/kube-apiserver-amd64:v1.24.0
24
30
```
25
- ### All control plane images
26
31
27
- To verify all signed control plane images, please run this command
32
+ {{% alert title="Note" %}}
33
+ ` COSIGN_EXPERIMENTAL=1 ` is used to allow verification of images signed
34
+ in ` KEYLESS ` mode. To learn more about keyless signing, please refer to
35
+ [ Keyless Signatures] ( https://github.com/sigstore/cosign/blob/main/KEYLESS.md#keyless-signatures ) .
36
+ {{% /alert %}}
37
+
38
+ ### Verifying images for all control plane components
39
+
40
+ To verify all signed control plane images, please run this command:
28
41
29
42
``` shell
30
43
curl https://kubernetes.io/examples/admin/signed-images/auto-generated-list-of-all-signed-images.txt --output auto-generated-list-of-all-signed-images.txt
@@ -33,4 +46,14 @@ while IFS= read -r image
33
46
do
34
47
COSIGN_EXPERIMENTAL=1 cosign verify " $image "
35
48
done < " $input "
36
- ```
49
+ ```
50
+
51
+ ## Verifying Image Signatures with Admission Controller
52
+
53
+ For non-control plane images (e.g. kube-conformance), image signatures can also
54
+ be verified, at deploy time using
55
+ [ cosigned] ( https://docs.sigstore.dev/cosign/kubernetes/#cosigned-admission-controller )
56
+ admission controller. To get started on ` cosigned ` here are a few helpful resources:
57
+
58
+ * [ Installation] ( https://github.com/sigstore/helm-charts/tree/main/charts/cosigned )
59
+ * [ Configuration Options] ( https://github.com/sigstore/cosign/tree/main/config )
0 commit comments