mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #126173 from bergerhoffer/cli-help
A few minor help text tweaks
This commit is contained in:
commit
45cb3a1bd0
@ -83,9 +83,8 @@ var (
|
|||||||
# Check to see if I can list deployments in my current namespace
|
# Check to see if I can list deployments in my current namespace
|
||||||
kubectl auth can-i list deployments.apps
|
kubectl auth can-i list deployments.apps
|
||||||
|
|
||||||
# Check to see if service account "foo" of namespace "dev" can list pods
|
# Check to see if service account "foo" of namespace "dev" can list pods in the namespace "prod"
|
||||||
# in the namespace "prod".
|
# You must be allowed to use impersonation for the global option "--as"
|
||||||
# You must be allowed to use impersonation for the global option "--as".
|
|
||||||
kubectl auth can-i list pods --as=system:serviceaccount:dev:foo -n prod
|
kubectl auth can-i list pods --as=system:serviceaccount:dev:foo -n prod
|
||||||
|
|
||||||
# Check to see if I can do everything in my current namespace ("*" means all)
|
# Check to see if I can do everything in my current namespace ("*" means all)
|
||||||
|
@ -122,16 +122,16 @@ var (
|
|||||||
whoAmILong = templates.LongDesc(`
|
whoAmILong = templates.LongDesc(`
|
||||||
Experimental: Check who you are and your attributes (groups, extra).
|
Experimental: Check who you are and your attributes (groups, extra).
|
||||||
|
|
||||||
This command is helpful to get yourself aware of the current user attributes,
|
This command is helpful to get yourself aware of the current user attributes,
|
||||||
especially when dynamic authentication, e.g., token webhook, auth proxy, or OIDC provider,
|
especially when dynamic authentication, e.g., token webhook, auth proxy, or OIDC provider,
|
||||||
is enabled in the Kubernetes cluster.
|
is enabled in the Kubernetes cluster.
|
||||||
`)
|
`)
|
||||||
|
|
||||||
whoAmIExample = templates.Examples(`
|
whoAmIExample = templates.Examples(`
|
||||||
# Get your subject attributes.
|
# Get your subject attributes
|
||||||
kubectl auth whoami
|
kubectl auth whoami
|
||||||
|
|
||||||
# Get your subject attributes in JSON format.
|
# Get your subject attributes in JSON format
|
||||||
kubectl auth whoami -o json
|
kubectl auth whoami -o json
|
||||||
`)
|
`)
|
||||||
)
|
)
|
||||||
|
@ -44,7 +44,7 @@ var (
|
|||||||
# Create a role binding for user1, user2, and group1 using the admin cluster role
|
# Create a role binding for user1, user2, and group1 using the admin cluster role
|
||||||
kubectl create rolebinding admin --clusterrole=admin --user=user1 --user=user2 --group=group1
|
kubectl create rolebinding admin --clusterrole=admin --user=user1 --user=user2 --group=group1
|
||||||
|
|
||||||
# Create a role binding for serviceaccount monitoring:sa-dev using the admin role
|
# Create a role binding for service account monitoring:sa-dev using the admin role
|
||||||
kubectl create rolebinding admin-binding --role=admin --serviceaccount=monitoring:sa-dev`))
|
kubectl create rolebinding admin-binding --role=admin --serviceaccount=monitoring:sa-dev`))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ var (
|
|||||||
Resource rollout will be restarted.`))
|
Resource rollout will be restarted.`))
|
||||||
|
|
||||||
restartExample = templates.Examples(`
|
restartExample = templates.Examples(`
|
||||||
# Restart all deployments in test-namespace namespace
|
# Restart all deployments in the test-namespace namespace
|
||||||
kubectl rollout restart deployment -n test-namespace
|
kubectl rollout restart deployment -n test-namespace
|
||||||
|
|
||||||
# Restart a deployment
|
# Restart a deployment
|
||||||
|
@ -70,7 +70,7 @@ var (
|
|||||||
# Wait for pod "busybox1" to be Ready
|
# Wait for pod "busybox1" to be Ready
|
||||||
kubectl wait --for='jsonpath={.status.conditions[?(@.type=="Ready")].status}=True' pod/busybox1
|
kubectl wait --for='jsonpath={.status.conditions[?(@.type=="Ready")].status}=True' pod/busybox1
|
||||||
|
|
||||||
# Wait for the service "loadbalancer" to have ingress.
|
# Wait for the service "loadbalancer" to have ingress
|
||||||
kubectl wait --for=jsonpath='{.status.loadBalancer.ingress}' service/loadbalancer
|
kubectl wait --for=jsonpath='{.status.loadBalancer.ingress}' service/loadbalancer
|
||||||
|
|
||||||
# Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command
|
# Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command
|
||||||
|
Loading…
Reference in New Issue
Block a user