File tree 1 file changed +84
-0
lines changed
1 file changed +84
-0
lines changed Original file line number Diff line number Diff line change 1
1
# kubernetes-commands-cheatsheet
2
+
3
+ ``` bash
4
+ kubectl get pods
5
+ ```
6
+
7
+ ``` bash
8
+ kubectl get pods -l app=< label-selector>
9
+ ```
10
+
11
+ ``` bash
12
+ kubectl get pods -o yaml
13
+ ```
14
+
15
+ ``` bash
16
+ kubectl get pods -o wide
17
+ ```
18
+
19
+ ``` bash
20
+ kubectl get services
21
+ ```
22
+
23
+ ``` bash
24
+ kubectl get deployments
25
+ ```
26
+
27
+ ``` bash
28
+ kubectl get nodes
29
+ ```
30
+
31
+ ``` bash
32
+ kubectl describe pods
33
+ ```
34
+
35
+ ``` bash
36
+ kubectl logs [pod_name]
37
+ ```
38
+
39
+ ``` bash
40
+ kubectl cluster-info
41
+ ```
42
+
43
+ ``` bash
44
+ kubectl get configMaps
45
+ ```
46
+
47
+ ``` bash
48
+ kubectl proxy
49
+ ```
50
+
51
+ ``` bash
52
+ kubectl describe pod [pod_name]
53
+ ```
54
+
55
+ ``` bash
56
+ kubectl describe services/[service_name]
57
+ ```
58
+
59
+ ``` bash
60
+ kubectl expose deployment/[deployment_name] --type=" NodePort" --port=8080
61
+ ```
62
+
63
+ ``` bash
64
+ kubectl delete service -l < label>
65
+ ```
66
+
67
+ ``` bash
68
+ kubectl label pod [pod_name] < label>
69
+ ```
70
+
71
+ ``` bash
72
+ kubectl rollout status deployments/[deployment_name]
73
+ ```
74
+
75
+ ``` bash
76
+ kubectl rollout undo deployments/[deployment_name]
77
+ ```
78
+
79
+ ``` bash
80
+ kubectl scale deployments/[deployment_name] --replicas=[number_of_replicas]
81
+ ```
82
+
83
+ ``` bash
84
+ kubectl run [deployment_name] --image=[image_and_tag] --port=8080
85
+ ```
You can’t perform that action at this time.
0 commit comments