sandervanvugt

microservices dec23

Dec 14th, 2023
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.57 KB | None | 0 0
  1. student@student-virtual-machine:~$ history
  2. 1 minikube start --vm-driver=docker --memory=6G --cni=calico
  3. 2 history
  4. 3 ls
  5. 4 vim docker-compose.yml
  6. 5 sudo apt install -y vim
  7. 6 vim docker-compose.yml
  8. 7 sudo apt install docker-compose
  9. 8 docker-compose --help | less
  10. 9 docker-compose up
  11. 10 exit
  12. 11 sudo apt install -y git
  13. 12 git clone https://github.com/sandervanvugt/microservices
  14. 13 cd microservices/
  15. 14 ls
  16. 15 ./minikube-docker-setup.sh
  17. 16 exit
  18. 17 source <(kubectl completion bash)
  19. 18 kubectl create deployment mynginx --image=nginx --replicas=3
  20. 19 kubectl get all
  21. 20 kubectl delete pod mynginx-6cdf457c5f-7zgds
  22. 21 kubectl get all
  23. 22 history
  24. 23 exit
  25. 24 cd microservices/
  26. 25 exit
  27. 26 cd microservices/
  28. 27 ./countdown 12
  29. 28 history
  30. 29 kubectl get all
  31. 30 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o yaml > mynginx.yaml
  32. 31 vim mynginx.yaml
  33. 32 kubectl explain deploy.spec | less
  34. 33 kubectl explain deploy.spec.template.spec | less
  35. 34 kubectl create deploy sleepybox --image=busybox --replicas=3 -- sleep infinity --dry-run=client -o yaml
  36. 35 kubectl get all
  37. 36 kubectl create deploy sleepybox --image=busybox --replicas=3 --dry-run=client -o yaml -- sleep infinity
  38. 37 cat mynginx.yaml
  39. 38 kubectl get all
  40. 39 kubectl delete deploy mynginx
  41. 40 kubectl delete deploy sleepybox
  42. 41 source <(kubectl completion bash)
  43. 42 kubectl create -f mynginx.yaml
  44. 43 kubectl delete -f mynginx.yaml
  45. 44 kubectl apply -f mynginx.yaml
  46. 45 kubectl create deployment mydb --image=mariadb
  47. 46 kubectl get all
  48. 47 kubectl describe pod mydb-7bbb588c85-n2vnw
  49. 48 kubectl logs mydb-7bbb588c85-n2vnw
  50. 49 kubectl set env -h | less
  51. 50 kubectl set env deploy/mydb MARIADB_ROOT_PASSWORD=password
  52. 51 kubectl get all
  53. 52 history
  54. 53 cd microservices/
  55. 54 ls
  56. 55 vim pvcpod.yaml
  57. 56 vim pvctest.yaml
  58. 57 kubectl apply -f pvctest.yaml
  59. 58 kubectl get pvc,pv
  60. 59 kubectl get pv
  61. 60 kubectl describe pv pvc-ac8ea587-d4f1-490d-bd5a-14e8dc775bf9
  62. 61 ls
  63. 62 vim pv-pvc-pod.yaml
  64. 63 kubectl apply -f pv-pvc-pod.yaml
  65. 64 kubectl get pvc,pv
  66. 65 kubectl get all
  67. 66 kubectl delete deploy mydb mynginx
  68. 67 kubectl create deployment mydb --image=mariadb --replicas=3
  69. 68 kubectl get pods
  70. 69 kubectl logs mydb-7bbb588c85-w8f4g
  71. 70 kubectl create cm mydbcm --from-literal=MARIADB_ROOT_PASSWORD=password
  72. 71 kubectl get cm mydbcm -o yaml
  73. 72 kubectl set env --from=configmap/mydbcm deploy/mydb
  74. 73 kubectl get all --selector app=mydb
  75. 74 kubectl get pod mydb-776bb8b8-grz9n -o yaml | less
  76. 75 kubectl create secret generic secretpw --from-literal MARIADB_ROOT_PASSWORD=password
  77. 76 kubectl get secrets secretpw -o yaml
  78. 77 echo cGFzc3dvcmQ= | base64 -d
  79. 78 history
  80. 79 cat nginx-custom-config.conf
  81. 80 kubectl create cm nginx-cm --from-file nginx-custom-config.conf
  82. 81 rm -f nginx-custom-config.conf
  83. 82 kubectl get cm nginx-cm -o yaml
  84. 83 cat nginx-cm.yaml
  85. 84 kubectl create -f nginx-cm.yaml
  86. 85 kubectl exec -it nginx-cm -- cat /etc/nginx/conf.d/default.conf
  87. 86 kubectl create deploy nginxsvc --image=nginx --replicas=3
  88. 87 kubectl expose deploy nginxsvc --port=80
  89. 88 kubectl describe svc nginxsvc
  90. 89 kubectl get svc
  91. 90 curl 10.96.25.84
  92. 91 kubectl edit svc nginxsvc
  93. 92 kubectl get svc
  94. 93 minikube ip
  95. 94 curl 192.168.49.2:30505
  96. 95 id
  97. 96 minikube addons list
  98. 97 minikube addons enable ingress
  99. 98 history
  100. 99 exit
  101. 100 minikube start
  102. 101 cd microservices/
  103. 102 ./countdown 13
  104. 103 grep docker /etc/group
  105. 104 minikube status
  106. 105 minikube start
  107. 106 newgrep docker
  108. 107 newgrp docker
  109. 108 id
  110. 109 sudo reboot
  111. 110 cd microservices/
  112. 111 ./countdown 16
  113. 112 ./countdown 12
  114. 113 id
  115. 114 minikube start
  116. 115 source <(kubectl completion bash)
  117. 116 minikube addons enable ingress
  118. 117 kubectl get ns
  119. 118 kubectl get all -n ingress-nginx
  120. 119 kubectl create ing -h | less
  121. 120 kubectl create ingress simple --rule="foo.com/=nginxsvc:80"
  122. 121 kubectl describe ing simple
  123. 122 sudo vim /etc/hosts
  124. 123 minikube ip
  125. 124 curl foo.com
  126. 125 history
  127. 126 ls
  128. 127 cd microservices/
  129. 128 ls
  130. 129 vinm deployment.yaml
  131. 130 vim deployment.yaml
  132. 131 vim service.yaml
  133. 132 ls kustomization.yaml
  134. 133 vim kustomization.yaml
  135. 134 kubectl apply -k .
  136. 135 kubectl get all --show-labels | grep friday
  137. 136 ls
  138. 137 cd lesson6lab/
  139. 138 ls
  140. 139 vim kustomization.yaml
  141. 140 kubectl apply -k .
  142. 141 history
  143. 142 cd ..
  144. 143 curl -L https://istio.io/downloadIstio | sh -
  145. 144 cd istio-1.20.1/
  146. 145 ls
  147. 146 sudo cp bin/istioctl /usr/local/bin/
  148. 147 istioctl install --set-profile=demo -y
  149. 148 istioctl install --set profile=demo -y
  150. 149 kubectl get all -n istio-system
  151. 150 kubectl get ns
  152. 151 kubectl label namespace default istio-injection=enabled
  153. 152 kubectl get ns --show-labels
  154. 153 kubectl get crds
  155. 154 kubectl get crds | grep istio
  156. 155 kubectl api-resources | grep istio
  157. 156 kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
  158. 157 kubectl get pods
  159. 158 kubectl describe pod details-v1-698d88b-98pvd | less
  160. 159 kubectl run testpod --image=nginx
  161. 160 kubectl get pods
  162. 161 kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>"
  163. 162 less samples/bookinfo/networking/bookinfo-gateway.yaml
  164. 163 kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
  165. 164 istioctl analyze
  166. 165 kubectl get deploy
  167. 166 kubectl delete deploy mydb nginxsvc test-nginx-friday20 wordpress wordpress-mysql
  168. 167 istioctl analyze
  169. 168 kubectl delete pod nginx-cm local-pv-pod
  170. 169 kubectl get gw -A
  171. 170 kubectl get all -n istio-system
  172. 171 history
  173. 172 lscpu
  174. 173 kubectl get all -n istio-system
  175. 174 cat ../setup_istio_vars.sh
  176. 175 kubectl get -n istio-system svc istio-ingressgateway
  177. 176 kubectl describe -n istio-system svc istio-ingressgateway
  178. 177 cat ../setup_istio_vars.sh
  179. 178 source ../setup_istio_vars.sh
  180. 179 echo $GATEWAY_URL
  181. 180 curl $GATEWAY_URL
  182. 181 kubectl edit -n istio-system svc istio-ingressgateway
  183. 182 kubectl get svc -n istio-system
  184. 183 kubectl describe svc -n istio-system istio-ingressgateway
  185. 184 kubectl get -n istio-system pods -o wide
  186. 185 kubectl describe -n istio-system pod istio-ingressgateway-654796fd4f-zf9kv
  187. 186 minikube addons disable ingress
  188. 187 kubectl get svc -n istio-system
  189. 188 kubectl -n istio-system get pods
  190. 189 kubectl -n istio-system describe pods istio-ingressgateway-654796fd4f-zf9kv
  191. 190 kubectl -n istio-system delete pods istio-ingressgateway-654796fd4f-zf9kv
  192. 191 kubectl -n istio-system get pods
  193. 192 kubectl -n istio-system describe pods istio-ingressgateway-654796fd4f-svvkz
  194. 193 kubectl -n istio-system get deploy
  195. 194 kubectl -n istio-system edit deploy istio-ingressgateway
  196. 195 kubectl -n istio-system get pods
  197. 196 kubectl -n istio-system describe pods istio-ingressgateway-67dd64c68-fscmz
  198. 197 minikube stop
  199. 198 sudo reboot
  200. 199 minikube start
  201. 200 source <(kubectl completion bash)
  202. 201 kubectl get svc -n istio-system
  203. 202 minikube ip
  204. 203 kubectl get pods -n istio-system
  205. 204 history
Add Comment
Please, Sign In to add comment