Skip to content

Commit 8a479c0

Browse files
committed
Add Code blocks in configure-service-account.md
* Add Code blocks in the Markdown spec to make it easy to read. * Uniform case and adjustment description for smoother writing. Signed-off-by: ydFu <[email protected]>
1 parent 34b84f9 commit 8a479c0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ You can list this and any other serviceAccount resources in the namespace with t
8282
```shell
8383
kubectl get serviceaccounts
8484
```
85+
8586
The output is similar to this:
8687

8788
```
@@ -108,9 +109,10 @@ If you get a complete dump of the service account object, like this:
108109
```shell
109110
kubectl get serviceaccounts/build-robot -o yaml
110111
```
112+
111113
The output is similar to this:
112114

113-
```
115+
```yaml
114116
apiVersion: v1
115117
kind: ServiceAccount
116118
metadata:
@@ -164,6 +166,7 @@ Any tokens for non-existent service accounts will be cleaned up by the token con
164166
```shell
165167
kubectl describe secrets/build-robot-secret
166168
```
169+
167170
The output is similar to this:
168171

169172
```
@@ -227,7 +230,7 @@ kubectl get serviceaccounts default -o yaml > ./sa.yaml
227230

228231
The output of the `sa.yaml` file is similar to this:
229232

230-
```shell
233+
```yaml
231234
apiVersion: v1
232235
kind: ServiceAccount
233236
metadata:
@@ -244,7 +247,7 @@ Using your editor of choice (for example `vi`), open the `sa.yaml` file, delete
244247

245248
The output of the `sa.yaml` file is similar to this:
246249

247-
```shell
250+
```yaml
248251
apiVersion: v1
249252
kind: ServiceAccount
250253
metadata:
@@ -319,7 +322,8 @@ kubectl create -f https://k8s.io/examples/pods/pod-projected-svc-token.yaml
319322
```
320323

321324
The kubelet will request and store the token on behalf of the pod, make the
322-
token available to the pod at a configurable file path, and refresh the token as it approaches expiration. Kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours.
325+
token available to the pod at a configurable file path, and refresh the token as it approaches expiration.
326+
The kubelet proactively rotates the token if it is older than 80% of its total TTL, or if the token is older than 24 hours.
323327

324328
The application is responsible for reloading the token when it rotates. Periodic reloading (e.g. once every 5 minutes) is sufficient for most use cases.
325329

@@ -380,7 +384,6 @@ JWKS URI is required to use the `https` scheme.
380384

381385
## {{% heading "whatsnext" %}}
382386

383-
384387
See also:
385388

386389
- [Cluster Admin Guide to Service Accounts](/docs/reference/access-authn-authz/service-accounts-admin/)

0 commit comments

Comments
 (0)