From 1b70e98626a0e601fad18e388dd13eab27fbe8b5 Mon Sep 17 00:00:00 2001 From: ydFu Date: Thu, 7 Jan 2021 09:30:47 +0800 Subject: [PATCH] Add the code blocks in authorization.md * Add the code blocks in the Markdown spec to make it easy to read. * Add description that distinguish between **command** and **output** make it easy to read. * Adjust description in Kubernetes components for smoother reading. Signed-off-by: ydFu --- .../reference/access-authn-authz/authorization.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content/en/docs/reference/access-authn-authz/authorization.md b/content/en/docs/reference/access-authn-authz/authorization.md index a084a7e54e..04963e10ee 100644 --- a/content/en/docs/reference/access-authn-authz/authorization.md +++ b/content/en/docs/reference/access-authn-authz/authorization.md @@ -104,6 +104,9 @@ a given action, and works regardless of the authorization mode used. ```bash kubectl auth can-i create deployments --namespace dev ``` + +The output is similar to this: + ``` yes ``` @@ -111,6 +114,9 @@ yes ```shell kubectl auth can-i create deployments --namespace prod ``` + +The output is similar to this: + ``` no ``` @@ -121,6 +127,9 @@ to determine what action other users can perform. ```bash kubectl auth can-i list secrets --namespace dev --as dave ``` + +The output is similar to this: + ``` no ``` @@ -150,7 +159,7 @@ EOF ``` The generated `SelfSubjectAccessReview` is: -``` +```yaml apiVersion: authorization.k8s.io/v1 kind: SelfSubjectAccessReview metadata: