Skip to content

Commit fba4f6c

Browse files
authored
Removed outdated information for SA and Added the Note for Manually created Secret API objects. (#43451)
* Removed outdated information for SA and Added the Note for Manually created Secret API objects. * Modified the Note. * Simplified the Note.
1 parent 226dc4a commit fba4f6c

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

content/en/docs/reference/access-authn-authz/service-accounts-admin.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -340,30 +340,6 @@ Then, delete the Secret you now know the name of:
340340
kubectl -n examplens delete secret/example-automated-thing-token-zyxwv
341341
```
342342

343-
The control plane spots that the ServiceAccount is missing its Secret,
344-
and creates a replacement:
345-
346-
```shell
347-
kubectl -n examplens get serviceaccount/example-automated-thing -o yaml
348-
```
349-
350-
```yaml
351-
apiVersion: v1
352-
kind: ServiceAccount
353-
metadata:
354-
annotations:
355-
kubectl.kubernetes.io/last-applied-configuration: |
356-
{"apiVersion":"v1","kind":"ServiceAccount","metadata":{"annotations":{},"name":"example-automated-thing","namespace":"examplens"}}
357-
creationTimestamp: "2019-07-21T07:07:07Z"
358-
name: example-automated-thing
359-
namespace: examplens
360-
resourceVersion: "1026"
361-
selfLink: /api/v1/namespaces/examplens/serviceaccounts/example-automated-thing
362-
uid: f23fd170-66f2-4697-b049-e1e266b7f835
363-
secrets:
364-
- name: example-automated-thing-token-4rdrh
365-
```
366-
367343
## Clean up
368344

369345
If you created a namespace `examplens` to experiment with, you can remove it:

content/en/docs/tasks/configure-pod-container/configure-service-account.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,16 @@ Secret somewhere that your terminal / computer screen could be seen by an onlook
262262
When you delete a ServiceAccount that has an associated Secret, the Kubernetes
263263
control plane automatically cleans up the long-lived token from that Secret.
264264

265+
{{< note >}}
266+
If you view the ServiceAccount using:
267+
268+
` kubectl get serviceaccount build-robot -o yaml`
269+
270+
You can't see the `build-robot-secret` Secret in the ServiceAccount API objects
271+
[`.secrets`](/docs/reference/kubernetes-api/authentication-resources/service-account-v1/) field
272+
because that field is only populated with auto-generated Secrets.
273+
{{< /note >}}
274+
265275
## Add ImagePullSecrets to a service account
266276

267277
First, [create an imagePullSecret](/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod).

0 commit comments

Comments
 (0)