sandervanvugt

GS OpenShift feb 22

Feb 22nd, 2022
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 KB | None | 0 0
  1. 1000 crc delete; crc cleanup
  2. 1001 crc setup
  3. 1002 cd Downloads/
  4. 1003 crc start -p pull-secret -m 12288
  5. 1004 history | tail -15
  6. 1005 cd ..
  7. 1006 #tar xvf crc-linux-amd64.tar.xz
  8. 1007 cd crc-linux-1.39.0-amd64/
  9. 1008 ls
  10. 1009 ls -l
  11. 1010 cd
  12. 1011 crc setup
  13. 1012 #crc start -p pull-secret -m 12288
  14. 1013 ls
  15. 1014 cd Downloads/
  16. 1015 ls
  17. 1016 crc status
  18. 1017 crc console --credentials
  19. 1018 crc oc-env
  20. 1019 eval $(crc oc-env)
  21. 1020 oc login -u developer -p developer https://api.crc.testing:6443
  22. 1021 cd ..
  23. 1022 ls
  24. 1023 ex180/countdown 15
  25. 1024 oc whoami
  26. 1025 source <(oc completion bash)
  27. 1026 oc -h | less
  28. 1027 oc completion -h
  29. 1028 oc new-project demoone
  30. 1029 oc new-app --docker-image=mysql:latest --name=mysql-openshift -e MYSQL_USER=myuser -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=mydb -e MYSQL_ROOT_PASSWORD=password
  31. 1030 oc status
  32. 1031 oc get all
  33. 1032 oc get pods -o wide
  34. 1033 oc new-project trouble
  35. 1034 oc create deploy failure --image=quay.io/bitnami/nginx
  36. 1035 oc get all
  37. 1036 history
  38. 1037 ex180/countdown 12
  39. 1038 history
  40. 1039 oc get all
  41. 1040 oc delete deploy failure
  42. 1041 oc get all
  43. 1042 oc create deploy failure --image=quay.io/bitnami/mariadb
  44. 1043 oc completion -h | less
  45. 1044 oc get all
  46. 1045 oc describe pod failure-5549f56c96-t7zhb | less
  47. 1046 oc logs failure-5549f56c96-t7zhb
  48. 1047 oc set -h
  49. 1048 oc set env -h | less
  50. 1049 oc get all
  51. 1050 oc set env deploy/failure MARIADB_ROOT_PASSWORD=password; oc get all
  52. 1051 oc get all
  53. 1052 oc new-project zerodown
  54. 1053 oc create deploy newginx --image=quay.io/bitnami/nginx:1.14 --replicas=5
  55. 1054 oc get all
  56. 1055 oc set -h | less
  57. 1056 oc set image -h | less
  58. 1057 oc set image deploy/newginx=nginx:latest
  59. 1058 oc set image -h | less
  60. 1059 oc set image deployments newginx=nginx:latest
  61. 1060 oc set image -h | less
  62. 1061 oc set image deploy/newginx nginx=nginx:latest
  63. 1062 oc get all
  64. 1063 oc logs newginx-69cfbcc689-kkj69
  65. 1064 oc projects
  66. 1065 crc console --credentials
  67. 1066 oc login -u kubeadmin -p ddz5S-7U8uj-PPL7L-xciuP https://api.crc.testing:6443
  68. 1067 oc get projects
  69. 1068 oc login -u developer -p developer https://api.crc.testing:6443
  70. 1069 oc projects
  71. 1070 oc project trouble
  72. 1071 oc projects
  73. 1072 oc run -h | less
  74. 1073 oc run nginx --image=nginx
  75. 1074 oc get pods
  76. 1075 oc get all
  77. 1076 oc delete pod failure-776b9b878-xpl4x
  78. 1077 oc get all
  79. 1078 oc delete pod nginx
  80. 1079 oc get all
  81. 1080 oc scale deploy failure --replicas=3
  82. 1081 oc get all
  83. 1082 oc api-resources | less
  84. 1083 oc get all
  85. 1084 oc describe pod failure-776b9b878-lhdq6
  86. 1085 oc new-project
  87. 1086 oc new-project newgin
  88. 1087 oc create deploy newgin --image=quay.io/bitnami/nginx
  89. 1088 oc get all
  90. 1089 oc scale deploy newgin --replicas=3
  91. 1090 oc get all
  92. 1091 oc get pods -o wide
  93. 1092 oc expose deploy newgin
  94. 1093 oc describe pod newgin-5454b4cd8b-692jh
  95. 1094 oc expose deploy newgin --port=80
  96. 1095 oc get all
  97. 1096 oc describe svc newgin
  98. 1097 oc expose -h | less
  99. 1098 oc expose service newgin
  100. 1099 oc get all
  101. 1100 curl newgin-newgin.apps-crc.testing
  102. 1101 oc get routes
  103. 1102 oc describe route newgin
  104. 1103 oc run bginx --image=bitnami/nginx --dry-run=client -o yaml
  105. 1104 oc run bginx --image=bitnami/nginx --dry-run=client -o yaml > bginx.yaml
  106. 1105 oc explain pod.spec
  107. 1106 oc create -f bginx.yaml
  108. 1107 oc get pods
  109. 1108 history
  110. 1109 sleep 120; ex180/countdown 10
  111. 1110 oc get routes
  112. 1111 oc new-project s2i
  113. 1112 oc -o yaml new-app php~https://github.com/sandervanvugt/simpleapp --name=simple1 > s2i.yaml
  114. 1113 vim s2i.yaml
  115. 1114 oc apply -f s2i.yaml
  116. 1115 oc status
  117. 1116 oc get all
  118. 1117 oc logs simple1-1-build
  119. 1118 oc get all
  120. 1119 oc expose svc simple1
  121. 1120 oc get routes
  122. 1121 curl http://simple1-s2i.apps-crc.testing
  123. 1122 oc get all
  124. 1123 oc start-build simple1
  125. 1124 oc get all
  126. 1125 oc logs simple1-2-build
  127. 1126 oc logs simple1-2-build | less
  128. 1127 oc logs simple1-2-build | grep build
  129. 1128 oc get all
  130. 1129 oc logs -h | less
  131. 1130 oc logs -f simple1-2-build
  132. 1131 oc get all
  133. 1132 curl http://simple1-s2i.apps-crc.testing
  134. 1133 cd openshift/
  135. 1134 cd ..
  136. 1135 git clone https://github.com/sandervanvugt/openshift
  137. 1136 cd open
  138. 1137 cd openshift/
  139. 1138 ls
  140. 1139 git pull
  141. 1140 ls
  142. 1141 vim morevolumes.yaml
  143. 1142 oc create -f morevolumes.yaml
  144. 1143 oc describe pod morevol2
  145. 1144 oc exec -it morevol2 -c centos1 -- touch /centos1/hellofile
  146. 1145 oc exec -it morevol2 -c centos2 -- ls /centos2/
  147. 1146 oc login -u kubeadmin -p ddz5S-7U8uj-PPL7L-xciuP https://api.crc.testing:6443
  148. 1147 ls
  149. 1148 vim pv.yaml
  150. 1149 oc create -f pv.yaml
  151. 1150 oc login -u developer -p developer https://api.crc.testing:6443
  152. 1151 vim pvc.yaml
  153. 1152 oc create -f pvc.yaml
  154. 1153 oc get pvc
  155. 1154 vim pv-pod.yaml
  156. 1155 oc create -f pv-pod.yaml
  157. 1156 oc exec -it pv-pod -- touch /usr/share/nginx/html/helloagain
  158. 1157 oc get pods
  159. 1158 oc get logs pv-pod
  160. 1159 oc logs pv-pod
  161. 1160 oc describe pod pv-pod
  162. 1161 oc login -u kubeadmin -p ddz5S-7U8uj-PPL7L-xciuP https://api.crc.testing:6443
  163. 1162 oc new-project blah
  164. 1163 oc apply -f pvc.yaml
  165. 1164 oc apply -f pv-pod.yaml
  166. 1165 oc get pods
  167. 1166 oc exec -it pv-pod -- touch /usr/share/nginx/html/newfile
  168. 1167 history
Advertisement
Add Comment
Please, Sign In to add comment