forked from cheat/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkubectl
More file actions
26 lines (18 loc) · 725 Bytes
/
kubectl
File metadata and controls
26 lines (18 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# To display list of all available commands:
kubectl -h
# To display an explanation of a specific command:
kubectl command_name -h
# To display complete list of supported resources:
kubectl api-resources
# To display an explanation of a specific resource:
kubectl explain resource_name
# To display an explanation of a specific field of resource:
kubectl explain resource_name.field_name
# To display list of global command-line options:
kubectl options
# To set up `kubectl` autocomplete in bash (press Tab to use):
source <(kubectl completion bash)
# To display all resources in all namespaces:
kubectl get all -A
# To order events by `creationTimestamp`:
kubectl get events --sort-by='.metadata.creationTimestamp'