-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathcommands
More file actions
51 lines (21 loc) · 1.05 KB
/
commands
File metadata and controls
51 lines (21 loc) · 1.05 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
###### commands ################################
------------------------- pods ---------------------------------------------------------------
kubect apply -f pod <.yaml>
kubectl get pods
kubectl get pods -o wide # to see the
kubectl delete pod <pod name>
kubectl describe pods <name of the pod> # to know more details about pod
--------------------- replicacontrol------------------------------------------------------
kubectl create -f <.yaml file>
kubectl get rc
kubectl replace -f <.yaml file> #if we want to change rplicas methode-1
kubectl scale --replicas=6 -f <.yaml> # if we want to change rplicas method-2
kubectl delete rc <.yaml>
-------------------------replicaset ----------------------------------------------------------
kubectl create -f <.yaml>
kubectl get rs
kubectl get pods
kubectl replace -f <.yaml> #if we want to change rplicas methode-1
kubectl scale --replicas=4 -f <.yaml> # if we want to change rplicas method-2
kubectl scale --replicas=5 replicaset <name of your replica set>
kubectl delete rs <.yaml>