Skip to content

Commit 3aed804

Browse files
authored
Update README.md
1 parent 68d891b commit 3aed804

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,29 @@ What is Kubernetes?
44
## ViewingResource Information
55
#### Nodes
66
```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
1432
```

0 commit comments

Comments
 (0)