sandervanvugt

microservices dec21

Dec 16th, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.97 KB | None | 0 0
  1. 1 minikube start --vm-driver=docker
  2. 2 kubectl get all
  3. 3 minikube status
  4. 4 history
  5. 5 kubectl create deploy mynginx --image=nginx --replicas=3
  6. 6 kubectl get all
  7. 7 kubectl completion -h
  8. 8 source <(kubectl completion bash)
  9. 9 kubectl get all
  10. 10 kubectl delete pod mynginx-5b686ccd46-hsgp9
  11. 11 kubectl get all
  12. 12 history
  13. 13 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o yaml > mynginx.yaml
  14. 14 vim mynginx.yaml
  15. 15 kubectl explain deployment.spec
  16. 16 vim mynginx.yaml
  17. 17 history
  18. 18 kubectl apply -f mynginx.yaml
  19. 19 kubectl get all
  20. 20 kubectl create -f mynginx.yaml
  21. 21 kubectl create deploy mydb --image=mariadb
  22. 22 kubectl get all
  23. 23 kubectl get all --selector app=mydb
  24. 24 kubectl describe pod mydb-6875fcdfbd-k52z5
  25. 25 kubectl logs mydb-6875fcdfbd-k52z5
  26. 26 ls
  27. 27 history
  28. 28 ./countdown 12
  29. 29 ls
  30. 30 vim pv.yaml
  31. 31 kubectl explain persistentvolume.spec | less
  32. 32 kubectl create -f pv.yaml
  33. 33 kubectl get pv
  34. 34 vim pvc.yaml
  35. 35 kubectl create -f pvc.yaml
  36. 36 kubectl get pvc
  37. 37 kubectl get pv
  38. 38 kubectl get storageclass
  39. 39 vim pv-pod.yaml
  40. 40 kubectl create -f pv-pod.yaml
  41. 41 kubectl delete all --all
  42. 42 kubectl get all
  43. 43 kubectl create deploy --image=mariadb --replicas=3
  44. 44 kubectl create deploy mydb --image=mariadb --replicas=3
  45. 45 kubectl get pods
  46. 46 kubectl logs mydb-6875fcdfbd-g7slg
  47. 47 history
  48. 48 kubectl create cm mydbcm --from-literal=MARIADB_ROOT_PASSWORD=password
  49. 49 kubectl describe cm mydbcm
  50. 50 kubectl set env --from=configmap/mydbcm deploy/mydb
  51. 51 kubectl get all
  52. 52 kubectl get pods mydb-5cf5457d8c-8l265
  53. 53 kubectl get pods mydb-5cf5457d8c-8l265 -o yaml
  54. 54 lsss
  55. 55 ls
  56. 56 ca nginx-custom-config.conf
  57. 57 cat nginx-custom-config.conf
  58. 58 kubectl create cm nginx-cm --from-file nginx-custom-config.conf
  59. 59 kubectl get cm nginx-cm -o yaml
  60. 60 vim nginx-cm.yaml
  61. 61 kubectl create -f nginx-cm.yaml
  62. 62 kubectl exec -it nginx-cm -- cat /etc/nginx/conf.d/default.conf
  63. 63 history
  64. 64 ./countdown 12
  65. 65 kubectl create deploy nginxsvc --image=nginx --replicas=3
  66. 66 kubectl get all
  67. 67 #kubectl create deploy nginxsvc --image=nginx --replicas=3
  68. 68 kubectl get all --selector app=nginxsvc
  69. 69 kubectl expose deployment nginxsvc --port=80
  70. 70 kubectl describe svc
  71. 71 kubectl get endpoints
  72. 72 curl 10.101.143.35
  73. 73 kubectl get svc
  74. 74 minikube ssh
  75. 75 kubectl edit svc nginxsvc
  76. 76 kubectl get svc
  77. 77 minikube ip
  78. 78 curl 192.168.49.2:32000
  79. 79 vim kustomization.yaml
  80. 80 vim deployment.yaml
  81. 81 vim service.yaml
  82. 82 kubectl apply -k .
  83. 83 kubectl get all
  84. 84 history
  85. 85 cd lesson6lab/
  86. 86 ls
  87. 87 vim kustomization.yaml
  88. 88 vim wordpress-deployment.yaml
  89. 89 vim mysql-deployment.yaml
  90. 90 kubectl apply -k .
  91. 91 kubectl get secrets
  92. 92 kubectl get secret mysql-pass-bc6ggk5g2t -o yaml
  93. 93 echo cGFzc3dvcmQ= | base64 -d
  94. 94 kubectl get deploy
  95. 95 kubectl get pvc
  96. 96 kubectl get pods
  97. 97 kubectl get svc
  98. 98 minikube service wordpress --url
  99. 99 history
  100. 100 ../countdown 20
  101. 101 kubectl api-resources | less
  102. 102 kubectl api-resources | grep istio
  103. 103 cd
  104. 104 cd microservices/
  105. 105 cd ..
  106. 106 curl https://istio.io/downloadIstio | sh -
  107. 107 curl -L https://istio.io/downloadIstio | sh -
  108. 108 ls istio-1.12.1/
  109. 109 cd istio-1.12.1/
  110. 110 sudo cp bin/istioctl /usr/bin/
  111. 111 istioctl --set profile=demo -y
  112. 112 istioctl install --set profile=demo -y
  113. 113 kubectl get all -n istio-system
  114. 114 kubectl label namespace default istio-injection=enable
  115. 115 kubectl label namespace default istio-injection-
  116. 116 kubectl label namespace default istio-injection=enabled
  117. 117 kubectl run uglypod --image=nginx
  118. 118 kubectl get pods
  119. 119 kubectl get pods uglypod -o yaml | less
  120. 120 kubectl apply -f sample/bookinfo/platform/kube/bookinfo.yaml
  121. 121 ls
  122. 122 kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
  123. 123 kubectl api-resources | grep istio
  124. 124 kubectl get svc
  125. 125 kubectl get pods
  126. 126 kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productspage:9080/productpage
  127. 127 kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage
  128. 128 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>"
  129. 129 ../microservices/countdown 12
  130. 130 less samples/bookinfo/networking/bookinfo-gateway.yaml
  131. 131 kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
  132. 132 istioctl analyze
  133. 133 kubectl get deploy
  134. 134 kubectl delete deploy mydb
  135. 135 kubectl delete deploy nginxsvc
  136. 136 kubectl delete deploy test-nginx-friday20
  137. 137 kubectl delete deploy wordpress
  138. 138 kubectl delete deploy wordpress-mysql
  139. 139 istioctl analyze
  140. 140 cd ..
  141. 141 cd microservices/
  142. 142 vim setup_istio_vars.sh
  143. 143 source setup_istio_vars.sh
  144. 144 echo $GATEWAY_URL
  145. 145 cd ../istio-1.12.1/
  146. 146 ls samples/addons/
  147. 147 less samples/addons/kiali.yaml
  148. 148 kubectl apply -f samples/addons
  149. 149 kubectl rollout status deployment kiali -n istio-system
  150. 150 istioctl dashboard kiali
  151. 151 bg
  152. 152 for i in $(seq 1 100); do curl -s -o /dev/null "http://$GATEWAY_URL/productpage"; done
  153. 153 less samples/bookinfo/networking/destination-rule-all.yaml
  154. 154 kubectl apply -f samples/bookinfo/networking/destination-rule-all.yaml
  155. 155 less samples/bookinfo/networking/virtual-service-all-v1.yaml
  156. 156 kubectl apply -f samples/bookinfo/networking/virtual-service-all-v1.yaml
  157. 157 history
Add Comment
Please, Sign In to add comment