File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
content/en/docs/reference/access-authn-authz Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ The certificate value is in Base64-encoded format under `status.certificate`.
268
268
269
269
Export the issued certificate from the CertificateSigningRequest.
270
270
271
- ```
271
+ ``` shell
272
272
kubectl get csr myuser -o jsonpath=' {.status.certificate}' | base64 -d > myuser.crt
273
273
```
274
274
@@ -295,20 +295,20 @@ The last step is to add this user into the kubeconfig file.
295
295
296
296
First, you need to add new credentials:
297
297
298
- ```
298
+ ``` shell
299
299
kubectl config set-credentials myuser --client-key=myuser.key --client-certificate=myuser.crt --embed-certs=true
300
300
301
301
```
302
302
303
303
Then, you need to add the context:
304
304
305
- ```
305
+ ``` shell
306
306
kubectl config set-context myuser --cluster=kubernetes --user=myuser
307
307
```
308
308
309
309
To test it, change the context to ` myuser ` :
310
310
311
- ```
311
+ ``` shell
312
312
kubectl config use-context myuser
313
313
```
314
314
You can’t perform that action at this time.
0 commit comments