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
cacheType: "ServiceAccount"# Required field in beta
@@ -47,40 +48,33 @@ Choose between two caching strategies:
47
48
- **`ServiceAccount`**: Cache credentials per service account identity
48
49
(use when credentials are valid for all pods using the same service account)
49
50
50
-
### Full integration with Ensure Secret Pull Images
51
-
52
-
Beta brings **complete compatibility**
53
-
with the [Ensure Secret Pull Images](/docs/concepts/containers/images/#ensureimagepullcredentialverification) feature.
54
-
This integration ensures that:
55
-
56
-
- **Service account coordinates are tracked**:
57
-
The system tracks which ServiceAccount (namespace, name, UID) was used to pull each image
58
-
- **Proper authorization enforcement**:
59
-
Pods can only access images that were pulled using credentials
60
-
from ServiceAccounts they're authorized to use
61
-
- **Lifecycle management**:
62
-
Administrators can revoke access by deleting and recreating ServiceAccounts,
63
-
which invalidates cached credentials
64
-
65
-
The authorization model works as follows:
66
-
67
-
- **Different ServiceAccounts for the same image**:
68
-
Pods using different ServiceAccounts will trigger a fresh image pull from the registry
69
-
since they have different service account coordinates
70
-
- **Same ServiceAccount for the same image**:
71
-
Pods using the exact same ServiceAccount (matching namespace, name, and UID)
72
-
will be allowed to reuse the previously pulled image without triggering a new registry pull
73
-
- **ServiceAccount lifecycle management**:
74
-
If administrators want to revoke access to previously pulled images for a ServiceAccount,
75
-
they can delete and recreate the ServiceAccount.
76
-
This changes the UID, which invalidates any cached image credentials
77
-
associated with the old ServiceAccount coordinates
51
+
### Isolated image pull credentials
52
+
53
+
The beta release provides stronger security isolation for container images
54
+
when using service account tokens for image pulls.
55
+
It ensures that pods can only access images that were pulled using ServiceAccounts they're authorized to use.
56
+
This prevents unauthorized access to sensitive container images
57
+
and enables granular access control where different workloads can have different registry permissions
58
+
based on their ServiceAccount.
59
+
60
+
When credential providers use service account tokens,
61
+
the system tracks ServiceAccount identity (namespace, name, and [UID](/docs/concepts/overview/working-with-objects/names/#uids)) for each pulled image.
62
+
When a pod attempts to use a cached image,
63
+
the system verifies that the pod's ServiceAccount matches exactly with the ServiceAccount
64
+
that was used to originally pull the image.
65
+
66
+
Administrators can revoke access to previously pulled images
67
+
by deleting and recreating the ServiceAccount,
68
+
which changes the UID and invalidates cached image access.
69
+
70
+
For more details about this capability,
71
+
see the [image pull credential verification](/docs/concepts/containers/images/#ensureimagepullcredentialverification) documentation.
78
72
79
73
## How it works
80
74
81
75
### Configuration
82
76
83
-
Credential providers opt into using service account tokens
77
+
Credential providers opt into using ServiceAccount tokens
84
78
by configuring the `tokenAttributes` field:
85
79
86
80
```yaml
@@ -131,7 +125,7 @@ and the container runtime as follows:
131
125
- If they differ, `kubelet` performs a fresh pull
132
126
using credentials for the new ServiceAccount
133
127
134
-
- With Ensure Secret Pull Images enabled:
128
+
- With image pull credential verification enabled:
135
129
- Authorization is enforced using the recorded ServiceAccount coordinates,
136
130
ensuring pods only use images pulled by a ServiceAccount
137
131
they are authorized to use
@@ -140,9 +134,9 @@ and the container runtime as follows:
140
134
141
135
### Audience restriction
142
136
143
-
The beta release builds on the `ServiceAccountNodeAudienceRestriction` feature
137
+
The beta release builds on service account node audience restriction
144
138
(beta since v1.33) to ensure `kubelet` can only request tokens for authorized audiences.
145
-
Administrators configure allowed audiences using RBAC:
139
+
Administrators configure allowed audiences using RBAC to enable kubelet to request service account tokens for image pulls:
146
140
147
141
```yaml
148
142
#
@@ -180,12 +174,13 @@ the migration to beta requires minimal changes:
180
174
2. **Review caching strategy**:
181
175
Choose between `Token` and `ServiceAccount` cache types based on your provider's behavior
182
176
3. **Test audience restrictions**:
183
-
Ensure your RBAC configurationproperly restricts token audiences
177
+
Ensure your RBAC configuration, or other cluster authorization rules, will properly restrict token audiences
184
178
185
179
### Example setup
186
180
187
181
Here's a complete example
188
-
for setting up a credential provider with service account tokens:
182
+
for setting up a credential provider with service account tokens
183
+
(this example assumes your cluster uses RBAC authorization):
189
184
190
185
```yaml
191
186
#
@@ -235,12 +230,12 @@ spec:
235
230
serviceAccountName: registry-access-sa
236
231
containers:
237
232
- name: my-app
238
-
image: myregistry.io/my-app:latest
233
+
image: myregistry.example/my-app:latest
239
234
```
240
235
241
236
## What's next?
242
237
243
-
For Kubernetes v1.35, we expect the feature to stay in beta,
238
+
For Kubernetes v1.35, we - Kubernetes SIG Auth - expect the feature to stay in beta,
244
239
and we will continue to solicit feedback.
245
240
246
241
You can learn more about this feature
@@ -254,9 +249,9 @@ to track progress across the coming Kubernetes releases.
254
249
## Call to action
255
250
256
251
In this blog post,
257
-
we have covered the beta graduation of Service Account Token Integration
252
+
I have covered the beta graduation of ServiceAccount token integration
258
253
for Kubelet Credential Providers in Kubernetes v1.34.
259
-
We have discussed the key improvements,
254
+
I discussed the key improvements,
260
255
including the required `cacheType` field
261
256
and enhanced integration with Ensure Secret Pull Images.
0 commit comments