Advertisement
sandervanvugt

CKAD march 23 day1

Mar 7th, 2023
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. student@student-virtual-machine:~/ckad$ history
  2. 1 history
  3. 2 minikube start --vm-driver=docker --cni=calico
  4. 3 kubectl get all
  5. 4 history
  6. 5 minikube status
  7. 6 minikube ssh
  8. 7 kubectl get all
  9. 8 minikube --help | less
  10. 9 minikube dashboard
  11. 10 kubectl get all
  12. 11 kubectl create deploy firstnginx --image=nginx --replicas=3
  13. 12 kubectl get all
  14. 13 history
  15. 14 kubectl -h | less
  16. 15 kubectl completion -h | less
  17. 16 source <(kubectl completion bash)
  18. 17 vim ~/.kube/config
  19. 18 kubectl get pods
  20. 19 kubectl get ns
  21. 20 kubectl config view
  22. 21 kubectl config set-context minikube --namespace=kube-system
  23. 22 kubectl get pods
  24. 23 kubectl config set-context --current --namespace=default
  25. 24 ls *file
  26. 25 cd dockerfile/
  27. 26 vim Dockerfile
  28. 27 docker build -t centmap .
  29. 28 docker images
  30. 29 docker save --help
  31. 30 docker save centmap
  32. 31 docker save centmap -o centmap.tar
  33. 32 ls -l centmap.tar
  34. 33 history
  35. 34 kubectl get pods
  36. 35 kubectl delete pod dontuseme-5dc7b7f996-dph5m
  37. 36 kubectl get pods
  38. 37 kubectl run -h | less
  39. 38 kubectl run nginxxxx --image=nginx
  40. 39 kubectl get pods
  41. 40 history
  42. 41 kubectl get pods
  43. 42 kubectl delete pod nginxxxx
  44. 43 kubectl get pods
  45. 44 kubectl explain pods
  46. 45 kubectl explain pods.spec | less
  47. 46 history
  48. 47 kubectl get pods
  49. 48 kubectl get pods firstnginx-5444786b89-m48zg -o yaml | less
  50. 49 kubectl describe pod firstnginx-5444786b89-wh24c | less
  51. 50 vim ex1.txt
  52. 51 history
  53. 52 kubectl describe pod firstnginx-5444786b89-wh24c | less
  54. 53 kubectl get pods -o wide
  55. 54 cd
  56. 55 kubectl run nginxxxx --image=nginx --dry-run=client -o yaml
  57. 56 kubectl run nginxxxx --image=nginx --dry-run=client -o yaml > nginxxxx.yaml
  58. 57 vim nginxxxx.yaml
  59. 58 kubectl apply -f nginxxxx.yaml
  60. 59 vim nginxxxx.yaml
  61. 60 kubectl apply -f nginxxxx.yaml
  62. 61 vim nginxxxx.yaml
  63. 62 kubectl apply -f nginxxxx.yaml
  64. 63 history
  65. 64 vim nginxxxx.yaml
  66. 65 kubectl delete -f nginxxxx.yaml
  67. 66 kubectl apply -f nginxxxx.yaml
  68. 67 vim nginxxxx.yaml
  69. 68 kubectl apply -f nginxxxx.yaml
  70. 69 cd ckad/
  71. 70 vim sidecar.yaml
  72. 71 kubectl apply -f sidecar.yaml
  73. 72 kubectl get pods
  74. 73 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  75. 74 kubectl apply -f sidecar.yaml
  76. 75 vim sidecar.yaml
  77. 76 vim morevolumes.yaml
  78. 77 vim init-example1.yaml
  79. 78 kubectl create -f init-example1.yaml
  80. 79 kubectl get pods
  81. 80 vim init-example2.yaml
  82. 81 kubectl apply -f init-example2.yaml
  83. 82 kubectl get pods
  84. 83 kubectl get ns
  85. 84 kubectl get pods -n kube-system
  86. 85 kubectl get pods -n kubernetes-dashboard
  87. 86 kubectl describe ns default
  88. 87 kubectl get pods
  89. 88 kubectl get pods -A
  90. 89 kubectl create ns secret
  91. 90 kubectl config set-context --current --namespace=secret
  92. 91 kubectl get pods
  93. 92 kubectl run busybox --image=busybox -n secret
  94. 93 kubectl get pods
  95. 94 vim busybox-ns.yaml
  96. 95 kubectl create -f busybox-ns.yaml
  97. 96 kubectl get pods
  98. 97 kubectl describe pod busybox
  99. 98 kubectl delete pod busybox
  100. 99 kubectl run busybox --image=busybox -n secret -- sleep 3600
  101. 100 kubectl get pods
  102. 101 kubectl config set-context --current --namespace=default
  103. 102 kubectl run nginx-lab --image=nginx
  104. 103 kubectl get pods
  105. 104 k get pods
  106. 105 ./countdown 12
  107. 106 kubectl run faildb --image=mariadb
  108. 107 kubectl get pods
  109. 108 kubectl describe pod init-demo2
  110. 109 kubectl describe pod faildb
  111. 110 kubectl logs faildb
  112. 111 kubectl delete pod faildb
  113. 112 kubectl run -h | less
  114. 113 kubectl run mydb --image=mariadb --env=MARIADB_ROOT_PASSWORD=password
  115. 114 kubectl get pods
  116. 115 kubectl exec mydb -- set
  117. 116 kubectl exec mydb -- env
  118. 117 kubectl run busybox
  119. 118 kubectl run busybox --image=busbox
  120. 119 kubectl get pods
  121. 120 kubectl describe pod busybox
  122. 121 kubectl get pods
  123. 122 kubectl delete pod busybox
  124. 123 kubectl run busybox --image=busybox
  125. 124 kubectl get pods
  126. 125 kubectl describe pod busybox
  127. 126 minikube ssh
  128. 127 kubectl get pods
  129. 128 kubectl delete pod busybox
  130. 129 history
  131. 130 kubectl explain pod.spec | less
  132. 131 kubectl explain pod.spec.securityContext | less
  133. 132 vim securitycontextdemo2.yaml
  134. 133 kubectl apply -f securitycontextdemo2.yaml
  135. 134 kubectl exec -it security-context-demo -- sh
  136. 135 vim securitycontextdemo.yaml
  137. 136 kubectl create -f securitycontextdemo.yaml
  138. 137 kubectl get pods
  139. 138 kubectl describe pod nginxsecure
  140. 139 kubectl delete -f securitycontextdemo.yaml
  141. 140 kubectl create job -h | less
  142. 141 kubectl create job onejob --image=busybox -- date
  143. 142 kubectl get pods,jobs
  144. 143 kubectl get jobs onejob -o yaml | less
  145. 144 kubectl get pods,jobs
  146. 145 kubectl delete job onejob
  147. 146 kubectl get pods,jobs
  148. 147 kubectl create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
  149. 148 vim mynewjob.yaml
  150. 149 kubectl create -f mynewjob.yaml
  151. 150 vim mynewjob.yaml
  152. 151 kubectl create -f mynewjob.yaml
  153. 152 kubectl get pods,jobs
  154. 153 history
  155.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement