-
Notifications
You must be signed in to change notification settings - Fork 249
/
Copy pathnov2024.txt
184 lines (184 loc) · 6.65 KB
/
nov2024.txt
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
1 sudo apt install ubuntu-desktop
2 sudo systemctl get-default
3 sudo systemctl disable pd-mapper.service
4 sudo systemctl disable systemd-networkd-wait-online
5 sudo apt update -y
6 ip a
7 ping nu.nl
8 sudo apt update
9 sudo apt upgrade
10 sudo dpkg --configure -a
11 sudo reboot
12 sudo -i
13 sudo poweroff
14 minikube start
15 kubectl get all
16 minikube stop
17 minikube delete
18 minikube --help | less
19 minikube start --help | less
20 #minikube start --memory=4G --cni=calico
21 free -m
22 minikube start --memory=3G --cni=calico
23 minikube dashboard
24 bg
25 kubectl get all
26 kubectl create deploy apptwo --image=nginx --replicas=3
27 kubectl get all
28 history
29 kubectl -h | less
30 kubectl create -h | less
31 kubectl create deployment -h | less
32 kubectl completion -h | less
33 source <(kubectl completion bash)
34 kubectl get all
35 kubectl get pods
36 kubectl get pods -o wide
37 kubectl api-resources | less
38 kubectl get pods -o wide
39 kubectl get pods
40 kubectl get pods apptwo-7788f9cd58-zcnjt -o yaml
41 kubectl explain pod
42 kubectl explain pod.spec | less
43 kubectl get events
44 kubectl get nodes
45 kubectl run -h | less
46 kubectl run hazelcast --image=hazelcast/hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"
47 history
48 kubect get all
49 kubectl get all
50 kubectl delete pod apptwo-7788f9cd58-zcnjt
51 kubectl get all
52 kubectl delete pod hazelcast
53 kubectl get all
54 kubectl scale deploy apptwo --replicas=10
55 kubectl get all
56 kubectl scale deploy apptwo --replicas=2
57 kubectl get all --show-labels
58 kubectl get all --selector app=apptwo
59 kubectl get pods
60 kubectl describe pod apptwo-7788f9cd58-pb8cz | less
61 kubectl get nodes
62 kubectl describe node minikube
63 kubectl describe node minikube | less
64 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o yaml
65 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o yaml > mynginx.yaml
66 kubectl create -f mynginx.yaml
67 vim mynginx.yaml
68 kubectl create -f mynginx.yaml
69 kubectl delete -f mynginx.yaml
70 kubectl apply -f mynginx.yaml
71 vim mynginx.yaml
72 kubectl apply -f mynginx.yaml
73 kubectl explain deploy.spec
74 vim mynginx.yaml
75 kubectl apply -f mynginx.yaml
76* kubectl explain -
77 kubectl explain --recursive deploy.spec
78 history
79 kubectl get ns
80 kubectl get pods
81 kubectl get pods -n kubernetes-dashboard
82 kubectl get all -n kubernetes-dashboard
83 kubectl get pods -A
84 kubectl create ns secret
85 kubectl run secretpod -n secret --image=nginx
86 kubectl get pods
87 kubectl get pods -n secret
88 history
89 kubectl create deploy mydb --image=mariadb --replicas=3
90 kubectl get all --selector app=mydb
91 kubectl describe pod mydb-7d665fb947-6hr89
92 kubectl logs mydb-7d665fb947-t5j26
93 kubectl get all --selector app=mydb
94 kubectl set env -h | less
95 kubectl set env deploy/mydb MARIADB_ROOT_PASSWORD=password
96 kubectl get all --selector app=mydb
97 kubectl exec -it mydb-dcbc9b8f7-vtssg -- sh
98 kubectl create deploy nginxsvc --image=nginx
99 kubectl get all --selector app=nginxsvc
100 kubectl scale deploy nginxsvc --replicas=3
101 kubectl get all --selector app=nginxsvc
102 kubectl expose deployment nginxsvc --port=80
103 kubectl get all --selector app=nginxsvc
104 kubectl describe svc nginxsvc
105 kubectl get endpoints
106 kubectl get pods -o wide --selector app=nginxsvc
107 curl 10.108.1.131
108 minikube -h | less
109 minikube ssh
110 kubectl edit svc nginxsvc
111 kubectl get svc
112 minikube ip
113 curl 192.169.49.2:31022
114 ping 192.168.49.2
115 curl 192.168.49.2:31022
116 curl $(minikube ip):31022
117 kubectl edit svc nginxsvc
118 curl $(minikube ip):31022
119 kubectl get svc
120 kubectl describe svc nginxsvc
121 kubectl edit svc nginxsvc
122 history
123 kubectl create deploy oldweb --image=nginx:1.17 --replicas=3
124 kubectl get all --selector app=oldweb
125 kubectl get pods oldweb-68c59c98b7-t4swh -o yaml | less
126 kubectl set image -h | less
127 #kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1
128 kubectl set image deployment/oldweb nginx=nginx:latest
129 kubectl get all --selector app=oldweb
130 history
131 kubectl explain pods.spec.volumes | less
132 ls
133 ls *vol*
134 cat basicvolume.yaml
135 vim morevolumes.yaml
136 kubectl apply -f morevolumes.yaml
137 kubectl get pods
138 kubectl exec -it morevol -c centos1 -- touch /centos1/fileone
139 kubectl exec -it morevol -c centos2 -- ls -l /centos2/
140 kubectl get pv,pvc,storageclass
141 vim pvc.yaml
142 kubectl apply -f pvc.yaml
143 kubectl get pv,pvc,storageclass
144 vim pv-pod.yaml
145 kubectl apply -f pv-pod.yaml
146 kubectl describe pvc pv-claim
147 cat pv-pod.yaml
148 kubectl exec -it pv-pod -- touch /usr/share/nginx/html/HELLOGINX
149 kubectl get pv,pvc,storageclass
150 kubectl describe pv pvc-971b2552-46b6-4715-8ab1-c9a279efd220
151 minikube ssh
152 ls
153 less resources.txt
154 kubectl create deploy mynewdb --image=mysql --replicas=3
155 kubectl get pods --selector app=mynewdb
156 kubectl create cm mynewdbvars --from-literal=MYSQL_ROOT_PASSWORD=password
157 kubectl describe cm mynewdbvars
158 kubectl set env --from=configmap/mynewdbvars deploy/mynewdb
159 kubectl get all --selector app=mynewdb
160 kubectl get pods mynewdb-55c95456f6-jnx6d -o yaml | less
161 minikube addons list
162 minikube addons enable ingress
163 kubectl get ns
164 kubectl get pods -n ingress-nginx
165 kubectl create ing -h | less
166 kubectl create ing nginxsvc --rule="myapp.info/=nginxsvc:80"
167 kubectl describe ing nginxsvc
168 sudo vim /etc/hosts
169 curl myapp.info
170 kubectl get pods -n kube-system
171 kubectl explain --recursive pod.spec | less
172 kubectl run testpod --image=nginx --dry-run=client -o yaml > testpod.yaml
173 vim testpod.yaml
174 kubectl apply -f testpod.yaml
175 kubectl explain --recursive pod.spec | less
176 vim testpod.yaml
177 kubectl get nodes
178 vim testpod.yaml
179 kubectl apply -f testpod.yaml
180 vim testpod.yaml
181 kubectl apply -f testpod.yaml
182 kubectl get pods
183 kubectl describe pod testpod
184 history > /tmp/nov2024.txt