sandervanvugt

ex280 april2023 day1

Apr 4th, 2023
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.65 KB | None | 0 0
  1. 997 crc status
  2. 998 crc console --credentials
  3. 999 crc oc-env
  4. 1000 eval $(crc oc-env)
  5. 1001 oc login -u developer -p developer
  6. 1002 oc get co
  7. 1003 oc login -u kubeadmin -p BapPM-SmQ32-MIMp2-k9bMU https://api.crc.testing:6443
  8. 1004 oc get co
  9. 1005 cd ex280/
  10. 1006 ./countdown 13
  11. 1007 history
  12. 1008 oc whoami
  13. 1009 oc get projects
  14. 1010 oc get projects | wc
  15. 1011 oc get ns
  16. 1012 oc get ns | wc
  17. 1013 oc login -u developer -p developer
  18. 1014 oc new-project myproject
  19. 1015 oc get project
  20. 1016 oc get ns
  21. 1017 oc api-resources | less
  22. 1018 oc completion -h | less
  23. 1019 source <(oc completion bash)
  24. 1020 oc whoami
  25. 1021 oc new-app rails-postgresql-example
  26. 1022 oc get all
  27. 1023 oc status
  28. 1024 oc get imagestream
  29. 1025 oc get imagestream -A
  30. 1026 oc login -u kubeadmin -p BapPM-SmQ32-MIMp2-k9bMU https://api.crc.testing:6443
  31. 1027 oc get imagestream -A
  32. 1028 oc get all
  33. 1029 oc logs postgresql-1-q5444
  34. 1030 oc describe pod postgresql-1-q5444
  35. 1031 oc get pods postgresql-1-q5444 -o yaml | less
  36. 1032 history
  37. 1033 oc explain deploymentconfig
  38. 1034 oc explain deploymentconfig.spec
  39. 1035 oc explain --recursive deploymentconfig.spec
  40. 1036 ./countdown 1
  41. 1037 history
  42. 1038 ./countdown 12
  43. 1039 oc whoami
  44. 1040 sudo dnf provides */htpasswd
  45. 1041 htpasswd -c -B -b /tmp/htpasswd admin password
  46. 1042 htpasswd -b -B /tmp/htpasswd anna password
  47. 1043 htpasswd -b -B /tmp/htpasswd linda password
  48. 1044 htpasswd -b -B /tmp/htpasswd anouk password
  49. 1045 htpasswd -b -B /tmp/htpasswd lisa password
  50. 1046 htpasswd -b -B /tmp/htpasswd ahmed password
  51. 1047 cat /tmp/htpasswd
  52. 1048 oc create -h
  53. 1049 oc create secret generic htpasswd-secret --from-file htpasswd=/tmp/htpasswd -n openshift-config
  54. 1050 oc get secret -n openshift-config
  55. 1051 oc adm policy add-cluster-role-to-user cluster-admin admin
  56. 1052 oc get oauth
  57. 1053 oc get oauth cluster -o yaml > oauth.yaml
  58. 1054 vim oauth.yaml
  59. 1055 oc get all -n openshift-authentication
  60. 1056 oc replace -f oauth.yaml
  61. 1057 oc get all -n openshift-authentication
  62. 1058 oc get users
  63. 1059 oc login -u anna -p password
  64. 1060 oc get all -n openshift-authentication
  65. 1061 oc login -u anna -p password
  66. 1062 oc get users
  67. 1063 oc get nodes
  68. 1064 oc login -u kubeadmin -p BapPM-SmQ32-MIMp2-k9bMU https://api.crc.testing:6443
  69. 1065 oc get users
  70. 1066 oc get nodes
  71. 1067 oc login -u admin -p password
  72. 1068 oc get nodes
  73. 1069 oc get users
  74. 1070 oc get identity
  75. 1071 oc adm groups new developers
  76. 1072 oc adm groups add-users developer anouk
  77. 1073 oc adm groups add-users developers anouk
  78. 1074 oc adm groups add-users testers lisa
  79. 1075 oc adm groups new testers
  80. 1076 oc edit oauth cluster
  81. 1077 oc adm groups new testers --dry-run=client -o yaml
  82. 1078 history
  83. 1079 oc get clusterroles
  84. 1080 oc get clusterroles | wc
  85. 1081 oc get clusterroles | grep -v system
  86. 1082 oc get clusterroles | grep -v system | wc
  87. 1083 oc describe clusterrole vie
  88. 1084 oc get roles
  89. 1085 oc projects
  90. 1086 oc get roles -A
  91. 1087 oc get roles -A | wc
  92. 1088 oc get clusterrolebindings
  93. 1089 oc get clusterrolebindings | wc
  94. 1090 oc get clusterrolebindings | grep -v 'system:'
  95. 1091 oc get clusterrolebindings | grep admin
  96. 1092 oc describe clusterrolebindings cluster-admin-0
  97. 1093 history
  98. 1094 oc api-resources | grep clusterrole
  99. 1095 oc api-resources | less
  100. 1096 oc get clusterrolebinding -o wide
  101. 1097 oc get clusterrolebinding -o wide | grep 'self'
  102. 1098 oc describe clusterrolebindings self-provisioners
  103. 1099 oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth
  104. 1100 oc describe clusterrolebindings self-provisioners
  105. 1101 oc login -u linda -p password
  106. 1102 oc login -u admin -p password
  107. 1103 oc new-project rbac
  108. 1104 oc policy add-role-to-user -h
  109. 1105 oc policy add-role-to-user admin linda -n rbac
  110. 1106 oc get rolebindings
  111. 1107 oc describe rolebinding admin-0
  112. 1108 oc get groups
  113. 1109 oc get rolebinding admin-0 -o yaml
  114. 1110 oc whoami
  115. 1111 oc policy add-role-to-group edit developers -n rbac
  116. 1112 oc policy add-role-to-group view testers -n rbac
  117. 1113 oc get rolebinding edit -o yaml
  118. 1114 oc get rolebindings -o wide
  119. 1115 oc adm policy add-cluster-role-to-group --rolebinding-name self-provisioners self-provisioner system:authenticated:oauth
  120. 1116 oc login -u linda
  121. 1117 oc login -u ahmed
  122. 1118 history
  123. 1119 ./countdown 6
  124. 1120 history
  125. 1121 oc create secret generic mysql --from-literal user=sqluser --from-literal password=password --from-literal database=secretdb --from-literal root_password=password
  126. 1122 oc login -u admin
  127. 1123 oc create secret generic mysql --from-literal user=sqluser --from-literal password=password --from-literal database=secretdb --from-literal root_password=password
  128. 1124 oc get secret mysql -o yaml
  129. 1125 echo cGFzc3dvcmQ= | base64 -d
  130. 1126 oc new-app --name mysql --docker-image bitnami/mysql
  131. 1127 oc get pods -w
  132. 1128 oc logs mysql-75c986f564-tdgzh
  133. 1129 oc set env deployment/mysql --from secret/mysql --prefix MYSQL_
  134. 1130 oc get pods -w
  135. 1131 oc exec -it mysql-86d98b5ff9-gzj4c -- env
  136. 1132 ./countdown 12
  137. 1133 oc get pods
  138. 1134 oc get pods -o yaml | less
  139. 1135 oc get pods -A
  140. 1136 oc get pods -n openshift-multus multus-blgvw -o yaml | less
  141. 1137 oc policy add-role-to-user -h | less
  142. 1138 oc get scc
  143. 1139 oc describe scc nonroot
  144. 1140 oc get scc nonroot -o yaml | less
  145. 1141 oc get pods
  146. 1142 oc get pods -o yaml | grep scc
  147. 1143 oc login -u linda
  148. 1144 oc new-project sccs
  149. 1145 oc new-app --name sccnginx --image=nginx
  150. 1146 oc get pods
  151. 1147 oc logs sccnginx-545594fd76-pqt9x
  152. 1148 oc get pods sccnginx-545594fd76-pqt9x -o yaml | oc adm policy scc-subject-review -f -
  153. 1149 oc login -u admin
  154. 1150 oc get pods sccnginx-545594fd76-pqt9x -o yaml | oc adm policy scc-subject-review -f -
  155. 1151 oc create sa sccnginx-sa
  156. 1152 oc adm policy add-scc-to-user restricted-v2 -z sccnginx-sa
  157. 1153 oc login -u linda
  158. 1154 oc get pods sccnginx-545594fd76-pqt9x -o yaml | less
  159. 1155 oc set serviceaccount deployment sccnginx sccnginx-sa
  160. 1156 oc get pods
  161. 1157 oc logs sccnginx-7f865898f8-p6pd2
  162. 1158 oc adm policy add-scc-to-user anyuid -z sccnginx-sa
  163. 1159 oc login -u admin
  164. 1160 oc adm policy add-scc-to-user anyuid -z sccnginx-sa
  165. 1161 oc login -u linda
  166. 1162 oc get all
  167. 1163 oc delete pod sccnginx-7f865898f8-p6pd2
  168. 1164 oc get all
  169. 1165 history
  170. 1166 oc new-app --image=bitnami/nginx --name=bginx
  171. 1167 oc get pods -o wide
  172. 1168 oc describe pod bginx-695df947b9-wfvf5 | less
  173. 1169 oc get svc
  174. 1170 oc get routes
  175. 1171 history
  176.  
Add Comment
Please, Sign In to add comment