File tree Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Expand file tree Collapse file tree 1 file changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,29 @@ What is Kubernetes?
4
4
## ViewingResource Information
5
5
#### Nodes
6
6
``` yaml
7
- $ kubectl get no
8
- $ kubectl get no -o wide
9
- $ kubectl describe no
10
- $ kubectl get no -o yaml
11
- $ kubectl get node --selector=[label_name]
12
- $ kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
13
- $ kubectl top node [ node_name]
7
+ > kubectl get no
8
+ > kubectl get no -o wide
9
+ > kubectl describe no
10
+ > kubectl get no -o yaml
11
+ > kubectl get node --selector=[label_name]
12
+ > kubectl get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}'
13
+ > kubectl top node [ node_name]
14
+ ```
15
+ #### Pods
16
+ ``` bash
17
+ > kubectl get po
18
+ > kubectl get po -o wide
19
+ > kubectl describe po
20
+ > kubectl get po --show -labels
21
+ > kubectl get po -l app=nginx
22
+ > kubectl get po -o yaml
23
+ > kubectl get pod [pod_name] -o yaml --export
24
+ > kubectl get pod [pod_name] -o yaml --export > nameoffile.yaml
25
+ > kubectl get pods --field-selector status.phase=Running
26
+ ```
27
+ #### Namespaces
28
+ ``` sh
29
+ > kubectl get ns
30
+ > kubectl get ns -o yaml
31
+ > kubectl describe ns
14
32
```
You can’t perform that action at this time.
0 commit comments