Skip to content

Commit 0a010ce

Browse files
authored
Update README.md
1 parent 3aed804 commit 0a010ce

File tree

1 file changed

+66
-2
lines changed

1 file changed

+66
-2
lines changed

README.md

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
What is Kubernetes?
22
> Kubernetes is a platform for managing containerized workloads. Kubernetes orchestrates computing, networking and storage to provide a seamless portability across infrastructure providers
33
4+
## Cluster Info
5+
```yaml
6+
> kubectl config
7+
> kubectl cluster -info
8+
> kubectl get componentstatuses
9+
```
10+
411
## ViewingResource Information
12+
513
#### Nodes
6-
```yaml
14+
```bash
715
> kubectl get no
816
> kubectl get no -o wide
917
> kubectl describe no
@@ -24,9 +32,65 @@ What is Kubernetes?
2432
> kubectl get pod [pod_name] -o yaml --export > nameoffile.yaml
2533
> kubectl get pods --field-selector status.phase=Running
2634
```
35+
2736
#### Namespaces
28-
```sh
37+
```bash
2938
> kubectl get ns
3039
> kubectl get ns -o yaml
3140
> kubectl describe ns
3241
```
42+
43+
#### Services
44+
```bash
45+
> kubectl get svc
46+
> kubectl describe svc
47+
> kubectl get svc -o wide
48+
> kubectl get svc -o yaml
49+
> kubectl get svc --show-labels
50+
```
51+
52+
#### Deployments
53+
```bash
54+
> kubectl get deploy
55+
> kubectl describe deploy
56+
> kubectl get deploy -o wide
57+
> kubectl get deploy -o yaml
58+
```
59+
60+
#### ConfigMaps
61+
```bash
62+
> kubectl get cm
63+
> kubectl get cm -n=[namespace]
64+
> kubectl get cm -n=[namespace] -o yaml
65+
> kubectl get cm --all -namespaces
66+
> kubectl get cm --all -namespaces -o yaml
67+
```
68+
69+
#### Logs
70+
```bash
71+
> kubectl logs [pod_name]
72+
> kubectl logs [pod_name] -n=[namespace]
73+
> kubectl logs --since=1h [pod_name]
74+
> kubectl logs --tail=20 [pod_name]
75+
> kubectl logs -f -c [container_name][pod_name]
76+
> kubectl logs [pod_name] > pod.log
77+
```
78+
79+
#### Secrets
80+
```bash
81+
> kubectl get secrets
82+
> kubeclt get secrets -n=[namespace]
83+
> kubectl get secrets -n=[namespace] -o yaml
84+
> kubectl get secrets --all -namespaces
85+
> kubectl get secrets -o yaml
86+
```
87+
88+
#### ReplicaSets
89+
```bash
90+
> kubectl get rs
91+
> kubectl describe rs
92+
> kubectl get rs -o wide
93+
> kubectl get rs -o yaml
94+
```
95+
96+
####

0 commit comments

Comments
 (0)